All subjects · Mathematics · WST03 Statistics 3

Difference between two means (known variances)

Edexcel IAL Mathematics · WST03 Statistics 3

To compare two populations, look at the difference between the sample means. If both populations are normal with known variances, this difference is exactly normal.

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

The distribution

For independent random samples of sizes nx and ny from N(μx, σx2) and N(μy, σy2):

X̄ - Ȳ ~ N(μx - μy, σx2/nx + σy2/ny).

The variances add (it is a difference of independent variables), each divided by its own sample size.

The test

H0: μx = μy (or μx - μy = d), H1: μx > μy, μx < μy or μx ≠ μy. Define the subscripts.

Test statistic: z = ((x̄ - ȳ) - (μx - μy)) / sqrt(σx2/nx + σy2/ny), where μx - μy is the value in H0 (often 0).

Compare with the percentage points (4 d.p.) and conclude in context.

Confidence interval for the difference

(x̄ - ȳ) ± z sqrt(σx2/nx + σy2/ny).

If the interval contains 0, there is no evidence (at that level, two-tailed) of a difference between the means.

Assumptions: the two samples are independent random samples and the populations are normal (or the samples are large).

Worked example

Plot yields with fertiliser A are N(μA, 2.42) and with B are N(μB, 2.12). Samples of 30 and 25 plots have means 21.6 and 20.4. Test at 5% whether A gives a higher mean yield.

  1. H0: μA = μB, H1: μA > μB.
  2. Standard error = sqrt(2.42/30 + 2.12/25) = 0.6070
  3. z = 1.2/0.6070 = 1.9771
  4. 1.977 > 1.6449: reject H0.

Answer: There is evidence that fertiliser A gives a higher mean yield than B.

Key idea: X̄ - Ȳ ~ N(μx - μy, σx2/nx + σy2/ny). Test with z = ((x̄ - ȳ) - d)/standard error; interval (x̄ - ȳ) ± z × standard error.

Check yourself

  1. Samples of 30 and 25 are taken from N(μA, 2.42) and N(μB, 2.12). Find the standard error of X̄A - X̄B. Give your answer to 3 significant figures.
    Show answer

    0.607. sqrt(5.76/30 + 4.41/25) = 0.6070.

  2. Samples of 30 and 25 from N(μA, 2.42) and N(μB, 2.12) have means 21.6 and 20.4. Calculate the test statistic for H0: μA = μB. Give your answer to 3 significant figures.
    Show answer

    1.98. 1.2/0.6070 = 1.9771.

  3. Samples of 30 and 25 from N(μA, 2.42) and N(μB, 2.12) have means 21.6 and 20.4. Find the lower limit of a 95% confidence interval for μA - μB. Give your answer to 2 decimal places.
    Show answer

    0.01. 1.2 - 1.96 × 0.6070 = 0.0104.

  4. With the same data, test H0: μA - μB = 1 against H1: μA - μB > 1. Calculate the test statistic. Give your answer to 3 significant figures.
    Show answer

    0.330. (1.2 - 1)/0.6070 = 0.3295.

  5. H0: μA = μB, H1: μA > μB at the 5% level gives z = 1.977. Which conclusion is correct?
    • Reject H0: there is evidence that the mean yield with A is greater than with B
    • Do not reject H0: the yields are the same
    • Reject H0: the yields are the same
    • Do not reject H0: A gives a greater yield
    Show answer

    Reject H0: there is evidence that the mean yield with A is greater than with B. 1.977 > 1.6449, so significant; conclude in context with the direction.

  6. A 95% confidence interval for μx - μy is (-0.4, 2.1). What does this suggest?
    • μx is definitely greater than μy
    • μx - μy = 0.85 exactly
    • There is no evidence at the 5% level of a difference between the means
    • The samples were not independent
    Show answer

    There is no evidence at the 5% level of a difference between the means. 0 is inside the interval, so a difference of 0 is plausible.

  7. Which is a required assumption for this test with small samples?
    • Each population is normally distributed
    • The two samples have the same size
    • The sample means are equal
    • The two populations have the same mean
    Show answer

    Each population is normally distributed. With small samples, normal populations are needed for X̄ - Ȳ to be normal; the samples must also be independent.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.