#### Description

The experiment is to select a random sample of size \(n\) from a selected distribution and then test a hypothesis about the mean \(\mu\) at a specified significance level \(\alpha\). The distribution can be selected from a list box; the options are the

In each case, the appropriate parameters can be varied with input controls. The sample size \(n\), the significance level \(\alpha\), and the boundary point \(\mu_0\) between the null and alternative hypotheses can also be varied with input controls..

The type of test: two-sided, left-sided, or right-sided, can be selected with a list box. The probability density function of the sampling distribution and the mean \(\mu\) are shown in blue in the first graph; \(\mu_0\) is shown in green.

The test can be constructed under the assumption that the distribution standard deviation is known or unknown. In the first case, the test statistic has the standard normal distribution; in the second case the test statistics has the student \(t\) distribution with \(n - 1\) degrees of freedom. The probability density function and the critical values of the test statistic are shown in the second graph in blue.

On each run, the sample density function is shown in red in the first graph. The sample mean \(M\) is shown in red in the first graph and the value of the test statistics (\(Z\) or \(T\)) is shown in red in the second graph. The random variable \(I\) indicates the event that the null hypothesis is rejected. On each update, \(M\), \(Z\) or \(T\), and \(I\) are recorded in the record table. Note that the null hypothesis is reject \(I = 1\) if and only if the test statistic (\(Z\) or \(T\)) falls outside of the critical values. Finally, the empirical density function of \(I\) is shown in red in the last graph and recorded in the distribution table.