The experiment is to select a random sample of size \(n\) from a specified distribution, and then to construct an approximate confidence interval for the standard deviation \( \sigma \) at a specified confidence level. The sampling distribution can be chosen with a list box; the options are
In each case, the appropriate parameters and the sample size can be varied with scrollbars. The probability density function of the selected distribution is shown in the first graph, as well as a bar, centered at the distribution mean and extending \( \sigma \) to the left and right.
The confidence level can be selected from a list box, as can the type of interval—two sided, upper bound, or lower bound. The pivot variable is \[V \frac{n - 1}{\sigma^2} S^2\] where \(S^2\) is the sample variance. This variable has the chi-square distribution with \(n - 1\) degrees of freedom, assuming that the sampling distribution really is normal. The probability density function and the critical values of \(V\) are shown in the second graph.
Random variables \(L\) and \(R\) denote the left and right endpoints of the confidence interval for \( \sigma \), and \(I\) indicates the event that the confidence interval contains \( \sigma \). The theoretical probability density function of \(I\) is shown in the third graph.
On each run, the sample density is shown in the first graph, and the value of \(V\) is shown in the second graph. Note that the confidence interval contains \( \sigma \) if and only if \(V\) falls between the critical values in the second graph. The third graph shows the proportion of successes and failures. The first table records the sample standard deviation \( S \), the lower and upper confidence bounds \(L\) and \(R\), the pivot variable \(V\), and \(I\). Finally, the second table gives the theoretical and empirical probability density functions of \(I\).