You are on page 1of 1

Central limit theorem and contradiction

n<-35
xbar<-numeric(500)
for (i in 1:500) {
xbar[i]=mean(rcauchy(n))
}
hist(xbar)
--------------------n1<-35
mu<-100
sigma<-10
xbar1<-numeric(500)
for (i in 1:500) {
xbar1[i]=mean(rnorm(n1,mean=mu,sd=sigma))
}
hist(xbar1)
---------------------------n2<-35
xbar2<-numeric(500)
for (i in 1:500) {
xbar2[i]=mean(runif(n2))
}
hist(xbar2)
--------------------------n3<-35
xbar3<-numeric(500)
for (i in 1:500) {
xbar3[i]=mean(rpois(n3,10))
}
hist(xbar3)
--------------------par(mfrow=c(2,2),bg="pink")
hist(xbar,col="red")
hist(xbar1,col="blue")
hist(xbar2,col="green")
hist(xbar3,col="yellow")

You might also like