All of you must have heard about the central limit theorem (CLT).
- Then run the following R commands. Please spend some time trying understand the code well.
rnorm2 <- function(n,mean,sd) { mean+sd*scale(rnorm(n)) }
set.seed(1239)
r1 <- rnorm2(100,25,4) #n=100, mean=25, sd=4
r2 <- rnorm2(50,10,3) #n=50, mean=10, sd=3
samplingframe <- c(r1,r2)
hist(samplingframe, breaks=20,col = "pink")
- Draw 50 samples of size 15, and plot the sampling distribution of means as a histogram.
I got a distribution from a mean of samplingframe from question a. and get each sample mean by sapply() function. From 50 samples of size 15, the range of mean from 14 to 26, the most frequency mean is between 18 and 20.
- Draw 50 samples of size 45, and plot the sampling distribution of means as a histogram.
This distribution also come from mean of sample data from samplingframe on question a. The range of this distribution is between 17 and 22, and the most frequency mean is 13.
- Make sure that the distributions in parts b and c are on the same plot. Explain the three histograms in terms of their differences and similarities.
The similarity between two histogram is both of the distribution’s shape is approximately normal distribution. With the different sample size (a. = 15, b. = 45), we can see the range of the distribution B has a wider range than range of distribution C.
- Explain CLT in your own words. Restrict your response to less than 50 words.
Central limit distribution is a distribution from an average(mean) of the given sample. When plotting the mean of each samples with the same sample size, the shape of the distribution becomes normal distribution when adding more number of samples.
- Does this exercise help you understand CLT? If so why? If not, why not? Restrict your response to less than 50 words.
Yes, this exercise helps me a lot to understand CLT. First, I understand how CLT works my create a function to get mean of each sample. Then, plotting the different distribution with the different sample size made me understood and pictured between two sample.