Try each one on paper first, then check a single step. That is worth far more than reading a finished solution.
Example 1 — a two-tailed z-test
A machine fills bottles to 500 ml with σ=20. A sample of 40 has mean 508 ml. Test at the 5% level whether the mean has changed.
- 1H0:μ=500; H1:μ=500"Changed" gives no direction, so the test is two-tailed.
- 2α=0.05, so the critical values are ±1.96.2.5% in each tail.
- 3SE =4020=3.162
- 4z=3.162508−500=2.53
- 52.53>1.96, so the statistic lies in the critical region.
- 6Reject H0: at the 5% level there is evidence the mean fill volume has changed from 500 ml.Conclusion must name the context and the level.
Example 2 — the same test by p-value
For the bottle-filling test above, find the p-value and reach a conclusion.
- 1The p-value is the probability of a result at least as extreme, assuming H0.
- 2P(Z>2.53)=1−Φ(2.53)=0.0057The upper tail.
- 3The test is two-tailed, so double it.A result equally far below 500 would be just as surprising.
- 4p=2(0.0057)=0.0114
- 50.0114<0.05, so reject H0.The same conclusion as the critical-value method, as it must be.
Example 3 — the two kinds of error
A quality control test has H0: the batch meets specification. Describe the two error types and their consequences.
- 1Type I: rejecting H0 when it is true.A good batch is scrapped — a false alarm.
- 2Its probability is exactly α, the significance level you choose.
- 3Type II: failing to reject H0 when it is false.A defective batch is shipped — a missed detection.
- 4Its probability β depends on how far from specification the batch really is.A badly wrong batch is easy to catch; a marginal one is not.
- 5Lowering α reduces Type I errors but raises β.Only a larger sample reduces both at once.