par(mfrow = c(1,2))
x <- c()
for (i in 1:10000) {x <- rbind(x,(sample(1:6,1)+sample(1:6,1))/2)}
hist(x, seq(0,7,.5), main = "size=10,000")
hist(x, seq(0,7,.01), main = "size=10,000")
par(mfrow = c(1,2))
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(c(2,2,3,9,9),2,rep=T))/2)}
hist(x, seq(0,10,.01), main = "size=10,000")
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(c(2,2,3,9,9),2,rep=F))/2)}
hist(x, seq(0,10,.01), main = "size=10,000")
par(mfrow = c(1,3))
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,100,rep=T))/100)}
hist(x, seq(0,7,.01), main = "size=100")
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,400,rep=T))/400)}
hist(x, seq(0,7,.01), main = "size=400")
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,10000,rep=T))/10000)}
hist(x, seq(0,7,.01), main = "size=10,000")
par(mfrow = c(1,3))
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,100,rep=T))/100)}
hist(x, seq(0,7,.01), main = "size=100", freq = TRUE, ylim = c(0, 3000))
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,400,rep=T))/400)}
hist(x, seq(0,7,.01), main = "size=400", freq = TRUE, ylim = c(0, 3000))
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,10000,rep=T))/10000)}
hist(x, seq(0,7,.01), main = "size=10,000", freq = TRUE, ylim = c(0, 3000))
\(\bar{X} \sim N(3.5, \left( \sqrt{\frac{35/12} {100}} \right)^2 ) \Rightarrow P(3.4 < \bar{X} < 3.6) = P(\frac{3.4-3.5}{\sqrt{\frac{35/12} {100}} } < Z < \frac{3.6-3.5}{\sqrt{\frac{35/12} {100}} }) \approx P(-0.58554 < Z < 0.58554) \approx 0.4418153\)
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,100,rep=T))/100)}
length(x[x<3.6 & x>3.4,])/length(x)
## [1] 0.4234
\(\bar{X} \sim N(3.5, \left( \sqrt{\frac{35/12} {400}} \right)^2 ) \Rightarrow P(3.4 < \bar{X} < 3.6) = P(\frac{3.4-3.5}{\sqrt{\frac{35/12} {400}} } < Z < \frac{3.6-3.5}{\sqrt{\frac{35/12} {400}} }) \approx P(-1.17108 < Z < 1.17108) \approx 0.7584334\)
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,400,rep=T))/400)}
length(x[x<3.6 & x>3.4,])/length(x)
## [1] 0.7582
\(\bar{X} \sim N(3.5, \left( \sqrt{\frac{35/12} {10000}} \right)^2 ) \Rightarrow P(3.4 < \bar{X} < 3.6) = P(\frac{3.4-3.5}{\sqrt{\frac{35/12} {10000}} } < Z < \frac{3.6-3.5}{\sqrt{\frac{35/12} {10000}} }) \approx P(-5.8554 < Z < 5.8554) \approx 1.0\)
x <- c()
for (i in 1:10000) {x <- rbind(x, sum(sample(1:6,10000,rep=T))/10000)}
length(x[x<3.6 & x>3.4,])/length(x)
## [1] 1