normal <- rnorm->(100000)
mean(normal)
[1] -0.002535
sd(normal)
[1] 1
hist(normal)
normal <- rnorm->(100000,5,10)
mean(normal)
[1] 5.015
sd(normal)
[1] 9.984
hist(normal)
binom <- rbinom->(100000, 50, .8)
mean(binom)
[1] 40
sd(binom)
[1] 2.819
hist(binom)
lines(seq(30,50,1),dbinom(seq(30,50,1),50,0.8)* 1e+5 ,col="blue")
exponencial<- rexp->(100000)
mean(exponencial)
[1] 1.004
sd(exponencial)
[1] 1.003
hist(exponencial)
Chi <- rchisq->(100000, 10)
mean(Chi)
[1] 9.98
sd(Chi)
[1] 4.469
hist(Chi)
beta <- rbeta->(100000,2,3)
mean(beta)
[1] 0.4007
sd(beta)
[1] 0.1998
hist(beta)
f <- rf->(100000, 5, 20)
mean(f)
[1] 1.111
sd(f)
[1] 0.8465
hist(rf(10000,5,20))
t <- rt->(100000, 20)
mean(t)
[1] -0.004615
sd(t)
[1] 1.056
hist(t)
lnormal <- rlnorm->(100000)
mean(lnormal)
[1] 1.647
sd(lnormal)
[1] 2.12
hist(lnormal)
poisson <- rpois->(100000, lambda = 12)
mean(poisson)
[1] 12.01
sd(poisson)
[1] 3.463
hist(poisson)
weibull <- rweibull-> (100000, 1.5, 5000)
mean(weibull)
[1] 4500
sd(weibull)
[1] 3051
hist(weibull)
No hay comentarios.:
Publicar un comentario