The applet below allows one to visually investigate hypothesis tests for a mean. Specify the sample size, n, the shape of the distribution (Normal or Right skewed), the true population mean (Mean), the true population standard deviation (Std. Dev.), the null value for the mean (Null mean) and the alternative for the test (Alternative). When you click the Simulate button, 100 separate samples of size n will be selected from a population with these population parameters. For each of the 100 samples, a hypothesis test based on the T statistic is performed, and the results from each test are displayed in the plots to the right. The test statistic for each test is shown in the top plot, and the P-value is shown in the bottom plot. The green and blue lines represent the cut offs for rejecting the null with the 0.05 and 0.01 level tests, respectively. Additional simulations can be carried out by clicking the Simulate button multiple times. The cumulative number of times that each test rejects the null hypothesis is also tabled. Press the Clear button to clear existing results and start a new simulation. Things to try with the applet: