Confidence Interval
![]() |
|
Description: This demonstration is about confidence intervals for the mean. You define the parameters of a Gaussian population and the sampling. A graph displays each confidence interval as a vertical line with a marker for the mean. The intervals are arranged across the graph in succession. The population mean is shown as a horizontal line for comparison. Intervals which do not include the population mean are drawn as red lines. A count of the intervals that include the population mean is displayed at the top of the graph as a percentage.
Instructions: Simply run this script. Click OK on the dialog to accept the default settings. The mean and standard deviation are estimated from each sample, so they vary among samples. Notice that the center point and the width of the interval changes from one sample to the next. Notice how many intervals actually contain the population mean. Note both typical and extreme samples.
The graph is fully functional. For example, you can double click on the axis to change settings or drag it to view another region of the plot. You can explore and tweak this graph like any other built in platform.
Take another set of samples. Click the New Sample button to the right of the graph. Note the changes. Are there more extreme samples than before?
You can change the population and sampling parameters using the controls on the right of the graph. Either drag the slider or click on the current value displayed under the slider and enter a new value. Either way, the effect is usually immediate.
- If you move the population mean, then you notice (1) the horizontal line changes location and (2) the count of the intervals containing the mean changes.
- If you change the population standard deviation, nothing happens to this sample. It merely sets up the conditions for a new sample.
- If you change the sample size, then the intervals are recomputed for the same data. For example, if you increase the sample size, then the intervals shrink, and more of them do not include the population mean. Otherwise, like the population standard deviation, it sets up the conditions for a new sample.
- If you change the desired confidence interval (1-alpha), then you can see the immediate change in the graph.
- If you change the setting to use the population sigma, then the individual sample standard deviations are replaced with a single sigma value. You must enter 0 for no or 1 for yes.
NOTE: You can also set up different scenarios by changing the values and selections in the opening dialog.
Requirements: None


