Skip to main content

Computer Lab Project No. 6: Confidence Intervals with Known Standard Deviation

Today we are going to experiment with confidence intervals for the population mean. We are going to use the methods that were developed in class for estimating the population mean when the population standard deviation is known.

  1. Simulate rolling a fair die 100 times, using StatCrunch. You’ll need 3 samples, which should be put in columns 1 to 3. Here is how this can be done:
    1. Click Data → Simulate Data → Discrete Uniform.
    2. In the pop-up window, put “100” in the text field labeled “Rows”.
    3. Put “3” in the text field labeled “Columns”.
    4. Put “1” as minimum and “6” as maximum.
    5. You can leave the other settings as they are. Click the “Simulate” button at the bottom right of the window.
  2. Consider the experiment of rolling a fair die. Calculate the mean and the standard deviation. The random numbers you generated can be viewed as being samples taken from a population with that mean and standard deviation.
  3. Use what you learned in class to calculate confidence intervals for the population mean with confidence level 0.95 based on these samples. Note that even though these samples are realizations of the same distribution (are taken from the same population), the confidence intervals are not the same. The confidence intervals are calculated from, and thus dependent on, the specific sample used. Recall the formula for a confidence interval for the mean at confidence level \(1-\alpha\):

\[ (\bar{x} - E,\; \bar{x} + E), \qquad E = z_{\alpha/2}\frac{\sigma}{\sqrt{n}}. \]

Recall that \(z_{\alpha/2}\) is the score such that the area under the normal curve and to the right of the score is \(\alpha/2\). In other words, \(z_{\alpha/2}\) is the \((1-\alpha/2)\)-th percentile of the normal distribution. Also, \(\alpha\) is 1 minus the confidence level, so in our case, \(\alpha = 0.05\). You can use StatCrunch to calculate \(z_{\alpha/2}\), using the normal calculator, as discussed last time.

  1. In how many of your samples was the population mean contained in the confidence interval you calculated?
  2. Collect all the results obtained in the class. What percentage of confidence intervals calculated by you and your peers contained the population mean?
  3. Repeat these steps from the beginning, but this time, calculate confidence intervals at confidence level 0.99.