Hypothesis tests compare a result against something you already believe is true. Let be independent random variables with equal expected value and standard deviation . Let be the mean of these random variables, so
The stochastic variable has an expected value and a standard deviation . You want to perform a hypothesis test on this expected value. You have a null hypothesis and three possible alternative hypotheses: , or . 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
Note! For two-sided testing, multiply the -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 soda, but random samples show that 48 soda bottles have an average of , with an empirical standard deviation of . 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 % level of significance, since it is only a quantity of soda and not a case of life and death.
The alternative hypothesis in this case is that the bottles do not contain 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 -value by 2 before deciding whether the -value is in the critical region. This is because the normal distribution is symmetric, so . Thus it is just as likely to observe an equally extremely high value as an equally extreme low:
so must be kept, and the machines are deemed to be fine as is.
Had the -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.