Confidence Interval Simulation 500 Numbers

First developed in July, 2012
Expanded and posted July, 2013 ~KG Shafer

The goal for the 500 Numbers activity is to illustrate the concept of a 95% confidence interval.
The formula for a 95% CI in this activity is x-bar +/- 1.96(sigma/SQRT(n)).

The Population
The attached file contains a sampler with 500 numbers. Run the sampler 's mixer device 500 times, without replacement, in order to draw the entire population.

The first plot shows the mean and the standard deviation (mean, hat plot and the ruler tool) of the population of all 500 numbers. This appears to be a normally distributed population. Note that mu = 60.116 and sigma = 9.7 (population statistics).

The Simple Random Sample
I duplicated the sampler and renamed this collection as "Simple Random Samples" so the plot above would be preserved in the file. The repeat number was set to 40 and the plot below shows a sample mean (x-bar) of 60.775. Note that the count of 40 shows and the color for the attribute was set to red.

Collecting the Sample Means
The history tool was used to collect 100 sample means. Four attributes were added to the history table as shown below. The left and right endpoints of each confidence interval are calculated for a confidence level of 95%. The repeat value from the sampler attribute is found in the sampler's History Options menu.
Note that the 13th random sample of 40 numbers yielded a sample mean of 56.825. The 95% confidence interval is (53.8189, 59.8311). Note that the true mean is not captured by this interval. The formula for "Captured" tests the end points of the intervals.

The plot on the left shows that the population mean of 60.116 was captured in 95 of this run of 100 collections. Note that case 13 shows up in the missed category because the right endpoint is not high enough to include 60.116. Recall that the
the 95% confidence interval for case 13 is (53.8189, 59.8311). The plot shows that there are two instances where the sample mean is too low to capture mu.

Similar results can be seen for the sample mean of 64.025 (case 34 in this collection). The left endpoint is not low enough to include 60.116. The confidence interval for this case is (61.0189, 67.0311).

The distribution of the sample means shows the x-bars that produce confidence intervals that do not include 60.116.

A reference line and ruler tool show the left endpoint of the interval for case 13 misses 60.116. A filter was used in order to zoom in on the x-bars below 60.5. Note that 1.96(9.7/SQRT(40) from the CI formula is approximately 3 and this matches the plot (with rounding error from the reference line).
Let me know what you think! ~Kathy