Hypothesis Testing for Population Mean
Key Terms
- H0 (null hypothesis)
- the status quo claim, typically μ = μ0.
- H1 (alternative hypothesis)
- what we test for. Two-tailed: μ ≠ μ0; one-tailed: μ > μ0 or μ < μ0.
- Test statistic
- z = (x̄ − μ0) / (σ/√n), computed from sample data.
- p-value
- probability of observing a test statistic at least as extreme as the computed z, assuming H0 is true.
- Decision rule
- reject H0 if p-value < α (the significance level).
- Always state the conclusion in the context of the problem.
- State H0 and H1 with the significance level α.
- Compute the test statistic: z = (x̄ − μ0) / (σ/√n).
- Find the p-value (one-tailed or two-tailed as appropriate).
- Compare p-value to α. If p < α, reject H0.
- State a conclusion in context.
p-values by tail type:
- Two-tailed (H1: μ ≠ μ0): p = 2P(Z ≥ |z|)
- Upper-tail (H1: μ > μ0): p = P(Z ≥ z)
- Lower-tail (H1: μ < μ0): p = P(Z ≤ z)
Worked Example — One-Sample z-Test (Two-Tailed)
A company claims its product weighs μ = 500 g. A sample of n = 36 gives x̄ = 496 g. Population σ = 12 g. Test at α = 0.05.
H0: μ = 500. H1: μ ≠ 500 (two-tailed).
z = (496 − 500)/(12/√36) = −4/2 = −2.0.
p-value = 2P(Z ≤ −2.0) = 2(0.0228) = 0.0456.
Since p = 0.0456 < α = 0.05, reject H0.
Conclusion: There is sufficient evidence at the 5% significance level to conclude that the true mean weight differs from 500 g.
The Logic of Hypothesis Testing
Hypothesis testing provides a formal framework for making decisions about a population parameter based on sample data. We begin with a null hypothesis H0 that represents the status quo or “no effect” claim. We then ask: if H0 were true, how likely would we be to observe data as extreme as what we actually saw?
If the answer is “very unlikely” (i.e., the p-value is small), we reject H0 in favour of the alternative hypothesis H1. If the data are consistent with H0, we fail to reject it — but we do not “prove” it true.
Setting Up Hypotheses
The null hypothesis H0 always contains an equality (=). The alternative H1 depends on the context:
- Two-tailed test: H1: μ ≠ μ0. Used when we are testing whether the mean has changed (in either direction).
- One-tailed (upper): H1: μ > μ0. Used when we suspect the mean is higher than claimed.
- One-tailed (lower): H1: μ < μ0. Used when we suspect the mean is lower than claimed.
The choice of tail should be determined by the research question before looking at the data. Choosing the tail after seeing x̄ is invalid (it inflates the Type I error rate).
The Test Statistic
For a one-sample z-test (population σ known, large n):
z = (x̄ − μ0) / (σ/√n)
This z-score measures how many standard errors x̄ is from the hypothesised mean μ0. Under H0, z follows a standard normal distribution.
The p-Value
The p-value is the probability of obtaining a test statistic as extreme as (or more extreme than) the observed z, given that H0 is true. A small p-value means the observed data would be very unusual if H0 were true, providing evidence against H0.
Common thresholds: α = 0.05 (5%) is most common; α = 0.01 (1%) is stricter; α = 0.10 (10%) is more lenient.
Critical Region Approach
An alternative to the p-value is the critical region (rejection region) approach. For a two-tailed test at α = 0.05, reject H0 if |z| > 1.96. This is equivalent to the p-value approach and gives the same conclusion.
Conclusion Format
Always state the conclusion in the context of the problem. The conclusion should include: the decision (reject or fail to reject H0), the significance level (α), and the practical meaning in context. Avoid mathematical jargon in the final sentence.
Mastery Practice
-
Calculate the test statistic. Fluency
H0: μ = 50, H1: μ ≠ 50. Sample results: x̄ = 53, σ = 10, n = 25. Calculate the z test statistic.
-
Find p-value and conclude. Fluency
For Q1 (z = 1.5, two-tailed test), find the p-value and state the conclusion at α = 0.05.
-
One-tailed test. Fluency
A supplier claims mean weight μ = 200 g. A sample of n = 40 gives x̄ = 196 g with σ = 15 g. Test H0: μ = 200 vs H1: μ < 200 at α = 0.05.
-
State hypotheses in context. Fluency
State appropriate H0 and H1 for the following: “A new drug is claimed to reduce blood pressure by more than 10 points on average. Test this claim against the null that the reduction is exactly 10 points.”
-
Two-tailed test at α = 0.01. Understanding
x̄ = 75, μ0 = 70, σ = 20, n = 100. Find z and the p-value. What is your conclusion at α = 0.01?
-
Find two-tailed p-value from z. Understanding
A hypothesis test gives z = −2.3. Find the two-tailed p-value. Would you reject H0 at α = 0.05?
-
Failing to reject H0. Understanding
Explain why failing to reject H0 does not mean H0 is true.
-
Agricultural yield test. Understanding
A farmer tests whether a new irrigation system increases yield above the historical mean of μ = 4.5 t/ha. 64 plots give x̄ = 4.8 t/ha with σ = 1.2 t/ha. Test at α = 0.05.
-
Critical values and rejection region. Problem Solving
Find the critical z-values for a two-tailed test at α = 0.01. For what values of x̄ would you reject H0: μ = 100, given n = 49 and σ = 14?
-
Effect of significance level on conclusion. Problem Solving
A study tests whether exam scores improved after a new teaching method. 80 students: x̄ = 72, historical μ = 68, σ = 18. Test at both α = 0.05 and α = 0.01. Discuss the effect of α on the conclusion.