P-Value of a Test of Significance

This applet illustrates the P-value of a test of significance. The setting is the same as Chapter 14 of TPS 3e: testing hypotheses about the mean of a normal distribution whose standard deviation you know.

To set up the test, fill in the boxes: What null hypothesis H0 about the mean μ do you want to test? Which alternative hypothesis Ha do you have in mind? How many observations n will you have (50 or fewer)? What value of the standard deviation σ is known to be true? Then click Update to display the information you have entered.

The normal curve shows the sampling distribution of the sample mean when your null hypothesis is true. The blue arrow shows what kinds of values of count as evidence against H0 in favor of your alternative Ha. Try changing Ha to see how the arrow changes. Once you have a value of from data, the graph will show you the P-value for this : it is the probability -- calculated taking H0 to be true -- of getting a value at least that far away from H0 in the direction of the arrow.


You can enter a sample from data you already have. Use the Show P button to display this and its P-value. Or you can specify the true population mean μ and use the Generate Sample button to create a random sample from the population and display the sample mean from this one sample. Note that some points in the sample may be too far from μ to appear in the display. Try this both when H0 is true and when alternatives are true.