How to Do Hypothesis Testing with Normal Distribution

Hypothesis tests compare a result against something you already believe is true. Let X1,X2,,Xn be n independent random variables with equal expected value μ and standard deviation σ. Let X be the mean of these n random variables, so

X = 1 n i=1nX i

The stochastic variable X has an expected value μ and a standard deviation  σ n. You want to perform a hypothesis test on this expected value. You have a null hypothesis H0: μ = μ0 and three possible alternative hypotheses: Ha: μ < μ0, Ha: μ > μ0 or Ha: μμ0. The first two alternative hypotheses belong to what you call a one-sided test, while the latter is two-sided.

In hypothesis testing, you calculate using the alternative hypothesis in order to say something about the null hypothesis.

Rule

Hypothesis Testing (Normal Distribution)

1.
You set up the null hypothesis H0 against an alternative hypothesis HA. H0: μ = μ0 against Ha: μ > μ0 (possibly Ha: μ < μ0, Ha: μμ0).
2.
Then, you do an experiment and find that the average value is x. Next, you calculate the probability P (X x) for the alternative hypothesis Ha: μ > μ0.
3.
If this probability is less than 1 %, 5 % or 10 %, you discard H0.

Note! For two-sided testing, multiply the p-value by 2 before checking against the critical region.

Example 1

As the production manager at the new soft drink factory, you are worried that the machines don’t fill the bottles to their proper capacity. Each bottle should be filled with 0.5L soda, but random samples show that 48 soda bottles have an average of 0.48L, with an empirical standard deviation of 0.1. You are wondering if you need to recalibrate the machines so that they become more precise.

This is a classic case of hypothesis testing by normal distribution. You now follow the instructions above and select 10 % level of significance, since it is only a quantity of soda and not a case of life and death.

1.
The null hypothesis is that there is 0.5 L in each bottle:
μ0 = 0.5

The alternative hypothesis in this case is that the bottles do not contain 0.5 L and that the machines are not precise enough. This thus becomes a two-sided hypothesis test and you must therefore remember to multiply the p-value by 2 before deciding whether the p-value is in the critical region. This is because the normal distribution is symmetric, so P (X k) = P (X k). Thus it is just as likely to observe an equally extremely high value as an equally extreme low:

μ00.5
2.
Find the p-value by calculating P (X 0.48): P (X 0.48) = P (Z 0.48 0.5 0.1 48 ) = P (Z 1.39) = 0.0823 p = 0.0823 2 = 0.1646 = 16.46%
3.
You have decided that if the machines are to be recalibrated your p-value must be less than 10 %. Therefore, there must be less than 10 % chance of the machine filling 0.5 L on average in the bottles. Your p-value is
p = 16.46% > 10%,

so H0 must be kept, and the machines are deemed to be fine as is.

Had the p-value been less than the level of significance, that would have meant that the calibration represented by the alternative hypothesis would be significantly better for the business.

Want to know more?Sign UpIt's free!