StatisticsComparing Two Groups4 of 6
Comparing Two Groups · 4

Confidence Interval for a Difference in Means

When we compare the averages of two groups using samples, the gap between our sample averages is only one batch's estimate, so we need an interval for how far apart the true averages really are.

1

Standard error of a difference in means

To know how wide to make that interval, we first need the standard error of the difference between two sample means: how much the gap between the two sample averages typically varies from batch to batch.

Remember that for a single sample of size nn with sample standard deviation s\spread{s}, the sample mean xˉ\stat{\bar{x}} is more stable than an individual measurement and varies from batch to batch with a standard error of:

SE\displaystyle \spread{\text{SE}} =sn\displaystyle = \frac{\spread{s}}{\sqrt{n}}

Suppose we test a random sample of n1=25n_1 = 25 Brand A headphones (xˉ1=55 hours\stat{\bar{x}_1} = \stat{55}\text{ hours}, s1=15 hours\spread{s_1} = \spread{15}\text{ hours}) and an independent random sample of n2=16n_2 = 16 Brand B headphones (xˉ2=40 hours\stat{\bar{x}_2} = \stat{40}\text{ hours}, s2=16 hours\spread{s_2} = \spread{16}\text{ hours}) to see how much the gap between their sample averages varies.

Standard error of a difference in means
Brand A\text{Brand A}
n1=25xˉ1=55 hours\begin{aligned} n_1 &= 25 \\ \htmlClass{lc-blue}{\bar{x}_1} &= \htmlClass{lc-blue}{55}\text{ hours} \end{aligned}
Brand B\text{Brand B}
n2=16xˉ2=40 hours\begin{aligned} n_2 &= 16 \\ \htmlClass{lc-blue}{\bar{x}_2} &= \htmlClass{lc-blue}{40}\text{ hours} \end{aligned}
SE1=s1n1=3 hours\begin{aligned} \htmlClass{lc-pink}{\text{SE}_1} &= \frac{\htmlClass{lc-pink}{s_1}}{\sqrt{n_1}} \\ &= \htmlClass{lc-pink}{3}\text{ hours} \end{aligned}
SE2=s2n2=4 hours\displaystyle \htmlClass{lc-pink}{\text{SE}_2} = \frac{\htmlClass{lc-pink}{s_2}}{\sqrt{n_2}} = \htmlClass{lc-pink}{4}\text{ hours}
SE=s12n1+s22n2=5 hours\begin{aligned} \htmlClass{lc-pink}{\text{SE}} &= \sqrt{\frac{\htmlClass{lc-pink}{s_1^2}}{n_1} + \frac{\htmlClass{lc-pink}{s_2^2}}{n_2}} \\ &= \htmlClass{lc-pink}{5}\text{ hours} \end{aligned}
Text solution
Subtract the sample averagesStart with the gap between the two sample means as our center estimate.
xˉ1−xˉ2\displaystyle \stat{\bar{x}_1 - \bar{x}_2} =55−40\displaystyle = \stat{55} - \stat{40} =15 hours\displaystyle = \stat{15}\text{ hours}
Standard error of each sample meanDivide each brand's sample standard deviation by the square root of its sample size to find how much each average varies on its own.
SE1=s1n1=1525=155=3 hoursSE2=s2n2=1616=164=4 hours\displaystyle \begin{aligned} \spread{\text{SE}_1} &= \frac{\spread{s_1}}{\sqrt{n_1}} = \frac{\spread{15}}{\sqrt{25}} \\ &= \frac{\spread{15}}{5} = \spread{3}\text{ hours} \\[6pt] \spread{\text{SE}_2} &= \frac{\spread{s_2}}{\sqrt{n_2}} = \frac{\spread{16}}{\sqrt{16}} \\ &= \frac{\spread{16}}{4} = \spread{4}\text{ hours} \end{aligned}
Combine on a right triangleBecause the two samples vary independently, square both standard errors, add them together, and take the square root.
SE=s12n1⏟SE12+s22n2⏟SE22=32+42=9+16=25=5 hours\displaystyle \begin{aligned} \spread{\text{SE}} &= \sqrt{\underbrace{\frac{\spread{s_1^2}}{n_1}}_{\spread{\text{SE}_1^2}} + \underbrace{\frac{\spread{s_2^2}}{n_2}}_{\spread{\text{SE}_2^2}}} \\ &= \sqrt{\spread{3^2} + \spread{4^2}} = \sqrt{\spread{9} + \spread{16}} \\ &= \sqrt{\spread{25}} = \spread{5}\text{ hours} \end{aligned}

So our sample gap is 15 hours\stat{15}\text{ hours}, and from batch to batch that gap typically varies by about 5 hours\spread{5}\text{ hours}.

Try changing Brand B's standard error to see how the combined standard error stretches along the hypotenuse. Whenever both brands vary, it is larger than either brand's standard error alone, but shorter than the two added directly together because independent variations partially cancel out.

Two standard errors combine like the diagonal of a right triangle: when both brands vary, it's longer than either one alone, and shorter than adding them end-to-end.
2

Degrees of freedom and building the interval

Now that we have the 15-hour\stat{15}\text{-hour} sample gap and its 5-hour\spread{5}\text{-hour} standard error, we want to extend a margin of error to either side to build a 95%\share{95\%} confidence interval for the true difference in means.

Just like in a one-sample tt interval, estimating the population standard deviations from sample standard deviations s1\spread{s_1} and s2\spread{s_2} adds extra uncertainty, so we multiply the standard error by a larger t∗t^* value instead of the normal multiplier 1.961.96. For a single sample, we looked up t∗t^* using n−1n - 1 degrees of freedom, but now we have two different sample sizes, n1=25n_1 = 25 and n2=16n_2 = 16.

Degrees of freedom and building the interval
Brand A:\text{Brand A:}
n1=25,n_1 = 25,
xˉ1=55,\htmlClass{lc-blue}{\bar{x}_1} = \htmlClass{lc-blue}{55},
s1=15\htmlClass{lc-pink}{s_1} = \htmlClass{lc-pink}{15}
Brand B:\text{Brand B:}
n2=16,n_2 = 16,
xˉ2=40,\htmlClass{lc-blue}{\bar{x}_2} = \htmlClass{lc-blue}{40},
s2=16\htmlClass{lc-pink}{s_2} = \htmlClass{lc-pink}{16}
95% confidence interval=15  ±  ?×5\htmlClass{lc-green}{95\%}\text{ confidence interval} = \htmlClass{lc-blue}{15} \;\htmlClass{lc-pink}{\pm}\; ? \times \htmlClass{lc-pink}{5}
A−B\text{A} - \text{B}
15\htmlClass{lc-blue}{15}
SE=5\htmlClass{lc-pink}{\text{SE}} = \htmlClass{lc-pink}{5}
−10-10
00
1010
hours\text{hours}
Text solution
Cautious degrees of freedom by handSubtract 11 from the smaller sample size (n2=16n_2 = 16) to look up the 95%\share{95\%} multiplier on a tt-table.
df\displaystyle \text{df} =16−1\displaystyle = 16 - 1 =15  ⟹  t∗\displaystyle = 15 \implies t^* =2.13\displaystyle = 2.13
Multiply for the margin of errorMultiply the 5-hour\spread{5}\text{-hour} standard error by t∗t^* to find how far the interval reaches on each side of the 15-hour\stat{15}\text{-hour} gap.
Margin of error=t∗×SE=2.13×5=10.65 hours\displaystyle \begin{aligned} \spread{\text{Margin of error}} &= t^* \times \spread{\text{SE}} \\ &= 2.13 \times \spread{5} \\ &= \spread{10.65}\text{ hours} \end{aligned}
Add and subtract from the sample gapSubtract and add the margin of error around the 15-hour\stat{15}\text{-hour} difference to find the interval endpoints.
15±10.65=[15−10.65,  15+10.65]=[4.35 hours,  25.65 hours]\displaystyle \begin{aligned} &\stat{15} \spread{\pm} \spread{10.65} \\ &= [\stat{15} - \spread{10.65},\; \stat{15} + \spread{10.65}] \\ &= [4.35\text{ hours},\; 25.65\text{ hours}] \end{aligned}

So our 95%\share{95\%} confidence interval for the difference in average battery life is [4.35 hours,  25.65 hours][4.35\text{ hours},\; 25.65\text{ hours}] by hand, or [4.80 hours,  25.20 hours][4.80\text{ hours},\; 25.20\text{ hours}] using a calculator or software, which finds df=30.6\text{df} = 30.6 and t∗=2.04t^* = 2.04.

Putting the sample gap and margin of error together gives the two-sample tt interval for a difference in means:

(xˉ1−xˉ2)⏟sample gap±t∗s12n1+s22n2⏟margin of error\displaystyle \underbrace{(\stat{\bar{x}_1 - \bar{x}_2})}_{\stat{\text{sample gap}}} \spread{\pm} \underbrace{t^* \sqrt{\frac{\spread{s_1^2}}{n_1} + \frac{\spread{s_2^2}}{n_2}}}_{\spread{\text{margin of error}}}

When working by hand on a test, always use the smaller sample size minus 11 for df\text{df}. If a problem gives you the degrees of freedom from a calculator or software, that formula combines both sample sizes and standard deviations to count information from both batches, giving a larger df\text{df}, a smaller t∗t^*, and a slightly narrower interval.

3

Interpreting the interval and checking for zero

Now that we have the interval [4.35 hours,  25.65 hours][4.35\text{ hours},\; 25.65\text{ hours}], we want to see what its endpoints tell us about the two brands and decide whether the data give convincing evidence that one brand lasts longer on average.

Look at how the conclusion changes if Brand A's sample had averaged 46 hours\stat{46}\text{ hours} instead of 55 hours\stat{55}\text{ hours}, with the same 10.65-hour\spread{10.65}\text{-hour} margin of error.

Interpreting the interval and checking for zero
95% confidence interval[4.35, 25.65] hours\begin{array}{c} \htmlClass{lc-green}{95\%}\text{ confidence interval} \\ [4.35,\ 25.65]\text{ hours} \end{array}
A−B\text{A} - \text{B}
4.354.35
15\htmlClass{lc-blue}{15}
25.6525.65
−10-10
00
1010
2020
hours\text{hours}
Convincing evidence thatBrand A lasts longer?\begin{array}{c} \text{Convincing evidence that} \\ \text{Brand A lasts longer?} \end{array}
0 (no difference)\htmlClass{lc-violet}{0\ (\text{no difference})}
4.354.35
15\htmlClass{lc-blue}{15}
25.6525.65
−4.65-4.65
6\htmlClass{lc-blue}{6}
+16.65+16.65
−20-20
−10-10
00
1010
2020
hours\text{hours}
Negative:B beats A\begin{array}{r} \text{Negative:} \\ \text{B beats A} \end{array}
Positive:A beats B\begin{array}{l} \text{Positive:} \\ \text{A beats B} \end{array}
Text solution
Subtract the new sample averagesWhen Brand A averages 46 hours\stat{46}\text{ hours} and Brand B averages 40 hours\stat{40}\text{ hours}, the sample gap shrinks to 6 hours\stat{6}\text{ hours}.
xˉ1−xˉ2\displaystyle \stat{\bar{x}_1 - \bar{x}_2} =46−40\displaystyle = \stat{46} - \stat{40} =6 hours\displaystyle = \stat{6}\text{ hours}
Add and subtract the margin of errorGoing 10.65 hours\spread{10.65}\text{ hours} to either side of 6\stat{6} takes the lower endpoint past zero into negative numbers.
6±10.65=[6−10.65,  6+10.65]=[−4.65 hours,  +16.65 hours]\displaystyle \begin{aligned} &\stat{6} \spread{\pm} \spread{10.65} \\ &= [\stat{6} - \spread{10.65},\; \stat{6} + \spread{10.65}] \\ &= [-4.65\text{ hours},\; +16.65\text{ hours}] \end{aligned}

Because we subtracted Brand A−Brand B\text{Brand A} - \text{Brand B}, Brand A might average up to 4.65 hours4.65\text{ hours} less than Brand B or up to 16.65 hours16.65\text{ hours} more, and since 0\reference{0} (no difference) sits inside the interval, we do not have convincing evidence of a difference between the two brands.

Slide Brand A's sample average to see how the confidence interval moves across 0\reference{0}. As long as the whole interval stays on one side of 0\reference{0}, every plausible value favors the same brand. Once the interval crosses 0\reference{0}, either brand could be higher, and a tie of 0\reference{0} is also plausible.

The difference between two sample averages gives convincing evidence of a true difference only when the entire confidence interval stays on one side of zero.
4

Experiments and causal conclusions

Sampling two existing products tells us whether their population averages differ, but when we want to find out whether a treatment actually causes a change in the average, we run a randomized experiment instead.

Suppose 4040 volunteers with insomnia are randomly assigned into two groups of 2020, one taking a tart cherry supplement and the other taking a placebo, and subtracting Placebo−Supplement\text{Placebo} - \text{Supplement} gives a 95%\share{95\%} confidence interval of [8 minutes,  22 minutes][8\text{ minutes},\; 22\text{ minutes}] for the difference in time to fall asleep.

Experiments and causal conclusions
40 volunteers40\text{ volunteers}
random assignment\text{random assignment}
Supplement\text{Supplement}
Placebo\text{Placebo}
00
2020
4040
6060
minutes to fall asleep\text{minutes to fall asleep}

The math works the exact same way, with df=20−1=19\text{df} = 20 - 1 = 19 by hand. Because the 4040 volunteers were randomly assigned to balance out natural sleep differences, and [8 minutes,  22 minutes][8\text{ minutes},\; 22\text{ minutes}] sits entirely above 0\reference{0}, we have convincing evidence that the supplement causes people like the volunteers to fall asleep between 88 and 22 minutes22\text{ minutes} faster on average.

5

Conditions for a two-sample tt interval

Before trusting a two-sample tt interval in either a sampling study or an experiment, we check three conditions to make sure the standard error formula and the t∗t^* multiplier are valid.

Conditions for a two-sample t interval
1. Random1.\ \text{Random}
2. Independent2.\ \text{Independent}
3. Normal or Large Sample3.\ \text{Normal or Large Sample}

Key concepts

Here is the whole decision and calculation in one place:

Two separate groups vs. paired data

Use a two-sample tt interval when comparing two independent groups, such as n1=25n_1 = 25 Brand A headphones and n2=16n_2 = 16 Brand B headphones, or 4040 volunteers randomly split into two groups of 2020. Do not use this method when the exact same individuals are measured twice (such as 2020 people timed on a placebo one week and a supplement the next). That is paired data, where you subtract each person's two numbers first and run a one-sample tt interval on their individual differences.

Three conditions first

Check for two random samples or random assignment (Random), separate groups with samples under 10%10\% of their populations when sampling without replacement (Independent), and both n1≥30n_1 \ge 30 and n2≥30n_2 \ge 30 (Normal / Large Sample). For each sample under 3030 (like 2525 and 1616, so both here), check its graph for strong skewness or outliers.

Building the interval on a right triangle

Start with the sample gap xˉ1−xˉ2\stat{\bar{x}_1 - \bar{x}_2}, square and add the two individual standard errors s1n1\tfrac{\spread{s_1}}{\sqrt{n_1}} and s2n2\tfrac{\spread{s_2}}{\sqrt{n_2}} under a square root, and multiply by t∗t^*:

(xˉ1−xˉ2)±t∗s12n1+s22n2\displaystyle (\stat{\bar{x}_1 - \bar{x}_2}) \spread{\pm} t^* \sqrt{\frac{\spread{s_1^2}}{n_1} + \frac{\spread{s_2^2}}{n_2}}
For our headphones, (55−40)±2.1315225+16216(\stat{55} - \stat{40}) \spread{\pm} 2.13\sqrt{\tfrac{\spread{15^2}}{25} + \tfrac{\spread{16^2}}{16}} =15±2.13(5)= \stat{15} \spread{\pm} 2.13(\spread{5}) =[4.35,  25.65] hours= [4.35,\; 25.65]\text{ hours}, where by hand we look up t∗t^* using the smaller sample size minus 11 (df=16−1=15\text{df} = 16 - 1 = 15).

Signs, zero, and causation

Write down your subtraction order (Group 1−Group 2\text{Group 1} - \text{Group 2}) first: positive values favor Group 1, negative values favor Group 2, and 0\reference{0} means a tie. An interval entirely on one side of 0\reference{0} (like [4.35,  25.65][4.35,\; 25.65]) gives convincing evidence of a difference (and of a cause-and-effect relationship if treatments were randomly assigned), while an interval that crosses 0\reference{0} (like [−4.65,  +16.65][-4.65,\; +16.65]) does not, though 95%\share{95\%} confidence never means 100%100\% certainty.

6

Practice

1

A safety inspector tests the breaking strength of two brands of climbing rope using independent random samples. For Brand A, a sample of n1=36n_1 = 36 ropes has an average breaking strength of xˉ1=520 pounds\stat{\bar{x}_1} = \stat{520}\text{ pounds} and a standard deviation of s1=36 pounds\spread{s_1} = \spread{36}\text{ pounds}. For Brand B, a sample of n2=25n_2 = 25 ropes has an average breaking strength of xˉ2=475 pounds\stat{\bar{x}_2} = \stat{475}\text{ pounds} and a standard deviation of s2=40 pounds\spread{s_2} = \spread{40}\text{ pounds}. For 95%\share{95\%} confidence, a tt-table gives t∗=2.06t^* = 2.06 for df=24\text{df} = 24, t∗=2.03t^* = 2.03 for df=35\text{df} = 35, and t∗=2.00t^* = 2.00 for df=59\text{df} = 59. Using the cautious by-hand method, find the 95%\share{95\%} confidence interval for the true difference in mean breaking strength (Brand A−Brand B\text{Brand A} - \text{Brand B}).

Find the standard error sn\tfrac{\spread{s}}{\sqrt{n}} for each brand first, then combine them on a right triangle; which of the two sample sizes decides the cautious by-hand df\text{df}?

The sample difference is:
xˉ1−xˉ2\displaystyle \stat{\bar{x}_1 - \bar{x}_2} =520−475\displaystyle = \stat{520} - \stat{475} =45 pounds\displaystyle = \stat{45}\text{ pounds}
The individual standard errors are SE1=3636=6 pounds\spread{\text{SE}_1} = \tfrac{\spread{36}}{\sqrt{36}} = \spread{6}\text{ pounds} for Brand A and SE2=4025=8 pounds\spread{\text{SE}_2} = \tfrac{\spread{40}}{\sqrt{25}} = \spread{8}\text{ pounds} for Brand B. Combine them on a right triangle (watch out: adding the standard errors directly as 6+8=14 pounds\spread{6} + \spread{8} = 14\text{ pounds} would ignore how independent variations partially cancel, and give a wrong interval of [16.16,  73.84][16.16,\; 73.84]):
SE\displaystyle \spread{\text{SE}} =62+82\displaystyle = \sqrt{\spread{6^2} + \spread{8^2}} =36+64\displaystyle = \sqrt{\spread{36} + \spread{64}} =100\displaystyle = \sqrt{\spread{100}} =10 pounds\displaystyle = \spread{10}\text{ pounds}
By hand, use the smaller sample size minus 11 to get df=25−1=24\text{df} = 25 - 1 = 24 and t∗=2.06t^* = 2.06 (be careful not to use the larger sample's df=35\text{df} = 35 or df=35+24=59\text{df} = 35 + 24 = 59 from adding both samples' degrees of freedom, which would give t∗=2.03t^* = 2.03 or 2.002.00 and make the interval too narrow at [24.7,  65.3][24.7,\; 65.3] or [25.0,  65.0][25.0,\; 65.0]). The margin of error is 2.06×10=20.6 pounds2.06 \times \spread{10} = \spread{20.6}\text{ pounds}, giving 45±20.6\stat{45} \spread{\pm} \spread{20.6}, or [24.4 pounds,  65.6 pounds][24.4\text{ pounds},\; 65.6\text{ pounds}].
2

A school district takes independent random samples of ninth graders and twelfth graders to compare their daily screen time. Subtracting Ninth Grade−Twelfth Grade\text{Ninth Grade} - \text{Twelfth Grade}, the 95%\share{95\%} confidence interval for the difference in population means is [−18 minutes,  +34 minutes][-18\text{ minutes},\; +34\text{ minutes}]. Explain what the negative and positive endpoints mean in context, decide whether the interval gives convincing evidence of a difference in average screen time between the two grades, and explain whether an interval of [+4 minutes,  +56 minutes][+4\text{ minutes},\; +56\text{ minutes}] would prove with 100%100\% certainty that ninth graders average more screen time.

Write out Ninth Grade−Twelfth Grade\text{Ninth Grade} - \text{Twelfth Grade} to see which grade is higher when the difference is negative versus positive, then check whether 0\reference{0} sits inside the interval.

Because the subtraction order is Ninth Grade−Twelfth Grade\text{Ninth Grade} - \text{Twelfth Grade}, −18 minutes-18\text{ minutes} means ninth graders might average up to 18 minutes18\text{ minutes} less screen time per day than twelfth graders (watch out for reversing the order and thinking −18-18 means twelfth graders average 18 minutes18\text{ minutes} less), while +34 minutes+34\text{ minutes} means ninth graders might average up to 34 minutes34\text{ minutes} more. Because 0\reference{0} (no difference) is inside the interval, there is not convincing evidence of a difference in average daily screen time between the two grades (don't be fooled into saying there is convincing evidence just because +34+34 is farther from 0\reference{0} than −18-18). Even if the interval were [+4 minutes,  +56 minutes][+4\text{ minutes},\; +56\text{ minutes}] (entirely above 0\reference{0}), it would provide convincing evidence that ninth graders average more screen time, but never 100%100\% certainty, because about 5%\miss{5\%} of samples give a 95%\share{95\%} confidence interval that misses the true difference, and we can't tell whether ours is one of them.
3

Fifty adult volunteers who suffer from high blood pressure are randomly assigned into two groups of 2525: one group drinks a hibiscus tea daily for four weeks, and the other drinks a look-alike placebo tea. At the end of the experiment, researchers measure systolic blood pressure and calculate a 95%\share{95\%} confidence interval for Hibiscus Tea−Placebo\text{Hibiscus Tea} - \text{Placebo} of [−14.2 mmHg,  −2.8 mmHg][-14.2\text{ mmHg},\; -2.8\text{ mmHg}]. Explain why the Random condition is met even though the participants are volunteers, interpret the interval in context, and state whether there is convincing evidence that the hibiscus tea causes a reduction in blood pressure.

Check how the 5050 volunteers were placed into the two tea groups, and look at the subtraction order (Hibiscus Tea−Placebo\text{Hibiscus Tea} - \text{Placebo}) to see what negative endpoints mean for blood pressure.

Although the 5050 participants were not randomly sampled from a population (watch out for saying the Random condition fails because they are volunteers), the Random condition is met because the volunteers were randomly assigned to the two treatments, which balances natural differences between the groups. Because we subtracted Hibiscus Tea−Placebo\text{Hibiscus Tea} - \text{Placebo}, negative values mean the hibiscus tea group had lower blood pressure: we are 95%\share{95\%} confident that for people like the volunteers in this study (be careful not to generalize to all adults), drinking the hibiscus tea reduces average systolic blood pressure by between 2.8 mmHg2.8\text{ mmHg} and 14.2 mmHg14.2\text{ mmHg} compared to the placebo. Because the entire interval is negative and does not contain 0\reference{0}, there is convincing evidence that the hibiscus tea causes a lower average systolic blood pressure.
4

A student compares two independent random samples: Group 1 has n1=17n_1 = 17, xˉ1=82\stat{\bar{x}_1} = \stat{82}, and s1=20\spread{s_1} = \spread{20}, while Group 2 has n2=36n_2 = 36, xˉ2=70\stat{\bar{x}_2} = \stat{70}, and s2=18\spread{s_2} = \spread{18}. Because the student subtracts the means (82−70=12\stat{82} - \stat{70} = \stat{12}), they also subtract the standard errors (2017−1836=4.85−3=1.85\tfrac{\spread{20}}{\sqrt{17}} - \tfrac{\spread{18}}{\sqrt{36}} = \spread{4.85} - \spread{3} = 1.85) and use df=36−1=35\text{df} = 36 - 1 = 35 for a by-hand t∗t^* lookup. Identify both mistakes in the student's work, calculate the correct standard error and by-hand degrees of freedom, and state whether using a calculator's degrees of freedom (df=28.7\text{df} = 28.7) would make the resulting confidence interval wider or narrower.

Ask what having two varying sample averages does to the stability of the gap between them, and check which of the two sample sizes (n1=17n_1 = 17 or n2=36n_2 = 36) sets the by-hand degrees of freedom.

First, standard errors are never subtracted. Having two sample averages that vary makes the gap between them less stable, not more stable, so we square both standard errors, add them together, and take the square root (and watch out for adding the unsquared standard errors 4.85+3=7.85\spread{4.85} + \spread{3} = 7.85 before taking the square root, which would give 2.802.80):
SE=20217+18236=23.53+9=32.53≈5.70\displaystyle \begin{aligned} \spread{\text{SE}} &= \sqrt{\frac{\spread{20^2}}{17} + \frac{\spread{18^2}}{36}} = \sqrt{\spread{23.53} + \spread{9}} \\ &= \sqrt{\spread{32.53}} \approx \spread{5.70} \end{aligned}
Second, the cautious by-hand method uses the smaller sample size minus 11, which is df=17−1=16\text{df} = 17 - 1 = 16 (not 3535). A calculator's df=28.7\text{df} = 28.7 counts information from both samples, giving a smaller t∗t^* multiplier and a narrower, more precise confidence interval than the by-hand method with df=16\text{df} = 16 (don't think a larger df\text{df} makes the interval wider; more degrees of freedom means less uncertainty from estimating the standard deviations, which shrinks t∗t^*).
5

For each study below, determine whether all three conditions (Random, Independent, and Normal / Large Sample) are met for a two-sample tt interval for a difference in means, and explain why: (A) A coach times a random sample of 2222 swimmers in a 100-meter100\text{-meter} race wearing standard suits on Monday and times the exact same 2222 swimmers wearing racing suits on Friday to compare the two sets of 2222 times. (B) A biologist takes independent random samples of 1414 fish from Lake X and 4545 fish from Lake Y (both huge lakes); a plot of the 1414 fish from Lake X shows a strong outlier, while the 4545 fish from Lake Y are slightly skewed. (C) An economist takes independent random samples of 4040 apartments in City A and 5050 apartments in City B (each less than 10%10\% of all apartments in its city); histograms of both samples show moderate right skewness with no extreme outliers.

In each study, check whether the two groups are separate individuals or the same individuals measured twice, and whether both sample sizes reach 3030 when skewness or outliers are present.

(A) Not validThe Independent condition is violated because the exact same 2222 swimmers are measured twice (watch out for treating the two sets of 2222 times as independent groups just because there are two lists of numbers), making this paired data that requires a one-sample tt interval on each swimmer's individual time difference.
(B) Not validThe Normal / Large Sample condition is violated because both groups must be at least 3030 for the Central Limit Theorem to apply automatically (be careful not to add the sample sizes as 14+45=59≥3014 + 45 = 59 \ge 30 or assume Lake Y's n2=45n_2 = 45 makes up for Lake X), and here Lake X has n1=14<30n_1 = 14 < 30 with a strong outlier in its sample data.
(C) ValidAll three conditions are met because the data come from two independent random samples that are each less than 10%10\% of their populations, and both sample sizes are at least 3030 (n1=40≥30n_1 = 40 \ge 30 and n2=50≥30n_2 = 50 \ge 30), so the Central Limit Theorem makes the sampling distribution of the difference in means roughly normal despite moderate skewness.