Maths4U
Menu

Maths4U Original · Learn, check, explain

Confidence intervals for the difference in means — 9231 FPS

Estimate a common variance and compare two independent means. Use the normal sampling distribution of an independent mean difference.

Notes and key methods

For independent normal samples with equal unknown population variances, pool the unbiased sample variances: \(\displaystyle s_{p}^{2}= \frac{[(n_{1}- 1)s_{1}^{2}+ (n_{2}- 1)s_{2}^{2}]}{n_{1}+ n_{2}- 2}\).

The standard error of the mean difference is \(\displaystyle s_{p}\sqrt{\frac{1}{n_{1}}+ \frac{1}{n_{2}}}\), and the pooled t statistic uses \(\displaystyle n_{1}+n_{2}-2\) degrees of freedom. A confidence interval for the difference uses the same standard error.

For independent normal samples with known population variances, \(\displaystyle \bar{X}- \bar{Y}\sim N(\mu_{X}- \mu_{Y}, \frac{\sigma_{X}^{2}}{n_{X}}+ \frac{\sigma_{Y}^{2}}{n_{Y}})\).

A test of equal means standardises the observed difference using null mean zero. A confidence interval uses the observed mean difference plus or minus a normal critical value times that same standard error. This differs from a pooled t procedure for unknown variances.

Check the conditions

Three worked examples

Example 1 · Two-sample pooled t inference

Two independent normal populations have a common unknown variance. Sample sizes are 9 and 10, their unbiased variances are 6 and 7, and \(\displaystyle \bar x_1-\bar x_2=\frac{5}{2}\).

Use \(\displaystyle H_{1}: \mu _{1}>\mu _{2}\) and a 5% significance level for the written test conclusion.

  1. Find the pooled variance estimate.
  2. Find the standard error of the mean difference.
  3. Find the t statistic for equal population means.
  4. Find the half-width of a two-sided 95% confidence interval for the mean difference.
Show the reasoning

(a)

\(\displaystyle s_p^2=\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}=\frac{111}{17}\)

Answer: \(\displaystyle \frac{111}{17}\).

(b)

\(\displaystyle \sqrt{s_{p}^{2}(\frac{1}{n_{1}}+ \frac{1}{n_{2}})}= 1.17406617043036\)

Answer: \(1.17406617043036\).

(c)

\(\displaystyle t= \frac{\bar{x}_{1}- \bar{x}_{2}}{S}E= 2.12935187382463\)

Answer: \(2.12935187382463\).

(d)

\(t_{17,0.975}SE=2.47706309578109\)

Answer: \(2.47706309578109\).

With 17 degrees of freedom the upper-tail p-value is \(0.0240692758879551\). Reject \(\displaystyle H_{0}\): the first mean is greater.

Example 2 · Comparing means with known variances

Independent normal samples have sizes 11 and 13, known population variances 6 and 8, and observed \(\displaystyle \bar x-\bar y=\frac{5}{2}\). Test \(H_0:\mu_X=\mu_Y\) against \(H_1:\mu_X>\mu_Y\).

Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.

  1. Find the variance of the sample-mean difference.
  2. Find the observed z statistic.
  3. Find the one-sided p-value.
  4. Find the half-width of a two-sided 95% confidence interval for the mean difference.
Show the reasoning

(a)

\(\displaystyle \frac{\sigma_{X}^{2}}{n_{X}}+ \frac{\sigma_{Y}^{2}}{n_{Y}}= \frac{166}{143}\)

Answer: \(\displaystyle \frac{166}{143}\).

(b)

\(\displaystyle z= \frac{\bar{x}- \bar{y}}{S}E= 2.32035259057289\)

Answer: \(2.32035259057289\).

(c)

\(1-\Phi(z)=0.0101609056635814\)

Answer: \(0.0101609056635814\).

(d)

\(z_{0.975}SE=2.11170922094231\)

Answer: \(2.11170922094231\).

The p-value is \(0.0101609056635814\). Since it is at most 0.05, reject \(\displaystyle H_{0}\): there is evidence that the first population mean is greater than the second. This does not give the probability that \(\displaystyle H_{0}\) is true.

Example 3 · Two-sample pooled t inference

Two independent normal populations have a common unknown variance. Sample sizes are 7 and 12, their unbiased variances are 4 and 6, and \(\displaystyle \bar x_1-\bar x_2=\frac{7}{2}\).

Use \(\displaystyle H_{1}: \mu _{1}>\mu _{2}\) and a 5% significance level for the written test conclusion.

  1. Find the pooled variance estimate.
  2. Find the standard error of the mean difference.
  3. Find the t statistic for equal population means.
  4. Find the half-width of a two-sided 95% confidence interval for the mean difference.
Show the reasoning

(a)

\(\displaystyle s_p^2=\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}=\frac{90}{17}\)

Answer: \(\displaystyle \frac{90}{17}\).

(b)

\(\displaystyle \sqrt{s_{p}^{2}(\frac{1}{n_{1}}+ \frac{1}{n_{2}})}= 1.09429383238536\)

Answer: \(1.09429383238536\).

(c)

\(\displaystyle t= \frac{\bar{x}_{1}- \bar{x}_{2}}{S}E= 3.1984096925509\)

Answer: \(3.1984096925509\).

(d)

\(t_{17,0.975}SE=2.30875817429355\)

Answer: \(2.30875817429355\).

With 17 degrees of freedom the upper-tail p-value is \(0.00263277157273379\). Reject \(\displaystyle H_{0}\): the first mean is greater.

Common mistakes

Practise with answer checking

Original exam-style problems

Write complete solutions before opening the worked solution. The marking guidance rewards reasoning as well as answers.

Examination practice · 2020–2026

Apply the method to recent source-labelled questions from this chapter.

Browse recent examination questions · All topic resources and the full bank

Next skill: End-of-chapter review exercise 9 →