AP Statistics / Unit 4: Inference for Quantitative Data: Means / Topic 4.9
NUM8ERS study notes · Topic 4.9

Setting Up a Test for the Difference Between Two Population Means

Does 11 group have a higher average, a lower average, or simply a different average? Turn that question into a clear two-sample tt-test setup before calculating anything.

2026–27 curriculum4 worked examples8 practice questionsVisuals + model responses

By the end of this lesson, you should be able to:

  • Choose a two-sample tt-test for 22 independent groups with a quantitative response.
  • Define both population means and write the null and alternative hypotheses.
  • Choose the alternative’s direction from the original question.
  • Justify randomization, independence and the sample-size or shape conditions.

Before you start: Review population versus sample means, independent versus paired data, and Topic 4.8: using a confidence interval to justify a claim.

First time learning this? Follow the delivery example, then build the four complete test setups.

Here to revise? Use the setup checklist and attempt the practice questions before revealing solutions.

The concept in 60 seconds

A two-sample tt-test asks whether data from 22 independent groups provide convincing evidence of a difference between their population means. The response must be quantitative, such as time, height or score.

The setup has three jobs: Name the population means, state the competing claims about their difference, and check whether the study supports the test.

The null hypothesis is the starting benchmark: no difference in the population means. The alternative states the difference you are looking for: greater than, less than, or different from 00.

This lesson builds that plan. A sample mean difference alone does not tell you whether the population means differ. The test statistic, pp-value and final decision come in Topic 4.10.

Does service A take longer on average?

A delivery company asks whether service A’s population mean delivery time is longer than service B’s. It independently selects an SRS of 4040 of service A’s 2,0002{,}000 deliveries and an SRS of 3636 of service B’s 1,8001{,}800 deliveries from a defined period.

Delivery sample summaries
ServiceSample sizeSample meanSample SD⁡\operatorname{SD}
A404032 min32 \,\mathrm{min}8 min8 \,\mathrm{min}
B363628 min28 \,\mathrm{min}6 min6 \,\mathrm{min}

Let μA\mu_{A} and μB\mu_{B} be the population mean delivery times, in minutes, for these 22 services during that period. Keep the order A−B\mathrm A-\mathrm B.

H0:μA−μB=0H_{0}: \mu_{A}-\mu_{B} = 0
Ha:μA−μB>0H_{a}: \mu_{A}-\mu_{B} \gt 0

The alternative is positive because the original question asks whether A takes longer. The observed difference, 32−28=4 min32-28=4 \,\mathrm{min}, is a sample result; it is not the value to put in the alternative hypothesis.

The samples are independently selected, each is at most 10%10\% of its delivery population, and both sample sizes are at least 3030. These facts support an independent two-sample tt-test. We have a valid setup, but have not yet calculated the evidence against the null.

Key ideas and notation

Population means: μ1\mu_{1} and μ2\mu_{2}

The unknown average responses for the 22 defined populations. Specify who or what belongs to each population, the response and its units.

μA\mu_{A} is the population mean time for service A’s deliveries during the study period.

Mean difference: Δ\Delta

Δ=μ1−μ2\Delta =\mu_{1}-\mu_{2} is the population parameter being tested. Positive and negative values depend on which group comes first.

Δ=0\Delta =0 means equal population means; it does not mean identical individuals or distributions.

Sample means: xˉ1\bar x_{1} and xˉ2\bar x_{2}

These are calculated from the observed data. Their difference estimates Δ\Delta and later helps measure evidence against H0H_{0}.

Hypotheses concern μ1\mu_{1} and μ2\mu_{2}, not the already observed xˉ1\bar x_{1} and xˉ2\bar x_{2}.

Null and alternative

H0H_{0} states 00 population mean difference. HaH_{a} states the direction or difference the investigation seeks.

Choose HaH_{a} before inspecting the sample outcome.

Independent two-sample tt-test

A test for a difference between 22 population means using 22 independent groups and sample standard deviations because population standard deviations are unknown. The unpooled method allows the population variances to differ.

Choose the method before the hypotheses

Start with the response and how the observations were collected. Having 22 columns of numbers does not automatically mean you have 22 independent samples.

Which means procedure fits the design?
11 groupOne-sample tt-test

Compare 11 population mean with a stated value. Example: mean package weight versus 500 g500 \,\mathrm{g}.

Matched pairsOne-sample tt-test on differences

The same people measured 22 times, or deliberately matched pairs. Compute 11 difference per pair.

22 independent groupsTwo-sample tt-test

Separate groups without within-pair matching. Compare their population mean quantitative responses.

Categorical responseA proportions procedure

Success/failure or yes/no outcomes concern proportions. A test for means does not fit that response.

After choosing a method, check its conditions. This diagram identifies the design; it does not guarantee that inference is valid.

Test or interval?

Use a confidence interval to estimate a population mean difference. Use a hypothesis test to assess evidence against a specified claim. “How much higher?” calls for estimation; “Is there convincing evidence it is higher?” calls for testing.

Why tt, and why unpooled?

In these comparisons, the population standard deviations are unknown and the sample standard deviations estimate them. The tt procedure accounts for that estimation. The usual unpooled two-sample method does not assume equal population variances. Equal-looking sample standard deviations are not a reason to silently switch to a pooled procedure.

Write the null and alternative hypotheses

First define the parameters in a sentence. Then write both hypotheses using the same subtraction order.

H0:μ1−μ2=0H_{0}: \mu_{1}-\mu_{2} = 0
Equivalent form: H0:μ1=μ2H_{0}: \mu_{1} = \mu_{2}

The null includes equality. Choose one alternative from the original question:

Translate the question using group 1 minus group 2
Investigative questionAlternativeType
Is group 1’s population mean higher?μ1−μ2>0\mu_{1}-\mu_{2} > 0One-sided
Is group 1’s population mean lower?μ1−μ2<0\mu_{1}-\mu_{2} < 0One-sided
Are the population means different?μ1−μ2≠0\mu_{1}-\mu_{2} \ne 0Two-sided

A parameter definition that earns its place

“μ1\mu_{1} is group 1” is incomplete. Write: “μ1\mu_{1} is the population mean task-completion time, in seconds, for users of the new interface.” Define μ2\mu_{2} just as precisely for the old interface.

Check the response: For time, “faster” usually means a lower mean. For score, “better performance” may mean a higher mean. Translate the meaning of the measurement, not just a positive-sounding word.

Do not write Ha:μ1−μ2=4H_{a}: \mu_{1}-\mu_{2} = 4 merely because the observed sample difference is 44. A directional claim covers a range of possible population differences, and the population value remains unknown.

Choose the direction from the question

A one-sided alternative looks for a difference in 11 specified direction. A two-sided alternative looks for a difference in either direction. The study question decides this choice before the results are examined.

Read the alternative on a population-difference number line
Alternative population mean difference directions excluding zeroThree population mean difference number lines: greater than zero highlights positive differences, less than zero highlights negative differences, and not equal to zero highlights both sides. Zero is excluded in every alternative. Negative 0 Positive Higher mean: Δ > 0 Negative 0 Positive Lower mean: Δ < 0 Negative 0 Positive Different means: Δ ≠ 0 Alternative hypothesis directions Δ = population mean 1 − population mean 2 Alternative population mean difference directions excluding zeroThree population mean difference number lines: greater than zero highlights positive differences, less than zero highlights negative differences, and not equal to zero highlights both sides. Zero is excluded in every alternative. Negative 0 Positive Higher mean: Δ > 0 Negative 0 Positive Lower mean: Δ < 0 Negative 0 Positive Different means: Δ ≠ 0 Alternative hypothesis directions Δ = population mean 1 − population mean 2

Δ=μ1−μ2\Delta =\mu_{1}-\mu_{2}. These highlighted number-line regions show parameter values allowed by each alternative. They are not pp-values, probability distributions or rejection regions. The open circle excludes 00.

Reversing the subtraction order

If the claim is that A’s mean time is longer, you may write μA−μB>0\mu_{A}-\mu_{B} > 0 or μB−μA<0\mu_{B}-\mu_{A} < 0. Both describe the same claim. Define your order and keep it consistent throughout the test.

Reversing the order changes the signs, including the sign of the later test statistic. It does not change the evidence for the same substantive claim when the alternative is reversed consistently.

Think before revealing: A study asks whether 22 brands have different mean battery lives. The first sample mean happens to be larger. Should the alternative become “greater than”?

Reveal the answer

No. “Different” calls for a two-sided alternative, μ1−μ2≠0\mu_{1}-\mu_{2} \ne 0. Changing to a one-sided test after seeing the result changes the question to favor the observed direction.

Check the conditions separately

Do more than name a checklist. Connect each condition to a fact about the actual study. Check the 22 groups separately where appropriate.

1. Randomization and independent groups

Use 22 independently selected random samples or a properly conducted randomized experiment assigning individuals to 22 independent treatment groups. Repeated measurements on the same people are paired and require a different analysis.

Random sampling supports generalization to the sampled populations. Random assignment supports a causal comparison of treatments. The two serve different purposes. A large convenience sample does not become random simply because it has many observations.

2. The 10%10\% condition when sampling without replacement

n1≤0.10N1n_{1}\le 0.10N_{1} and n2≤0.10N2n_{2}\le 0.10N_{2}

Each sample should be at most 10%10\% of its own population to support treating the sampled observations as approximately independent within that group. For the delivery study: 40≤20040\le 200 and 36≤18036\le 180.

This sampling-without-replacement check is not required merely because a randomized experiment assigns participants to treatments. Do not invent a population size for a random-assignment problem. If a study also uses random sampling, assess that sampling step where relevant.

3. Sample size or distribution shape

The sample-size condition is met if both n1≥30n_{1}\ge 30 and n2≥30n_{2}\ge 30. Alternatively, both populations may be known to be approximately normal.

If either sample has fewer than 3030 observations and population normality is not established, inspect both sample distributions: neither should show strong skewness or outliers. A small sample needs convincing shape evidence; do not claim that an unknown population is normal merely because nn is small.

Small samples: look at both groups
Illustrative new and old interface task-completion sample dotplotsIllustrative dotplots of task-completion times in seconds: 12 new-interface users range from 42 to 55 seconds and 16 old-interface users from 48 to 65 seconds. Both small samples have balanced shapes with no obvious outliers. New interface: n = 12 40 45 50 55 60 65 Task-completion time (seconds) Old interface: n = 16 Inspect both small samples Illustrative data · One dot per user Illustrative new and old interface task-completion sample dotplotsIllustrative dotplots of task-completion times in seconds: 12 new-interface users range from 42 to 55 seconds and 16 old-interface users from 48 to 65 seconds. Both small samples have balanced shapes with no obvious outliers.
Posted on Google Google
0000003998 : Abdad Alam Shamim Alam profile picture
0000003998 : Abdad Alam Shamim Alam
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
This is the bestest institution I have ever come to and I love it very much.
Posted on Google Google
Aliki S profile picture
Aliki S
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Ali profile picture
Ali
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Sly is him
Posted on Google Google
Jitendra Kumar Kumawat profile picture
Jitendra Kumar Kumawat
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Raahil Hasan profile picture
Raahil Hasan
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Tina Mudarres profile picture
Tina Mudarres
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
The classes are amazing and my child learnt so much
Posted on Google Google
alisha gadoya profile picture
alisha gadoya
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
I have experienced a lot of good things, it has taught me so many things and from B/Cs I have gone to an A! This is wonderful and Mavish’s class is awesome.
Posted on Google Google
smasher 123 profile picture
smasher 123
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
It’s sensational my kid went. First he only would get C now it’s all A’s really good and recommend
Posted on Google Google
Mosa Al- Samaraie profile picture
Mosa Al- Samaraie
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
AMAZING PRICES GREAT TEACHERS STRAIGHT FORWARD LEARNING STEADY PACE IN TUTORING
Posted on Google Google
Cael Dagnelie profile picture
Cael Dagnelie
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
I had a great experience learning math with Ms. Mavish. She explains complex topics in a very clear and simple way, which made it easier for me to understand and enjoy the subject. Her patience and dedication really stood out, and she always made sure that everyone in the class was keeping up. I especially appreciated how approachable she was — I never felt afraid to ask questions, and she was always willing to help. Thanks to her teaching, my confidence in math has grown a lot. I’m really thankful for the effort she puts into every lesson!

NUM8ERS is one of finest tutoring institutes in UAE, Located in Al Barsha 1, Dubai. Close to DUBAI AMERICAN ACADEMY (DAA) & AMERICAN SCHOOL OF DUBAI (ASD).