Hypothesis testing for 1 and 2 samples — Edexcel A-Level Statistics
Hypothesis testing for 1 and 2 samples explained
Hypothesis testing for 1 and 2 samples covers 5 specification points, including Mean of a normal distribution with unknown… and Difference of two.
Read the full explanation
Open a point below for its explanation and revision guidance.
mean of a normal distribution with unknown variance using the t-distribution
When a single sample is modelled as coming from a normal distribution whose variance is unknown, the sample variance s² replaces σ² and the test statistic follows a t-distribution with n − 1 degrees of freedom. You first state H₀ and H₁ about the population mean μ, choose a significance level, then compute t = (x̄ − μ₀)/(s/√n), where x̄ is the sample mean, μ₀ the hypothesised mean, s the sample standard deviation and n the sample size. Compare t with the critical value from tₙ₋₁ for the correct tail, or use the p-value. For a two-tailed test at 5% with n = 16, df = 15 and the critical values are approximately ±2.131. Reject H₀ when the statistic lies beyond the critical value or the p-value is below the significance level, and write the conclusion in context.
difference of two means for two independent normal distributions with known variances
For two independent normal populations with known variances σ₁² and σ₂², the difference of sample means x̄₁ − x̄₂ is normally distributed with mean μ₁ − μ₂ and variance σ₁²/n₁ + σ₂²/n₂. To test H₀: μ₁ − μ₂ = d₀, compute z = ((x̄₁ − x̄₂) − d₀)/√(σ₁²/n₁ + σ₂²/n₂). The standard normal distribution gives critical values or p-values; no t-distribution is used because the variances are known. For example, with σ₁² = 4, n₁ = 25, σ₂² = 9, n₂ = 36, the standard error is √(4/25 + 9/36) = √(0.16 + 0.25) = √0.41 ≈ 0.640. Compare z with the critical value for the chosen tail(s) and significance level, then interpret the decision in context.
difference of two means for two independent normal distributions with unknown but equal variances
This topic covers testing a claim about the difference between two population means when you have two independent samples drawn from normal distributions. The population variances are unknown, but you assume they are equal. Because the common variance is unknown, you estimate it by pooling the two sample variances, weighting each by its degrees of freedom: s²p = [(n₁ − 1)s₁² + (n₂ − 1)s₂²] / (n₁ + n₂ − 2). The test statistic is t = [(x̄₁ − x̄₂) − d₀] / √(s²p(1/n₁ + 1/n₂)), where d₀ is the hypothesised difference, often 0. Compare t with the t-distribution on n₁ + n₂ − 2 degrees of freedom. For a two-tailed test at 5%, reject H₀ when |t| exceeds the critical value; for a one-tailed test, compare t with the appropriate one-sided critical value. Always state H₀ and H₁ in terms of μ₁ − μ₂, check the independence and normality assumptions, and interpret the conclusion in context.
difference between two binomial proportions
This topic covers testing whether two independent binomial populations have the same proportion of successes. You take a sample of size n₁ from the first population with x₁ successes, and a sample of size n₂ from the second with x₂ successes. The sample proportions are p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂. Under the null hypothesis H₀: p₁ = p₂, you estimate the common proportion by pooling: p̂ = (x₁ + x₂)/(n₁ + n₂). The standard error is √[p̂(1 − p̂)(1/n₁ + 1/n₂)]. The test statistic is z = (p̂₁ − p̂₂) / √[p̂(1 − p̂)(1/n₁ + 1/n₂)], compared with the standard normal distribution. This normal approximation is valid when the expected counts are sufficiently large, typically n₁p̂, n₁(1 − p̂), n₂p̂ and n₂(1 − p̂) all at least 5. For a two-tailed test at 5%, reject H₀ when |z| > 1.96; for a one-tailed test, use the appropriate one-sided critical value.
interpret results for these tests in context.
Interpretation means translating the numerical outcome of a one-sample or two-sample hypothesis test back into the real situation described in the question. After computing the test statistic and p-value (or comparing with the critical region), you decide whether there is sufficient evidence to reject the null hypothesis at the stated significance level, then state what that decision means for the population parameter or difference being studied. For a one-sample test on a mean, say whether the population mean differs from (or is greater/less than) the hypothesised value; for a two-sample test, say whether there is evidence of a difference between the two population means. Always link the conclusion to the measured variable and its units, and acknowledge the uncertainty: failing to reject does not prove the null is true.
Your focus
- Set up a one-sample t-test for a normal mean with unknown variance, including H₀, H₁ and significance level.
- Calculate the t-statistic using the sample mean, hypothesised mean, sample standard deviation and sample size.
- Use t-tables or technology to find critical values or p-values with n − 1 degrees of freedom and reach a justified conclusion.
Show all 15 objectives
- Set up a two-sample z-test for the difference of means when both population variances are known.
- Calculate the standard error and test statistic for the difference of two independent sample means.
- Use the standard normal distribution to find critical values or p-values and interpret the result in context.
- State null and alternative hypotheses about the difference of two population means.
- Calculate the pooled variance and the t test statistic for two independent samples with equal unknown variances.
- Interpret the test result in context using the t-distribution with n₁ + n₂ − 2 degrees of freedom.
- State null and alternative hypotheses about the difference between two binomial proportions.
- Calculate the pooled proportion and the z test statistic for comparing two proportions.
- Check the validity conditions and interpret the test result in context using the standard normal distribution.
- State a decision to reject or not reject the null hypothesis that is consistent with the calculated test result and the stated significance level.
- Translate that decision into a contextual conclusion about the relevant population mean or difference between population means, including direction and units.
- Explain the role of the significance level and express the conclusion with appropriate uncertainty rather than as proof.
Hypothesis testing for 1 and 2 samples exam tips
Marking Points
- State H₀ and H₁ in terms of the population mean μ, choosing a one-tailed or two-tailed alternative appropriate to the question.
- Recognise that σ is unknown, so the sample standard deviation s is used and the test statistic has a t-distribution with n − 1 degrees of freedom.
- Calculate the test statistic as t = (x̄ − μ₀)/(s/√n), keeping the correct order in the numerator and dividing by the standard error s/√n.
- Obtain the critical value or p-value from the t-distribution with n − 1 degrees of freedom and the chosen significance level, matching the tail(s) of H₁.
- Compare the test statistic with the critical value, or the p-value with the significance level, and state the decision to reject or not reject H₀.
- Write the conclusion in the context of the original variable, making clear what the evidence does or does not support about the mean.
- State H₀ and H₁ about the difference of population means μ₁ − μ₂, including any hypothesised difference d₀ and the correct tail(s).
- Recognise that the two samples are independent and that both population variances are known, so the test statistic follows a standard normal distribution.
- Calculate the standard error of the difference as √(σ₁²/n₁ + σ₂²/n₂), using the correct variances and sample sizes.
- Compute the test statistic z = ((x̄₁ − x̄₂) − d₀)/√(σ₁²/n₁ + σ₂²/n₂), keeping the order of subtraction consistent with H₁.
- Compare z with the standard normal critical value, or compare the p-value with the significance level, and state the decision.
- Interpret the conclusion in the context of the two populations, making clear what the evidence shows about the difference of means.
- States H₀ and H₁ correctly in terms of μ₁ − μ₂, for example H₀: μ₁ − μ₂ = 0 and H₁: μ₁ − μ₂ ≠ 0 for a two-tailed test.
- Calculates the pooled variance using s²p = [(n₁ − 1)s₁² + (n₂ − 1)s₂²] / (n₁ + n₂ − 2), showing the degrees of freedom n₁ + n₂ − 2.
- Computes the test statistic t = [(x̄₁ − x̄₂) − d₀] / √(s²p(1/n₁ + 1/n₂)) with correct substitution.
- Compares the calculated t-value with the critical value from the t-distribution on n₁ + n₂ − 2 degrees of freedom, or compares the p-value with the significance level.
- Draws a conclusion in context, referring to the original claim about the difference of means and the direction of any difference.
- States H₀ and H₁ correctly in terms of p₁ and p₂, for example H₀: p₁ = p₂ and H₁: p₁ ≠ p₂ for a two-tailed test.
- Calculates the sample proportions p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂ and the pooled proportion p̂ = (x₁ + x₂)/(n₁ + n₂).
- Computes the test statistic z = (p̂₁ − p̂₂) / √[p̂(1 − p̂)(1/n₁ + 1/n₂)] with correct substitution.
- Checks the validity condition that the expected counts n₁p̂, n₁(1 − p̂), n₂p̂ and n₂(1 − p̂) are all at least 5.
- Compares the calculated z-value with the critical value from the standard normal distribution, or compares the p-value with the significance level, and concludes in context.
- Correctly states the decision: reject H₀ or do not reject H₀, consistent with the computed p-value compared with the significance level (or the test statistic compared with the critical value).
- Interprets the decision in the context of the original problem, naming the population parameter (for example the population mean or the difference between two population means) and the variable with its units.
- For a one-sample test, states whether there is evidence that the population mean differs from, exceeds or is below the hypothesised value, matching the direction of the alternative hypothesis.
- For a two-sample test, states whether there is evidence of a difference between the two population means, again matching the direction of the alternative hypothesis.
- Communicates the uncertainty appropriately: a non-significant result means insufficient evidence of a difference, not proof that the null hypothesis is true.
- Refers to the significance level used and makes clear the conclusion applies to the population, not merely to the sample data.
Exam tips
- 💡Write down H₀, H₁, the significance level and the degrees of freedom before calculating, so the method is clear and easy to follow.
- 💡Show the substitution into t = (x̄ − μ₀)/(s/√n) with the values you use, then give the test statistic to an appropriate accuracy.
- 💡State the critical value or p-value with its source (t-distribution, n − 1 df) and finish with a conclusion in context, not just 'reject H₀'.
- 💡Write H₀ and H₁ in terms of μ₁ − μ₂ and note that the variances are known, so the standard normal distribution applies.
- 💡Show the calculation of the standard error √(σ₁²/n₁ + σ₂²/n₂) before substituting into the z formula.
- 💡State the critical value or p-value from the standard normal distribution and finish with a contextual conclusion about the difference of means.
- 💡Write down H₀ and H₁ before any calculation, defining μ₁ and μ₂ clearly in the context of the question.
- 💡Show the pooled variance calculation explicitly so the method is visible even if an arithmetic slip occurs.
- 💡State the degrees of freedom and the critical value or p-value, then give a clear contextual conclusion that answers the original claim.
- 💡Define p₁ and p₂ clearly in context and state H₀ and H₁ before calculating.
- 💡Show the pooled proportion and the standard error calculation step by step to make the method clear.
- 💡State the critical value or p-value and write a conclusion that refers back to the original claim about the two proportions.
- 💡Write the conclusion as a full sentence that names the population parameter, the direction of the evidence and the significance level, for example 'At the 5% level there is evidence that the population mean ... is greater than ...'.
- 💡Check the direction of your conclusion against the alternative hypothesis before finishing; a two-tailed alternative needs a 'differs from' statement, while a one-tailed alternative needs 'greater than' or 'less than'.
- 💡If the result is not significant, explicitly say there is insufficient evidence of a difference or effect, and avoid any wording that suggests the null hypothesis has been proved.
Common Mistakes
- Using the normal distribution with σ known when the variance is unknown: the correct approach is to use s and the t-distribution with n − 1 degrees of freedom.
- Dividing by s instead of s/√n in the denominator: the standard error of the sample mean is s/√n, so the statistic is t = (x̄ − μ₀)/(s/√n).
- Using n degrees of freedom instead of n − 1: for a one-sample t-test the degrees of freedom are n − 1.
- Choosing a one-tailed critical value when H₁ is two-tailed, or vice versa: the tail(s) of the test must match the alternative hypothesis.
- Using a t-distribution when both variances are known: with known variances the correct distribution is the standard normal.
- Adding the standard deviations instead of the variances: the variance of the difference is σ₁²/n₁ + σ₂²/n₂, so the standard error is its square root.
- Forgetting to divide each variance by its sample size: each term must be σ²/n before adding.
- Reversing the order of subtraction in the numerator without adjusting H₁: the sign of z must match the direction stated in the alternative hypothesis.
- Using the separate variances formula instead of pooling: the equal-variance assumption requires the pooled estimate s²p, not the unpooled standard error.
- Forgetting to subtract the hypothesised difference d₀ in the numerator; when testing a non-zero difference, the numerator must be (x̄₁ − x̄₂) − d₀.
- Using the wrong degrees of freedom, such as n₁ + n₂ − 1 or the smaller of n₁ − 1 and n₂ − 1, instead of n₁ + n₂ − 2.
- Using the unpooled standard error √[p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂] when the null hypothesis assumes equal proportions; the pooled estimate is required.
- Forgetting to check the normality condition that all four expected counts are at least 5, which is needed for the z approximation to be valid.
- Confusing the sample proportions p̂₁ and p̂₂ with the population proportions p₁ and p₂ in the hypotheses or conclusion.
- Saying the null hypothesis is 'accepted' or 'proved' when the test is not significant. Correction: say there is insufficient evidence to reject H₀; the test has not demonstrated that H₀ is true.
- Giving a conclusion only about the sample, such as 'the sample mean is bigger', rather than about the population parameter. Correction: phrase the conclusion in terms of the population mean or the difference between population means.
- Rejecting H₀ when the p-value is greater than the significance level, or confusing a one-tailed with a two-tailed comparison. Correction: compare the p-value with the significance level carefully and check the direction required by the alternative hypothesis.
- Omitting context, units or the direction of the alternative hypothesis, so the interpretation could apply to any test. Correction: name the variable, its units and the specific direction of the evidence.