You are on page 1of 2

Sebastián Barrios Caracas 1628783-3752

#Distribucion normal#
set.seed(1236)
x11()
n=10000
mu=25
sigma=5
y<-rnorm(n,0,1)
X<-mu+sigma*y
x1<-seq(0,40,by=0.01)
hist(X,freq=F, main= "Histograma transformacion normal", col="green",)
lines(x1,dnorm(x1,mu,sigma), col="black")

Histograma transformacion normal


0.08
0.06
Density

0.04
0.02
0.00

10 20 30 40

#Distribucion exponencial#
set.seed(1234)
x11()
n=1000
y<-rexp(n,1)
X<-y/5
x<-rexp(n,5)
x1=seq(0,5,by=0.01)
hist(X, freq = F, main=expression(paste("histograma trasformacion
exponencial")), col ="green")
lines(x1, dexp(x1,5), col="black")
histograma trasformacion exponencial

4
3
Density

2
1
0

0.0 0.5 1.0 1.5

#Distribucion weibull#
set.seed(1235)
x11()
par(mfrow=c(1,2))
n=1000
y<-rweibull(n,4,1)
X<-y/10
x<-rweibull(n,4,10)
x1=seq(0,0.5,by=0.01)
hist(y, freq = F, main=expression(paste("histograma weibull")), col
="green")
hist(X, freq = F, main=expression(paste("histograma trasformacion
weibull")), col ="red")

histograma weibull histograma trasformacion weibull


1.5

15
1.0

10
Density

Density
0.5

5
0.0

0.5 1.0 1.5 0.05 0.10 0.15

y X

You might also like