StatisticsComparing Two Groups6 of 6
Comparing Two Groups · 6

Choosing the Right Procedure

Once we know how to calculate zz- and tt-intervals and tests, the hardest part on a mixed exam is reading a word problem and deciding which procedure to use.

1

Proportion or Mean: What Goes on the Clipboard?

First, we want to know whether a problem is about a proportion (which uses zz) or a mean (which uses tt). Instead of looking at the summary numbers in the paragraph, picture walking up to a single person in the study with a clipboard and asking what you write down in their row.

Proportion or Mean: What Goes on the Clipboard?
Did you get at least 7 hours\text{Did you get at least 7 hours}
of sleep last night?\text{of sleep last night?}
Person 1\text{Person 1}
?\text{?}
How many hours did you sleep\text{How many hours did you sleep}
last night?\text{last night?}
Person 1\text{Person 1}
?\text{?}

What goes in a single row on the clipboard decides both the parameter and the distribution because of how the spread behaves. In a Yes/No column, nobody can answer "Triple Yes," so knowing the proportion of Yeses automatically sets the spread and lets us use the zz-distribution. In a column of measurements, knowing the average is 7.0 hours\seen{7.0}\text{ hours} tells us nothing about whether everyone sleeps right around 7 hours\seen{7}\text{ hours} or varies widely from 2\seen{2} to 12 hours\seen{12}\text{ hours}, so we have to estimate the spread s\spread{s} from our sample, and that extra uncertainty requires the tt-distribution:

One row is Yes or No⟶Proportion⟶z-distributionOne row is a measurement⟶Mean⟶t-distribution\displaystyle \begin{aligned} &\text{One row is }\counted{\text{Yes}}\text{ or }\uncounted{\text{No}} \\ &\quad\longrightarrow \text{Proportion} \longrightarrow z\text{-distribution} \\[6pt] &\text{One row is a }\seen{\text{measurement}} \\ &\quad\longrightarrow \text{Mean} \longrightarrow t\text{-distribution} \end{aligned}

Even if the average stays at 7.0 hours\seen{7.0}\text{ hours} and the exact same people sleep at least 7 hours7\text{ hours}, the individual sleep times can be tightly clustered or widely spread out. That changes s\spread{s}, while the Yes/No proportion and its spread do not budge.

Even when the average and every Yes or No answer stay the same, the Yes/No spread is locked in while the spread of the actual hours can stretch from tiny to wide.
2

One-Sample, Paired, or Two-Sample: Counting Columns and the Shuffle Check

Once we know what goes in a single row, we need to decide whether the study is One-Sample, Paired, or Two-Sample. We start by counting how many columns of data were actually collected on the clipboard, and when there are two columns of measurements, checking whether their rows are linked together.

One-Sample, Paired, or Two-Sample: Counting Columns and the Shuffle Check
Historically, commuters in a city spent\text{Historically, commuters in a city spent}
an average of 32 minutes driving to work.\text{an average of }\htmlClass{lc-violet}{32}\text{ minutes driving to work.}
After a new train line opens, a city planner\text{After a new train line opens, a city planner}
surveys 50 random commuters and finds\text{surveys 50 random commuters and finds}
their average commute is 28.5 minutes.\text{their average commute is }\htmlClass{lc-blue}{28.5}\text{ minutes.}
One-Sample,\text{One-Sample,}
Paired, or\text{Paired, or}
Two-Sample?\text{Two-Sample?}
Commute (min)\text{Commute (min)}
Commuter 1\text{Commuter 1}
Commuter 2\text{Commuter 2}
Commuter 3\text{Commuter 3}
Commuter 50\text{Commuter 50}

A fixed benchmark in the problem, like a historical 32-minute\target{32}\text{-minute} average commute, is just a target to compare against, with no sample size or spread of its own, so only one column of data is on the clipboard.

When we actually collect two columns of measurements, the entire procedure depends on whether we can subtract across each row:

Two-Sample (10 strangers)\text{Two-Sample (10 strangers)}
Without\text{Without}
Coffee\text{Coffee}
40\htmlClass{lc-blue}{40}
55\htmlClass{lc-blue}{55}
70\htmlClass{lc-blue}{70}
85\htmlClass{lc-blue}{85}
100\htmlClass{lc-blue}{100}
Average=70\text{Average} = \htmlClass{lc-blue}{70}
huge spread s1\htmlClass{lc-pink}{\text{huge spread }s_1}
With\text{With}
Coffee\text{Coffee}
45\htmlClass{lc-blue}{45}
60\htmlClass{lc-blue}{60}
75\htmlClass{lc-blue}{75}
90\htmlClass{lc-blue}{90}
105\htmlClass{lc-blue}{105}
Average=75\text{Average} = \htmlClass{lc-blue}{75}
huge spread s2\htmlClass{lc-pink}{\text{huge spread }s_2}
Paired (same 5 people)\text{Paired (same 5 people)}
Without\text{Without}
Coffee\text{Coffee}
With\text{With}
Coffee\text{Coffee}
Difference\text{Difference}
Alex\text{Alex}
40\htmlClass{lc-mute}{40}
45\htmlClass{lc-mute}{45}
45−40=\htmlClass{lc-blue}{45} - \htmlClass{lc-blue}{40} =
+5\htmlClass{lc-blue}{+5}
Brianna\text{Brianna}
55\htmlClass{lc-mute}{55}
60\htmlClass{lc-mute}{60}
60−55=\htmlClass{lc-blue}{60} - \htmlClass{lc-blue}{55} =
+5\htmlClass{lc-blue}{+5}
Carlos\text{Carlos}
70\htmlClass{lc-mute}{70}
75\htmlClass{lc-mute}{75}
75−70=\htmlClass{lc-blue}{75} - \htmlClass{lc-blue}{70} =
+5\htmlClass{lc-blue}{+5}
Dana\text{Dana}
85\htmlClass{lc-mute}{85}
90\htmlClass{lc-mute}{90}
90−85=\htmlClass{lc-blue}{90} - \htmlClass{lc-blue}{85} =
+5\htmlClass{lc-blue}{+5}
Evan\text{Evan}
100\htmlClass{lc-mute}{100}
105\htmlClass{lc-mute}{105}
105−100=\htmlClass{lc-blue}{105} - \htmlClass{lc-blue}{100} =
+5\htmlClass{lc-blue}{+5}

Text solution:

So the same +5 word-per-minute\seen{+5}\text{ word-per-minute} gain gets hidden by the big differences from person to person when the columns are two separate groups of strangers, but stands out clearly once pairing subtracts out each typist's starting speed.

In the typing data above, shuffling the "With Coffee" column does not change either column's average or the two-sample standard error s12n1+s22n2\sqrt{\tfrac{\spread{s_1^2}}{n_1} + \tfrac{\spread{s_2^2}}{n_2}}. It only ruins the paired calculation: the steady +5\seen{+5} gains disappear, and sdn\tfrac{\spread{s_d}}{\sqrt{n}} jumps up because the differences from person to person get mixed back in.

Swapping scores in the second column doesn't change the two-sample summary because it uses the same five numbers, but breaking the row-by-row matches mixes the natural differences between people into the paired differences.
3

Confidence Interval or Hypothesis Test: Estimating vs. Testing a Target

With the parameter and column setup chosen, our last decision is whether the problem asks us to build a confidence interval or run a hypothesis test.

Confidence Interval or Hypothesis Test: Estimating vs. Testing a Target
1    ✓\text{1}\;\;\checkmark
2    ✓\text{2}\;\;\checkmark
3    ?\text{3}\;\;?
Goal: Confidence Interval\text{Goal: Confidence Interval}
or Hypothesis Test?\text{or Hypothesis Test?}
“What proportion of…”\text{“What proportion of…”}
64%\htmlClass{lc-blue}{\text{64\%}}
40%\htmlClass{lc-mute}{\text{40\%}}
50%\htmlClass{lc-mute}{\text{50\%}}
60%\htmlClass{lc-mute}{\text{60\%}}
70%\htmlClass{lc-mute}{\text{70\%}}
80%\htmlClass{lc-mute}{\text{80\%}}
“Is there convincing evidence that…”\text{“Is there convincing evidence that…”}
64%\htmlClass{lc-blue}{\text{64\%}}
40%\htmlClass{lc-mute}{\text{40\%}}
50%\htmlClass{lc-mute}{\text{50\%}}
60%\htmlClass{lc-violet}{\text{60\%}}
70%\htmlClass{lc-mute}{\text{70\%}}
80%\htmlClass{lc-mute}{\text{80\%}}

The choice comes down to whether the question gives us a target value to test against or asks us to find what the number is:

4

Putting the Three Checks Together on Word Problems

Now let's run all three checks (Clipboard, Columns, and Goal) on five word problems where summary percentages, benchmarks, and equal sample sizes are designed to look alike.

Choosing the Full Procedure on Word Problems
A car manufacturer wants to know if fuel\text{A car manufacturer wants to know if fuel}
efficiency improves with a new fuel\text{efficiency improves with a new fuel}
additive. They recruit 12 drivers. Each\text{additive. They recruit 12 drivers. Each}
driver drives their car for a week without\text{driver drives their car for a week without}
the additive and records their miles per\text{the additive and records their miles per}
gallon (MPG), then drives the same car\text{gallon (MPG), then drives the same car}
for a week with the additive and records\text{for a week with the additive and records}
their MPG. Do the data provide\text{their MPG. Do the data provide}
convincing evidence that the additive\text{convincing evidence that the additive}
improves average gas mileage?\text{improves average gas mileage?}
Clipboard\text{Clipboard}
1\text{1}
Columns\text{Columns}
2\text{2}
Goal\text{Goal}
3\text{3}
?\text{?}

Text solution:

Key concepts

Whenever you read a statistics problem, picture the clipboard and answer three questions in order:

What did I write down for one subject?

If one person's entry is Yes or No (like whether a student slept at least 7 hours7\text{ hours} or whether a patient felt drowsy), you are counting a Proportion and using zz. Do not get tricked into using tt just because the Yes/No cutoff contains a number like 7 hours7\text{ hours} or the problem states summary percentages like 18%\seen{18\%} and 11%\seen{11\%}. If one person's entry is a measurement (like 6.5 hours\seen{6.5}\text{ hours} of sleep or 28.4 MPG\seen{28.4}\text{ MPG}), you are averaging a Mean and using tt because the spread has to be estimated with the sample standard deviation s\spread{s}.

How many columns of data are on my clipboard?

If you collected one column of data (like 5050 commuters averaging 28.5 minutes\seen{28.5}\text{ minutes}), it is One-Sample. Do not call it two-sample just because a historical benchmark like 32 minutes\target{32}\text{ minutes} or a national rate of 72%\target{72\%} is mentioned for comparison. If you collected two columns, run the Shuffle Check: lock Column A and imagine shuffling the rows of Column B. If shuffling breaks a row-by-row link (whether it is the same person tested before and after coffee, the same grocery item priced at Target and Walmart, or two different students matched beforehand by GPA), the data are Paired, and you subtract across each row first to get a single column of differences with standard error:

Standard Error\displaystyle \spread{\text{Standard Error}} =sdn\displaystyle = \frac{\spread{s_d}}{\sqrt{n}}
If shuffling Column B changes nothing (even when both groups happen to have the exact same sample size, like 2525 male and 2525 female raccoons caught at random), the data are Two-Sample, and you summarize each group separately with combined standard error:
Standard Error\displaystyle \spread{\text{Standard Error}} =s12n1+s22n2\displaystyle = \sqrt{\frac{\spread{s_1^2}}{n_1} + \frac{\spread{s_2^2}}{n_2}}

What is the goal?

If you have no target claim and want to estimate what the number is ("Construct a 95% confidence interval...", "By how much..."), build a Confidence Interval (What we saw±Critical Value×Standard Error\begin{aligned}&\seen{\text{What we saw}} \pm{} \\ &\steps{\text{Critical Value}} \times \spread{\text{Standard Error}}\end{aligned}). If you want to check whether the data provide convincing evidence against a target claim ("Did the average increase?", "Is there a difference...", where no difference means a target of 0\target{0}), run a Hypothesis Test using What we saw−TargetStandard Error\dfrac{\seen{\text{What we saw}} - \target{\text{Target}}}{\spread{\text{Standard Error}}}.

5

Practice

1

A streaming service wants to estimate the proportion of its subscribers who watch at least 10 hours of video per week. In a random sample of 400 subscribers, 260 watched at least 10 hours last week. The service uses these data to construct a 95% confidence interval. Name the full procedure they should use and explain how the three checks lead to it.

Walk up to a single subscriber with your clipboard: what do you write down when you ask whether they watched at least 10 hours?

Clipboard checkWatch out for the number "10 hours." If you treat 10 hours as a numerical measurement on the clipboard, you will mistakenly pick a One-Sample tt-interval for a mean. Instead, each subscriber simply answers "Yes" or "No" to watching at least 10 hours, which is a category (Proportion⟶z\text{Proportion} \longrightarrow z).
Columns checkOnly one sample of 400400 subscribers was collected (One-Sample\text{One-Sample}).
Goal checkThey want to estimate the proportion with 95%\share{95\%} confidence rather than test a claimed target (Confidence Interval\text{Confidence Interval}).
Full procedure: One-Sample zz-interval for a proportion.
2

Historically, the average wait time at a hospital emergency room was 42 minutes. After adding a new triage desk, the hospital records the wait times for a random sample of 36 patient visits and finds an average of 37.5 minutes with a standard deviation of 12 minutes. Do these data provide convincing evidence that the average wait time has decreased? Name the full procedure and explain why this is not a two-sample procedure.

Count how many columns of patient visits the hospital actually recorded on its clipboard. Does the 42-minute number come from a second sample?

Clipboard checkEach patient visit gives a wait time in minutes, which is a measurement (Mean⟶t\text{Mean} \longrightarrow t).
Columns checkDo not get tricked into choosing a Two-Sample tt-test just because two averages (42 minutes\target{42}\text{ minutes} and 37.5 minutes\seen{37.5}\text{ minutes}) appear in the problem. The hospital only collected one column of 3636 patient visits; 42 minutes\target{42}\text{ minutes} is a fixed historical benchmark with no second sample or standard error attached to it (One-Sample\text{One-Sample}).
Goal checkThey are testing whether the data provide convincing evidence of a decrease against the 42-minute\target{42}\text{-minute} benchmark (Hypothesis Test\text{Hypothesis Test}).
Full procedure: One-Sample tt-test for a mean.
3

An online retailer wants to know whether two checkout button colors lead to different purchase rates. They randomly show a green button to 500 visitors and a blue button to 450 different visitors, recording whether each visitor completes a purchase. Is there convincing evidence that the purchase rate differs between the two button colors? Name the full procedure and justify your choice.

What goes on the clipboard for a single visitor, and what target difference are you checking when the question asks whether the two rates differ?

Clipboard checkFor each visitor, the clipboard records "Yes" or "No" for completing a purchase, which is a category (Proportion⟶z\text{Proportion} \longrightarrow z).
Columns checkThe 500500 visitors who see green and the 450450 visitors who see blue are two separate, unrelated groups of strangers (Two-Sample\text{Two-Sample}).
Goal checkDo not mistake this for a confidence interval just because no target percentage is printed in the problem. Asking for "convincing evidence that the purchase rate differs" tests against a target difference of 0\target{0} (Hypothesis Test\text{Hypothesis Test}).
Full procedure: Two-Sample zz-test for a difference in proportions.
4

To compare prices at airport shops versus neighborhood grocery stores, a reporter selects 18 specific snack and travel items (such as a 20-ounce bottle of water, a pack of AA batteries, and a standard candy bar) and records the price of each item at the city airport and at a local supermarket. She wants to construct a 90% confidence interval for how much more expensive items are at the airport, on average. Name the full procedure and explain how the Shuffle Check applies.

Imagine locking the airport price column in place and shuffling the supermarket price column. What happens to the row for a 20-ounce bottle of water?

Clipboard checkEach recorded value is a price in dollars, which is a measurement (Mean⟶t\text{Mean} \longrightarrow t).
Columns and Shuffle checkIt is easy to see two stores (airport and supermarket) and mistakenly pick a Two-Sample tt-interval. However, the two columns of 1818 prices are linked row-by-row by the exact item: shuffling the supermarket column would subtract the price of supermarket batteries from airport water, ruining the data (Paired\text{Paired}).
Goal checkShe wants to estimate the average price difference with a 90%\share{90\%} confidence interval rather than test a claim (Confidence Interval\text{Confidence Interval}).
Full procedure: Paired tt-interval for a mean difference.
5

A baker wants to know if loaves baked on the top rack of her oven have a different average weight than loaves baked on the bottom rack. Over a month, she takes a random sample of 20 loaves from the top rack and an independent random sample of 20 loaves from the bottom rack, weighing each loaf in grams. Do the data provide convincing evidence of a difference in average weight between the racks? Name the full procedure and explain whether having 20 loaves in each group makes the data paired.

Does Loaf 1 from the top rack have any connection to Loaf 1 from the bottom rack if you shuffle the bottom-rack column?

Clipboard checkEach loaf gives a weight in grams, which is a measurement (Mean⟶t\text{Mean} \longrightarrow t).
Columns and Shuffle checkDo not call this a Paired tt-test just because both columns have 2020 loaves. Having 2020 loaves in each group is a coincidence: Loaf 1 from the top rack has no connection to Loaf 1 from the bottom rack, so shuffling the second column changes nothing (Two-Sample\text{Two-Sample}).
Goal checkShe is checking for convincing evidence of a difference against a target difference of 0\target{0} (Hypothesis Test\text{Hypothesis Test}).
Full procedure: Two-Sample tt-test for a difference in means.
6

To test whether a new wetsuit reduces 100-meter freestyle times, a swim coach takes 18 swimmers and pairs them by their personal best times (the two fastest form Pair 1, the next two form Pair 2, and so on, creating 9 pairs). Within each pair, a coin flip decides who wears the new wetsuit and who wears a standard suit. The summary statistics (in seconds) are:

  • Standard suit (n=9n = 9): mean=62.0\seen{\text{mean}} = \seen{62.0}, s1=6.0\spread{s_1} = \spread{6.0}
  • New wetsuit (n=9n = 9): mean=60.5\seen{\text{mean}} = \seen{60.5}, s2=6.0\spread{s_2} = \spread{6.0}
  • Pair-by-pair differences (Standard−New\text{Standard} - \text{New}, n=9 pairsn = 9\text{ pairs}): mean difference=1.5\seen{\text{mean difference}} = \seen{1.5}, sd=0.6\spread{s_d} = \spread{0.6}

Name the full procedure to test whether the new wetsuit reduces average swim times, calculate the correct standard error, and explain why the other standard error formula is inappropriate here.

Even though 18 different swimmers are in the pool, check what happens to the matched fast and slow swimmers if you shuffle the second column.

Clipboard checkEach swimmer gives a swim time in seconds, which is a measurement (Mean⟶t\text{Mean} \longrightarrow t).
Columns and Shuffle checkEven though the columns contain 1818 different people, each row links two swimmers matched on starting speed, so shuffling the second column would compare a fast swimmer against a slow swimmer (Paired\text{Paired}).
Goal checkThe coach is testing for convincing evidence that the new wetsuit reduces swim times against a target difference of 0\target{0} (Hypothesis Test\text{Hypothesis Test}).
Standard error calculationIf you mistakenly treat the 1818 swimmers as two unrelated groups and plug s1=6.0\spread{s_1} = \spread{6.0} and s2=6.0\spread{s_2} = \spread{6.0} into the two-sample formula 6.029+6.029≈2.83 seconds\sqrt{\tfrac{\spread{6.0}^2}{9} + \tfrac{\spread{6.0}^2}{9}} \approx \spread{2.83}\text{ seconds}, all the starting speed differences from swimmer to swimmer are mixed back in and hide the 1.5-second\seen{1.5}\text{-second} improvement. Subtracting across each matched pair first removes those starting speed differences, so we use the paired standard error on the n=9n = 9 differences:
Standard Error\displaystyle \spread{\text{Standard Error}} =sdn\displaystyle = \frac{\spread{s_d}}{\sqrt{n}} =0.69\displaystyle = \frac{\spread{0.6}}{\sqrt{9}} =0.20 seconds\displaystyle = \spread{0.20}\text{ seconds}
Full procedure and standard error: Paired tt-test for a mean difference, with Standard Error=0.20 seconds\text{Standard Error} = 0.20\text{ seconds}.