Hypothesis test: z test and t test
A test checks whether the data speak against the null hypothesis H₀ by comparing a test statistic with a critical value.
Formulas
- 1. State H₀ and H₁, choose α
- 2. Test statistic: z = (x̄ − μ₀) / (σ / √n) or t = (x̄ − μ₀) / (s / √n)
- 3. Compare with the critical value (two-sided |z|, one-sided only in the direction of H₁)
- 4. Decide: reject or do not reject H₀
Your turn
Three problems on this topic. Comma or point, fractions like 1/6 work too.
Task
A maker claims μ = 100. A sample of n = 100 gives x̄ = 98.27; σ = 10 is known. Test H₀: μ = 100 two-sided at α = 5% (critical value 1.96).
Test statistic z (2 decimal places)
Decision
Comma or point; fractions like 1/6 work too.
Worked example
A maker claims μ = 50. A sample of n = 49 gives x̄ = 50.89; σ = 5 is known. Test H₀: μ = 50 two-sided at α = 5% (critical value 1.96).
Worked solution
- 1.z = (x̄ − μ₀) / (σ / √n) = (50.89 − 50) / (5 / 7) = 1.25
- 2.|z| = 1.25 ≤ 1.96 → do not reject H₀
Typical mistake: Reading "do not reject H₀" as "H₀ is proven".
Test whether mean study time exceeds 20 minutes (H₀: μ ≤ 20, H₁: μ > 20). Sample: n = 36, x̄ = 21.16, s = 5. α = 5%, critical value t = 1.690.
Worked solution
- 1.t = (x̄ − μ₀) / (s / √n) = (21.16 − 20) / (5 / 6) = 1.39
- 2.t = 1.39 ≤ 1.690 → do not reject H₀
Typical mistake: Comparing |t| in a one-sided test; for H₁: μ > μ₀ only large positive values count.
Frequently asked questions
What is a type I error?
Rejecting H₀ although it is true; its probability is at most α.
