Statistical Applets

P-Value Of A Test Of Significance

This applet illustrates the P-value of a test of significance. Here we're testing a hypothesis about the mean of a normal distribution whose standard deviation we know, but the concepts are essentially the same for any other type of significance test.

The normal curve shows the sampling distribution of the sample mean x when your null hypothesis is true. The blue arrow shows what kinds of values of x 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 x from data, the graph will show you the P-value for this x: 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.

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, and what level of significance α do you require? What value of the standard deviation σ is known to be true? How many observations n will you have (250 or fewer)?

If you already have a sample mean, enter this value and click UPDATE to display the sample mean on the graph and calculate the P-value. Or you can specify the true population mean μ and use the GENERATE SAMPLE button to create a random sample from the population, display the observations and sample mean (note that some of the points in the sample may be too far from μ to appear in the display), and calculate the P-value.