compute their sum S25, and repeat this experiment 1000 times. Make a bar graph for the density of S25 and compare it with the normal approximation of Exercise 4. How good is the fit? Now do the same for the standardized sum S ∗ 25 and the average A25.
This is for S*25
#create an empty vector
v = vector()
#1000 trials of the experiment
for (i in 1:1000) {
c = runif(25, min=0, max=20)
s25 = sum(c)
v[[i]]=s25
}
summary(v)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 148.5 231.7 249.9 250.4 269.9 343.0
hist(v)