Two-Sample Tests
Almost every interesting question in statistics is a comparison. Does this treatment beat that one? Do these two groups of customers behave differently? Did the change we made actually change anything? A one sample test asks whether a single group differs from a fixed number. A two-sample test asks whether two groups differ from each other, and that is the question the world most often cares about. This chapter builds the four workhorse methods: two independent means, paired means, two proportions and the confidence intervals that go with them. It shows you just how to decide which one a study calls for. And it works the math all the way through, so you can see there is no magic in it.
By the end of this chapter you can
- Tell when two samples are independent and when they are paired, and explain why the difference changes the analysis.
- State the hypotheses, check the conditions and work out the test statistic for a two-sample t-test of independent means.
- Shrink a matched pairs study to a single sample of differences, and run a paired t-test.
- Carry out a two-proportion z-test, including the pooled proportion and the success-failure check.
- Use a decision guide to choose the right test from the study design, and name a sensible other choice when conditions fail.
- Build and correctly read confidence intervals for a difference of two means or two proportions.
- Explain how a two sided test and a confidence interval mirror each other, and the one place that breaks down.
- State just what a p-value and a 95% confidence interval do and do not mean.
Section 1Two independent means

Two groups, one question
Say you have measured a numeric outcome on two separate groups of subjects, such as a test score, a reaction time, a blood pressure or a delivery time. The group averages came out different. They always do. Two samples drawn from the very same population will differ by chance alone. The whole job of a two-sample test is to answer one question: is the gap we saw bigger than chance would easily produce?
The samples here are independent, which has an exact meaning. Knowing any value in group 1 tells you nothing about any value in group 2, and no subject appears in both groups. Two treatment arms assigned at random are independent. Men and women in one survey are independent. The same forty people measured in January and again in June are not, and that is Section 2's problem.
Write the population means as μ1 and μ2. The hypotheses are about the difference:
H0: μ1 − μ2 = 0 Ha: μ1 − μ2 ≠ 0
Notice what the null says: the two populations have the same mean. It does not say the two samples had the same mean. They plainly did not, or you would not be testing anything.
The test statistic, and where it comes from
Every test statistic in this book has the same shape: (what we saw) minus (what the null predicted), divided by how much that amount naturally wobbles. Our estimate of μ1 − μ2 is x̄1 − x̄2. Its wobble is measured by the standard error of the difference. Because the two samples are independent, their variances add, never their standard deviations:
SE = √( s12/n1 + s22/n2 )
and the test statistic is
t = ( x̄1 − x̄2 − 0 ) / SE
Since we estimated both standard deviations from data, the reference curve is a t distribution, not the normal. The degrees of freedom are the awkward part. Use Welch's approximation, which statistical software gives you by default and which you should use by default:
df = ( s12/n1 + s22/n2 )2 ÷ [ (s12/n1)2/(n1−1) + (s22/n2)2/(n2−1) ]
This is rarely a whole number, and that is fine. Working by hand without software, you may round the df down to the nearest whole number. That is cautious on purpose. It gives a slightly wider interval and a slightly larger p-value, so you never overstate your evidence.
| Condition | What it means | How to check it |
|---|---|---|
| Independence within | Observations inside each group do not influence one another | Random sample, or random assignment; sample under 10% of the population |
| Independence between | No subject appears in both groups; no natural pairing | Read the study design: this is a design fact, not a data fact |
| Normality (or size) | Each population is roughly normal, or each sample is large | A dot plot or box plot for each group. n ≥ 30 per group makes mild skew harmless. |
| Outliers | No single point is driving the difference | Look at the box plots; investigate, do not silently delete |
A worked example, all the way through
A trainer compares two coaching formats. Format A: n1 = 12, x̄1 = 78.4 and s1 = 8.2. Format B: n2 = 15, x̄2 = 71.9 and s2 = 9.6. People were assigned at random, so the groups are independent. Test at α = 0.05, two sided.
Step 1: the observed difference. 78.4 − 71.9 = 6.5 points.
Step 2: the standard error. First find the two pieces:
s12/n1 = 8.22/12 = 67.24/12 = 5.6033
s22/n2 = 9.62/15 = 92.16/15 = 6.1440
The sum is 11.7473, so SE = √11.7473 = 3.4274.
Step 3: the test statistic. t = 6.5 / 3.4274 = 1.896. The gap we saw is about 1.9 standard errors from zero.
Step 4: degrees of freedom.
Numerator: 11.74732 = 138.00
Denominator: 5.60332/11 + 6.14402/14 = 31.397/11 + 37.749/14 = 2.8543 + 2.6963 = 5.5506
df = 138.00 / 5.5506 = 24.9.
Step 5: the p-value and the decision. With about 25 degrees of freedom, the two sided cutoff at α = 0.05 is t* ≈ 2.06. Our 1.896 does not reach it, and the two sided p-value is about 0.07. Since 0.07 > 0.05, we fail to reject H0.
Step 6: say it in plain English. "Format A came out 6.5 points ahead. But with these sample sizes and this much spread, a gap at least that large, in either direction, would arise about 7 times in 100 even if the two formats were truly the same (t = 1.90, df ≈ 24.9, p ≈ 0.07). The data do not give convincing evidence of a difference." Note what we did not say: we did not say the formats are equal. Failing to reject is a failure to convict, not a verdict of innocence, and the study may simply be too small.
- Independent samples means no subject is in both groups and no natural pairing exists.
- Variances add: SE = √(s12/n1 + s22/n2). Standard deviations never add.
- t = (x̄1 − x̄2) / SE, compared with a t curve with Welch degrees of freedom.
- "Fail to reject" means the evidence is too weak. It never proves that the means are equal.
Section 2Paired samples

What makes a pair a pair
Sometimes the two columns of numbers are not two separate crowds of people. They are the same people twice, or two people matched to each other on purpose. Each observation in column 1 has a natural, real partner in column 2. That is a matched pairs (or paired) design, and it shows up all the time:
| Design | What is paired | Typical example |
|---|---|---|
| Before / after | The same subject at two times | Reaction time before and after a training module |
| Two treatments, one subject | The same subject under both conditions | Left eye vs. right eye; two tires on the same car |
| Matched subjects | Two different subjects paired on key traits | Twins; customers matched on age, region, and spend |
| Two raters, one item | The same item scored twice | Two graders scoring the same 30 essays |
| Not paired | Nothing links row i of one group to row i of the other | 40 people in treatment, 45 different people in control |
Here is the beautiful part: a paired analysis is not a new theory. Work out each pair's difference, d = (value 1) − (value 2), and throw away the original columns. Then run an ordinary one sample t-test on the single column of differences against a null value of 0.
H0: μd = 0 Ha: μd ≠ 0 t = d̄ / ( sd / √n ) df = n − 1
Here n is the number of pairs, not the number of measurements. Eight people measured twice give you n = 8 and df = 7, not n = 16.
The method is a one sample t-test, so its conditions are the one sample conditions. But they apply to the column of differences, not to the original two columns. This is the point people most often skip.
| Condition | What it means | How to check it |
|---|---|---|
| Independence of pairs | One pair's difference tells you nothing about another pair's | A random sample of pairs, or a random order within pairs. The sample is under 10% of the population. |
| Normality of the differences | The population of differences is roughly normal, or there are enough pairs | A dot plot or histogram of the d column. n ≥ 30 pairs makes mild skew harmless. The two original columns may be skewed; only d matters. |
| Outliers among differences | No single pair is driving d̄ | Scan the d column. One huge difference in a small study can create or erase significance. |
In the worked example below there are only eight pairs, so the normality of the differences carries real weight. The eight differences run from −3 to 14 with no gaps or outliers. That fits a population that is about symmetric, so the t method is reasonable. With a clearly skewed difference column, or one full of outliers, and this few pairs, the Wilcoxon signed-rank test of Section 4 would be the safer choice.
Why pairing is worth doing
People differ hugely from one another, and that person to person variation is pure noise when you are trying to detect a treatment effect. Pairing subtracts that noise away. A person who is naturally slow is slow in both columns, so the difference is not affected by how slow they are. What is left in the difference column is the effect plus measurement noise, a much quieter signal to listen to. That is why a paired design can detect an effect with eight subjects that an independent design would miss with forty. Section 4 shows this on real numbers.
A worked example, all the way through
Eight people did a task, and their reaction time in milliseconds was recorded before and after a short training module. It was the same eight people both times, so the data are paired. Test at α = 0.05, two sided, with d = before − after (so a positive d̄ means they got faster).
| Participant | Before (ms) | After (ms) | d = before − after |
|---|---|---|---|
| 1 | 412 | 400 | 12 |
| 2 | 385 | 380 | 5 |
| 3 | 401 | 404 | −3 |
| 4 | 430 | 421 | 9 |
| 5 | 396 | 382 | 14 |
| 6 | 421 | 419 | 2 |
| 7 | 408 | 401 | 7 |
| 8 | 445 | 435 | 10 |
| Mean | 412.25 | 405.25 | 7.00 |
Step 1: mean difference. The differences add up to 12 + 5 − 3 + 9 + 14 + 2 + 7 + 10 = 56, so d̄ = 56/8 = 7.00 ms. (Happily, this equals 412.25 − 405.25. The mean of the differences is always the difference of the means.)
Step 2: standard deviation of the differences. The deviations from 7 are 5, −2, −10, 2, 7, −5, 0 and 3. Their squares are 25, 4, 100, 4, 49, 25, 0 and 9, which add up to 216.
sd2 = 216 / (8 − 1) = 30.857, so sd = 5.555 ms.
Step 3: standard error. SE = 5.555 / √8 = 5.555 / 2.8284 = 1.964 ms.
Step 4: test statistic and df. t = 7.00 / 1.964 = 3.564, with df = 8 − 1 = 7.
Step 5: p-value and decision. On 7 degrees of freedom, the two sided cutoff at α = 0.05 is 2.365, and the cutoff at α = 0.01 is 3.499. Our 3.564 clears both, so the two sided p-value is a little under 0.01, about 0.009. We reject H0.
Step 6: say it in plain English. "Reaction times got better by an average of 7.0 ms after training. A mean change at least this large, in either direction, would occur in fewer than 1% of studies if training truly had no effect (paired t = 3.56, df = 7, p ≈ 0.009). So there is convincing evidence that reaction time changed." This was a before and after study with no control group, so we should stop short of crediting the training itself. Practice effects and simply getting used to the task are rival explanations that were not ruled out. The test is valid; the claim about cause is limited by the design.
- Paired data means every observation has one specific partner: the same subject twice, or subjects matched on purpose.
- Shrink the pairs to differences and run a one sample t-test on them: t = d̄ / (sd/√n), df = n − 1.
- n is the number of pairs. Eight people measured twice give df = 7.
- Check the conditions on the difference column: independent pairs, differences that are about normal (or enough pairs) and no outlier that takes over.
- Pairing removes the variation from subject to subject, which is why it is far more powerful for the same sample size.
Section 3Two proportions

When the outcome is yes-or-no
Now the outcome is not a number but a group with two levels: clicked or did not click, recovered or did not recover, passed or failed. Each group is summed up by a sample proportion, p̂ = (number of successes) / (group size). "Success" simply labels the outcome you are counting; it does not mean anything cheerful.
H0: p1 − p2 = 0 Ha: p1 − p2 ≠ 0
Here the reference curve is the standard normal, so the statistic is a z, not a t. The reason is that a proportion's standard deviation is fully set by the proportion itself: √(p(1−p)). So once you assume a value for p, there is no separate variance to estimate from data, and no degrees of freedom to lose.
The pooled proportion, and why it appears only in the test
The null hypothesis says the two population proportions are equal to some shared value. If that is true, the best estimate of that shared value uses every observation you have, ignoring the group labels:
p̂pool = (x1 + x2) / (n1 + n2)
And the standard error used for the test is built from that single pooled value:
SEpool = √( p̂pool(1 − p̂pool) × (1/n1 + 1/n2) ) z = (p̂1 − p̂2) / SEpool
A confidence interval, on the other hand, is not built under the null. It is an estimate of whatever the difference really is, so it uses the unpooled standard error, with each group's own proportion. That difference is the most common slip in this section, and Section 5 comes back to it.
The conditions are independence (as before) plus the success-failure condition. The normal approximation only works if you have enough of both outcomes. For the test, check it with the pooled proportion. All four of n1p̂pool, n1(1−p̂pool), n2p̂pool and n2(1−p̂pool) should be at least 10.
A worked example, all the way through
An email is sent in two versions. With Version 1, 45 of 150 people replied. With Version 2, 30 of 160 replied. People were assigned to a version at random. Test at α = 0.05, two sided.
Step 1: the sample proportions.
p̂1 = 45/150 = 0.300 p̂2 = 30/160 = 0.1875
The difference we saw = 0.300 − 0.1875 = 0.1125, which is 11.25 percentage points.
Step 2: the pooled proportion. p̂pool = (45 + 30)/(150 + 160) = 75/310 = 0.24194.
Step 3: check success-failure. 150(0.24194) = 36.3 and 150(0.75806) = 113.7. 160(0.24194) = 38.7 and 160(0.75806) = 121.3. All four are over 10. ✓
Step 4: pooled standard error.
p̂pool(1 − p̂pool) = 0.24194 × 0.75806 = 0.18340
1/150 + 1/160 = 0.006667 + 0.006250 = 0.012917
The product = 0.18340 × 0.012917 = 0.0023688, so SEpool = √0.0023688 = 0.04867.
Step 5: the test statistic. z = 0.1125 / 0.04867 = 2.31.
Step 6: p-value and decision. For the standard normal, the area beyond z = 2.31 in one tail is 0.0104. Doubling it for a two sided test gives p = 0.021. Since 0.021 < 0.05, we reject H0.
Step 7: say it in plain English. "Version 1 drew replies from 30.0% of people, versus 18.8% for Version 2, an 11.3 percentage point difference. If the two versions worked equally well, a gap this large or larger, in either direction, would appear in about 2% of experiments (z = 2.31, p = 0.021). So there is convincing evidence that reply rates differ." Because the assignment was random, reading this as cause is fair here, in a way it was not in Section 2.
| Quantity | Formula | Used for | In our example |
|---|---|---|---|
| Difference | p̂1 − p̂2 | Both test and interval | 0.1125 |
| Pooled p̂ | (x1+x2)/(n1+n2) | Test only | 0.24194 |
| SE, pooled | √(p̂pool(1−p̂pool)(1/n1+1/n2)) | The z-statistic | 0.04867 |
| SE, unpooled | √(p̂1(1−p̂1)/n1 + p̂2(1−p̂2)/n2) | Confidence interval only | 0.04850 |
- Two proportions use a z statistic, because there are no degrees of freedom to estimate.
- The pooled proportion is used for the test, because the null claims the proportions are equal.
- The confidence interval uses the unpooled standard error, because it does not assume the null.
- Check success-failure: at least 10 successes and 10 failures expected in each group.
Section 4Choosing the right test

Two questions get you there
People often try to memorize a dozen tests. You do not need to. In the two sample world, two questions settle it almost every time.
Question 1: what kind of outcome did you measure? If each subject gave a number you could sensibly average, such as minutes, dollars or millimeters of mercury, you are comparing means. If each subject gave a yes or no label that you are counting, you are comparing proportions. (A satisfaction rating from 1 to 5 is a true gray area. Treating it as a number is common and most often fair, but say what you did.)
Question 2: how are the two groups related? If every value in one group has a specific partner in the other, the data are paired. Otherwise, they are independent. You answer this by reading the study design, never by staring at the numbers.
| Outcome | Group relationship | Test | Statistic | Reference curve |
|---|---|---|---|---|
| Numeric | Independent | Two-sample (Welch) t-test | (x̄1−x̄2)/√(s12/n1+s22/n2) | t, Welch df |
| Numeric | Paired | Paired t-test | d̄/(sd/√n) | t, df = n−1 |
| Yes/no | Independent | Two-proportion z-test | (p̂1−p̂2)/SEpool | Standard normal |
| Yes/no | Paired | McNemar's test | Built only from the discordant pairs | Chi-square, df = 1 |
| Numeric, badly skewed / tiny n | Independent | Wilcoxon rank-sum (Mann-Whitney) | Rank-based | Its own distribution |
| Numeric, badly skewed / tiny n | Paired | Wilcoxon signed-rank | Rank-based | Its own distribution |
| Yes/no, small counts | Independent | Fisher's exact test | Exact enumeration | (exact) |
What the choice actually costs you
This is not bookkeeping, because the wrong choice changes the answer. Take the same eight people from Section 2, and pretend, wrongly, that the "before" and "after" columns came from two unrelated groups of eight people. The two column means do not change: 412.25 and 405.25, a difference of 7.00 ms. But now the spread from person to person is back in the denominator. Working from those columns, sbefore = 19.33 and safter = 19.08, so
SE = √(19.332/8 + 19.082/8) = √(46.71 + 45.49) = √92.20 = 9.602
t = 7.00 / 9.602 = 0.73, df ≈ 14, p ≈ 0.48
The same seven millisecond effect goes from p ≈ 0.009 (paired, correct) to p ≈ 0.48 (independent, wrong). It goes from convincing evidence to nothing at all. The paired standard error was 1.96 ms, and the independent one was 9.60 ms, nearly five times larger. That is because it is dominated by the fact that person 8 is simply slower than person 2. Pairing sweeps that irrelevant fact out of the math. Analyze paired data as independent, and you will often fail to find effects that are really there.
The reverse mistake is worse. If the data are truly independent, there is no way to line them up into pairs. Forcing a pairing, by sort order or by row number in a spreadsheet, makes up a relationship that does not exist. It gives a p-value with no meaning at all.
Three decisions to make before you look
Fix these ahead of time, because deciding them after seeing the data makes the p-value worthless:
- One sided or two sided? Two sided is the honest default. A one sided test is fair only when a difference in the opposite direction would be as uninteresting as no difference at all. And it must be chosen before the data are seen. Switching to one sided because your two sided p came out 0.08 is a well known way of making up a false positive.
- What is α? It is most often 0.05, but that is a habit, not a law of nature. It is how much risk of a Type I error you will accept, meaning rejecting a true null.
- How many tests will you run? Every extra test is another chance at a false positive. Twenty independent tests at α = 0.05 on data with no real effects give, on average, one "significant" finding. Decide your comparisons ahead of time, and correct for running many tests (multiplicity) if there are many.
- Two questions choose the test: a number or a yes or no outcome, and independent or paired groups.
- Paired numbers → paired t. Independent numbers → Welch t. Independent yes or no → two-proportion z. Paired yes or no → McNemar.
- Analyzing paired data as independent inflates the standard error and hides real effects.
- Fix your direction, your α and your number of comparisons before seeing results.
Section 5Two-sample confidence intervals

From a verdict to a measurement
A test gives a verdict: reject, or fail to reject. That is a thin answer. It does not say how big the difference is, and "significant" and "important" are fully different words. A confidence interval for the difference answers the better question: how big, give or take how much? And every two sample interval in this chapter has one shape:
(point estimate) ± (critical value) × (standard error)
| Comparison | Point estimate | Standard error | Critical value |
|---|---|---|---|
| Two independent means | x̄1 − x̄2 | √(s12/n1 + s22/n2) | t*, Welch df |
| Paired means | d̄ | sd/√n | t*, df = n − 1 |
| Two proportions | p̂1 − p̂2 | √(p̂1(1−p̂1)/n1 + p̂2(1−p̂2)/n2): unpooled | z* (1.96 for 95%) |
The product of the last two columns is the margin of error. Nothing else changes from method to method.
Worked: the interval for Section 1's data
Go back to the coaching study: x̄1 − x̄2 = 6.5, SE = 3.4274 and df ≈ 24.9.
Step 1: critical value. For 95% confidence with about 25 degrees of freedom, t* ≈ 2.06. (Rounding df down to 24 gives 2.064, and the difference cannot be seen at two decimals.)
Step 2: margin of error. 2.06 × 3.4274 = 7.06 points.
Step 3: the interval. 6.5 − 7.06 = −0.56 and 6.5 + 7.06 = 13.56, giving (−0.56, 13.56) points.
Step 4: read it. The interval contains 0, so "no difference" is among the believable values. That matches the earlier decision to fail to reject at α = 0.05 exactly. But it says far more than the test did. It says Format A could believably be half a point worse, or as much as thirteen and a half points better. That is a huge range. The honest conclusion is not "the formats are the same." It is "this study was too small to tell us anything useful, and it should be repeated with more people."
The other two examples work the same way. For the paired reaction times: 7.00 ± 2.365 × 1.964 = 7.00 ± 4.65, giving (2.35, 11.65) ms. That is fully above zero, which matches p ≈ 0.009. For the two email versions, use the unpooled SE = √(0.300×0.700/150 + 0.1875×0.8125/160) = √(0.001400 + 0.000952) = 0.04850. The interval is 0.1125 ± 1.96 × 0.04850 = 0.1125 ± 0.0951, giving (0.017, 0.208). That is between 1.7 and 20.8 percentage points, all positive.
Duality, and the one place it leaks
For the two t methods, the interval and the two sided test are two views of one calculation. A 95% interval that leaves out 0 matches exactly a two sided test that rejects at α = 0.05. An interval that contains 0 matches exactly a test that fails to reject. Both use the same point estimate, the same standard error and the same critical value.
For two proportions, this match is only approximate, because the test uses the pooled standard error and the interval uses the unpooled one. When a result sits very near the edge, the two can disagree. You might get a p-value of 0.048 alongside an interval whose lower limit is a hair below zero. Neither is a mistake; they are answering slightly different questions. Report both, and describe the finding as borderline, which is what it is.
What a confidence interval actually means
Here is the sentence to memorize, because the tempting version is wrong. The parameter μ1 − μ2 is a fixed, unknown number. Your interval is what varied at random, since a different sample would have given a different one. So the 95% describes the method. If you repeated this whole study without end, about 95% of the intervals it made would cover the true difference. It does not say there is a 95% chance that the true difference lies in the one interval you happen to be holding. That interval either covers the parameter or it does not, because the coin has already landed.
The p-value needs the same care. p = 0.021 means this: if the null were true, data at least this extreme would occur about 2.1% of the time. It is not the probability that the null is true, not the probability that the result was a fluke and not a measure of effect size. A trivial difference becomes "significant" with a large enough sample, and a large difference stays "not significant" with a small one. This is just why you report the interval alongside the p-value. The p-value tells you whether you can see the effect, and the interval tells you whether it is worth caring about.
- Every two sample interval is (estimate) ± (critical value)(SE). Only the SE and the critical value change.
- Use t* for means (Welch df, or n−1 when paired) and z* for proportions, with the unpooled SE.
- An interval that contains 0 matches a two sided test that fails to reject. The match is exact for t methods and approximate for proportions.
- The 95% belongs to the method over the long run, not to the single interval in front of you.
- A p-value is not the probability that the null hypothesis is true.
The chapter in one breath
- A two-sample test asks whether a gap seen between two groups is larger than chance alone would easily produce.
- For independent means, variances add: SE = √(s12/n1 + s22/n2), and t = (x̄1 − x̄2)/SE on Welch degrees of freedom.
- For paired data, shrink each pair to a difference and run a one sample t-test on the differences with df = n − 1, where n counts pairs.
- Pairing removes the variation from subject to subject. The same 7 ms effect gave p ≈ 0.009 when paired and p ≈ 0.48 when analyzed (wrongly) as independent.
- For two proportions, use a z statistic, with the pooled proportion in the test and the unpooled SE in the interval. Check success-failure.
- The design picks the test: a number vs. a yes or no outcome, and independent vs. paired groups. Decide before any math.
- Every two sample confidence interval is (estimate) ± (critical value)(SE). It reports the size of the effect that the test only votes on.
- The 95% describes the method over the long run. A p-value is the probability of the data given the null, never the probability that the null is true.
ReferenceWords worth knowing
A quick reference for the terms in this chapter. Skim it now, or come back whenever a word trips you up.
- Alternative hypothesis (Ha)
- The claim that there is a difference. In this chapter, it is most often μ1 − μ2 ≠ 0 or p1 − p2 ≠ 0.
- Confidence interval
- A range of believable values for a parameter, built as (estimate) ± (critical value)(standard error). Its confidence level describes how often the method succeeds over the long run.
- Degrees of freedom
- The number that sets the shape of a t curve. It is n − 1 for a paired test, and Welch's approximation for two independent means.
- Independent samples
- Two groups in which no subject appears twice and no observation is naturally matched to another.
- Margin of error
- The half width of a confidence interval: the critical value times the standard error.
- Matched pairs
- A design in which each observation in one condition has one specific partner in the other: the same subject twice, or subjects matched on purpose.
- Nonparametric test
- A method that does not assume a normal population and most often works from ranks. Examples are the Wilcoxon rank-sum and Wilcoxon signed-rank tests.
- Null hypothesis (H0)
- The claim of no difference between the two populations, against which the data are weighed.
- Paired t-test
- A one sample t-test applied to the differences within pairs, testing μd = 0.
- Point estimate
- The single best guess at a parameter from the sample. Here it is x̄1 − x̄2, d̄ or p̂1 − p̂2.
- Pooled proportion
- (x1 + x2)/(n1 + n2), the shared proportion estimated under the null. It is used in the two-proportion test only.
- Pooled two-sample t-test
- The older version that assumes equal population variances and combines them into one estimate. Welch's test is the safer default.
- p-value
- The probability of seeing data at least as extreme as yours if the null hypothesis were true. It is not the probability that the null is true.
- Sampling distribution
- The distribution of a statistic across all possible samples. For a difference of means, it is about a t curve centered on the true difference.
- Significance level (α)
- The cutoff, fixed ahead of time, at which a p-value counts as convincing. Put another way, it is the accepted rate of Type I error.
- Standard error
- The estimated standard deviation of a statistic: how much the difference between the two samples would wobble from study to study.
- Success-failure condition
- The rule of at least 10 expected successes and 10 expected failures in each group before trusting the normal approximation for proportions.
- t-distribution
- A bell curve with heavier tails than the normal, used when the standard deviation is estimated from data. It comes closer and closer to the normal as df grows.
- Test statistic
- (Observed − hypothesized) divided by the standard error: the difference seen, given in standard errors.
- Two-sample t-test
- The test of μ1 − μ2 = 0 from two independent samples of a numeric outcome.
- Type I error
- Rejecting a null hypothesis that is actually true: a false positive. Its long run rate is α.
- Welch's t-test
- The two-sample t-test that does not assume equal variances. It uses a formula that approximates the degrees of freedom, and it is the advised default.