Menu
Sign up Sign in

AI HL · 13.4

Hypothesis Testing

13.4.6

Two-sample pooled t-test

13.4.6

Two-sample pooled t-test

Target: I can say when to use a two-sample pooled t-test and state its two assumptions. (+3 more)

By the end of this section

Key points

When to use the test

  • Use a two-sample t-test to compare the means of two populations, using two independent samples. The samples need not be the same size.
  • Assume both populations are normally distributed and have equal variance. State both assumptions.
  • Because the variances are assumed equal, the calculator combines (pools) the two sample variances. Choose the pooled option.

Hypotheses

  • H0: μ1 = μ2. The two population means are equal.
  • H1: μ1 ≠ μ2 (different), μ1 > μ2 (greater) or μ1 < μ2 (less). Group 1 is the group named first in the claim.
  • Say in words what μ1 and μ2 are: "μ1 is the population mean time for adults."

Carrying out the test

  • From summary statistics, enter n, the sample mean and the standard deviation estimate s for each group. If you are given a variance, take its square root.
  • From data, enter each sample in its own list.
  • Choose pooled, and the tail that matches H1. Read t and the p-value.
  • Reject H0 if p < α. For a two-tailed test compare p with α, not α/2.

The conclusion

  • Write it in context, naming both groups: "There is sufficient evidence, at the 5% significance level, that the mean mark is higher with the new method."
  • If p > α, say "insufficient evidence". Do not say the means are equal.
  • A significant result does not show a cause. It shows that the sample means differ by more than chance would explain.

On the calculator

Two-sample t-test from summary statistics

  • Choose the two-sample t-test with statistics.
  • Enter n, the sample mean and s for each group.
  • Choose pooled: yes, and the tail from H1.
  • Read t and the p-value.

Screenshot and video to come

Two-sample t-test from two data lists

  • Enter each sample in its own list. The lists can be different lengths.
  • Choose the two-sample t-test with lists, pooled, and the tail from H1.
  • Read t and the p-value.

Screenshot and video to come

Explore: t-tests for means

Each dot is one value. Drag the orange marker under a sample to move it, and the teal point at the end of its bracket to change how spread out it is. The curve below is the t distribution: the orange area is the p-value.

Sample means
Estimates of σ
Pooled estimate, sₚ
Degrees of freedom
t
p-value for H₁:

The test assumes the population (for a paired test, the differences) is normally distributed; two samples also need equal variances. The markers move with the mouse, a finger, or the arrow keys once selected (Tab).

Drag a marker to start.

  1. Drag the orange marker until the sample mean equals the value in H₀ (or the two means are equal). What are t and the p-value? Why?
  2. Keep the means where they are and drag a teal point to make the sample less spread out. What happens to t and to the p-value? Why does the spread matter as much as the difference?
  3. Choose H₁ in the other direction from the sample. Why does the p-value become large?
  4. In Paired, each dot is one person's change. Why is testing these differences better than treating the before and after values as two samples?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Which test, and what must be assumed?

A coach times 12 swimmers who trained in the morning and 15 different swimmers who trained in the evening, and wants to compare the mean 100 m times of the two groups. Name the test to use and state its assumptions.

Working
  1. Two separate samples

    12 morning swimmers and 15 evening swimmers

    Different people in each group, so the samples are independent. They need not be the same size.

  2. The test

    Two-sample t-test, pooled

    It compares two population means. 'Pooled' means the two sample variances are combined into one estimate.

  3. Assumptions

    Both populations are normally distributed. The two populations have equal variance.

    State both. In this course the pooled test always assumes equal variance.

Video walkthrough coming
Hypotheses for two means

A teacher thinks that students who revise with flashcards (group 1) score higher on average than students who revise with notes (group 2). In the samples, the mean scores are 71.4 and 67.2. State the null and alternative hypotheses, defining μ1 and μ2.

Working
  1. Define the means

    μ1 is the population mean score of students who revise with flashcards. μ2 is the population mean score of students who revise with notes.

    Say which group is 1 and which is 2, and say 'population mean'.

  2. H0

    H0: μ1 = μ2

    H0 says the two population means are equal. The sample means 71.4 and 67.2 are not used.

  3. H1

    H1: μ1 > μ2

    The teacher thinks flashcards give higher scores, so H1 is one-tailed with group 1 first.

Video walkthrough coming
A one-tailed test from summary statistics

A gardener grows tomato plants with fertiliser A (group 1) and fertiliser B (group 2). The heights, in cm, of random samples are summarised. She thinks that fertiliser A gives a greater mean height. Stating any assumptions, test her belief at the 5% significance level.

GroupnSample meanEstimate of sFertiliser A1825.43.1Fertiliser B2222.93.6
Working
  1. Test and assumptions

    Two-sample pooled t-test. Both populations are normally distributed. The two populations have equal variance.

    Two independent samples and an unknown variance, assumed equal.

  2. Hypotheses

    H0: μ1 = μ2, H1: μ1 > μ2, where μ1 and μ2 cm are the population mean heights with fertiliser A and B.

    She thinks A gives the greater mean.

  3. From the calculator

    Two-sample t-test with statistics, pooled: t = 2.32, p = 0.0128

    Enter n, the sample mean and the estimate of s for each group. Choose pooled and the upper tail.

  4. Compare

    0.0128 < 0.05, so reject H0.

    Compare p with 0.05.

  5. In context

    There is sufficient evidence, at the 5% significance level, that the mean height of tomato plants is greater with fertiliser A than with fertiliser B.

    Say which fertiliser gives the greater mean.

Video walkthrough coming
A two-tailed test

The journey times, in minutes, of random samples of buses on route X (group 1) and route Y (group 2) are summarised. Assume the times are normally distributed with equal variance. Test, at the 5% significance level, whether the mean journey times on the two routes are different.

GroupnSample meanEstimate of sRoute X1541.25.6Route Y2039.96.1
Working
  1. Hypotheses

    H0: μ1 = μ2, H1: μ1 ≠ μ2

    'Different' is two-tailed.

  2. From the calculator

    Two-sample t-test with statistics, pooled: t = 0.646, p = 0.523

    Choose the two-tailed option.

  3. Compare

    0.523 > 0.05, so do not reject H0.

    p is well above 0.05.

  4. In context

    There is insufficient evidence, at the 5% significance level, that the mean journey times on the two routes are different.

    The sample means differ, but the difference is small compared with the spread.

Video walkthrough coming
A test from two data lists

Reaction-time scores (higher is better) are recorded for 6 students after a normal night's sleep (group 1) and 7 students after a short night's sleep (group 2). The results are shown. Assume the scores are normally distributed with equal variance. Test, at the 5% significance level, whether the mean score after a normal night's sleep is less than after a short night's sleep.

Sample1234567Normal sleep847991878288Short sleep92958897909499
Working
  1. Hypotheses

    H0: μ1 = μ2, H1: μ1 < μ2, where μ1 and μ2 are the population mean scores after a normal and a short night's sleep.

    The test asks whether group 1 has the lower mean.

  2. Enter the lists

    Two-sample t-test, lists, pooled, lower tail: t = −3.69, p = 0.00179

    Put each sample in its own list. The lists can be different lengths.

  3. Compare

    0.00179 < 0.05, so reject H0.

    Compare p with 0.05.

  4. In context

    There is sufficient evidence, at the 5% significance level, that the mean score after a normal night's sleep is less than after a short night's sleep.

    A negative t-statistic fits H1: the sample mean of group 1 is lower.

Video walkthrough coming