Statistical distance and test statistic

The p-value for testing a hypothesis about the mean, µ, when σ is known, is a tail area from the normal distribution of the mean and can be evaluated in the usual way using a z-score. This calculation can be expressed in terms of the statistical distance between the parameter and its estimate,

In the context of a test about means, the statistical distance is

Since it has a standard normal distribution (zero mean and unit standard deviation) when the null hypothesis holds, it can be used as a test statistic.

P-value

The p-value for the test can be determined from the tail areas of the standard normal distribution.

For a two-tailed test, the p-value is the red tail area.

Quality control for cornflake packets

The diagram below repeats the simulation that we used earlier to test whether a sample mean weight of 10 cornflake packets of 529 gm is consistent with a packing machine that is set to give normally distributed weights with µ = 520 gm and σ = 10 gm.

Again click Accumulate and hold down the Simulate button until about 100 samples of 10 packets have been selected and weighed. The p-value is the probability of getting a sample mean further from 520 gm than 529 gm — either below 511 gm or above 529 gm and the simulation provides an estimate of this probability. However a simulation is unnecessary since we can evaluate the p-value exactly.

Select Normal distribution from the pop-up menu on the bottom right to replace the simulation with the normal distribution of the mean,

From its tail area, we can calculate (without a simulation) that the probability of getting a sample mean as far from 520 as 529 is exactly 0.0044. This is the exact p-value for the test.

P-value from statistical distance

Finally, consider the statistical distance of our estimate of µ, 529 gm, from the hypothesised value, 520 gm.

Select 'Statistical distance' from 520 from the middle pop-up menu to show how the p-value is found using this z-score.

Since the p-value is so small (0.0044), we conclude that there is strong evidence that the population mean, µ, is not 520.

Pregnancy duration

The duration of a woman's pregnancy is quite variable. For women who receive adequate medical attention, records show that the duration is a random variable with mean µ = 266 days and standard deviation σ = 16 days. The distribution is also approximately normal.

It is known that women who receive inadequate prenatal care often have shorter pregnancies with resultant health problems. The diagram below shows the pregnancy durations of 70 women from an urban hospital in Nashville, Tennessee where many of the women are from lower socio-economic groups. Their mean pregnancy duration was found to be 260.3 days.

If the null hypothesis was true, the sample mean would have the normal distribution shown in pale blue. The sample mean duration is unusually low for this distribution, so we conclude that there is strong evidence that the mean duration is lower than 266 days.

The right of the diagram shows how the p-value is calculated from a statistical distance (z-score).


Choose Modified Data from the pop-up menu. The slider allows you to investigate how low the sample mean must become in order to give evidence that µ is less than 266 days.