Most real questions are comparisons. Did the scheme raise spending? Do two districts back the candidate equally? Is wage inequality the same in two sectors? Lesson 8 gave you the map of tests. This lesson takes the two-group branch of it apart: where the standard error of a difference comes from, why pooling works, why pairing the data can turn a failed test into a clear result, and why two intervals that overlap prove nothing.
Ashanagar is an invented district. The statistics lessons use it for every worked example, so you meet the same households again as the ideas build: first as a list of numbers, then as a spread, then as a population to sample from.
It has 60 households, each with a monthly income in rupees. Unless a page says otherwise, those 60 are the whole population, and a “sample” means a few of them drawn at random. Where a page needs two variables, it uses a smaller set of 12 households with the head’s years of schooling beside income.
The figures are illustrative, made up once and fixed. They are not official statistics.
Every two-group test compares an estimate of a difference with its standard error. What separates the tests is how the data were collected and what the standard error looks like as a result. Two questions decide it: are the two sets of numbers linked unit by unit? and is the quantity a mean, a proportion or a spread?
| Design | Example | Compare | Distribution under H₀ |
|---|---|---|---|
| Independent means | Marks in two different classes | x̄ − ȳ | z if σ is known, otherwise t (n₁ + n₂ − 2 df pooled, or Welch) |
| Paired means | The same households before and after | the mean of the differences | t, n − 1 df |
| Two proportions | Two districts’ support for a candidate | p̂₁ − p̂₂ | Standard normal |
| Two spreads | Wage variability in two sectors | s₁² ÷ s₂² | F, (n₁ − 1, n₂ − 1) df |
If one measurement in the first group has a natural partner in the second (the same household, the same student, a twin), the data are paired and the unit of analysis is the difference. Otherwise the groups are independent. Choosing wrongly changes the answer, as the puzzle at the top shows.
The sample means x̄ and ȳ each wobble from sample to sample, with standard errors σ₁ ÷ √n₁ and σ₂ ÷ √n₂. Their difference wobbles too, and the test statistic is the observed difference measured in units of that wobble. The size of the wobble is the one fact the whole lesson rests on: for independent samples the variances add, even though the means are subtracted.
From the standard error lesson, Var(X̄) = σ₁² ÷ n₁ and Var(Ȳ) = σ₂² ÷ n₂. The two samples are drawn separately, so X̄ and Ȳ are independent and Cov(X̄, Ȳ) = 0.
From the correlation lesson, Var(aU + bV) = a²Var(U) + b²Var(V) + 2ab Cov(U, V). Put U = X̄, V = Ȳ, a = 1 and b = −1. The covariance term is zero, and b² = (−1)² = 1, so
The minus sign disappears. Subtracting two uncertain numbers leaves a result that is more uncertain than either one, since each mean brings its own error and neither can cancel the other for certain.
The standard error is the square root of the variance. In the DSE 2007 example the two classes have s = 8 and 7, with n = 40 and 50. The standard errors of the means are 1.265 and 0.99, and
That is smaller than the 2.255 you would get by simply adding the two standard errors. Squares add for independent quantities, so the standard errors are the two short sides of a right-angled triangle and the standard error of the difference is the long side. The two errors are independent, so they seldom line up in the same direction at full size, and the combined error is smaller than the sum of the two.
The statistic is (x̄ − ȳ) ÷ SE, the observed gap measured in standard errors. A gap of 4 marks with SE 1.606 is 2.49 standard errors, which is why the DSE question lands between 1.96 and 2.58.
A common slip is to add the two standard errors, 8 ÷ √40 + 7 ÷ √50, and get 2.26 where the right answer is 1.61. A second is to subtract the variances because the means are subtracted. The picture shows why neither works: independent errors combine like the legs of a right-angled triangle.
Three versions of the test differ only in how the standard error is estimated. When both population standard deviations are known, use them and read the statistic against the normal curve. This is the z test of JNU 2021: with the statistic equal to x̄ − ȳ over σ√(1/n₁ + 1/n₂), a value between 1.96 and 2.58 means rejection at 5% but not at 1%. When they are unknown and the samples are large, as with the 1,000 and 1,200 mangoes of DSE 2008, z and t agree to many decimals. When they are unknown and the samples are small, you need t, and then a choice.
The statistic −2.53 lies in the rejection region, and the interval for the difference, −7.14 to −0.86, leaves out zero. At the 5% level we reject equal means. The two groups' own intervals still overlap, yet the difference is significant: overlapping intervals do not mean no difference. Try the three starting points: the same gap of 3.5 is not significant with eight households a side and is overwhelming with 180.
Start with the two classes. The gap is 4 marks and the pooled statistic is −2.53 on 88 degrees of freedom, with p = 0.013. Switch to Welch and the statistic is −2.49 on about 78 degrees of freedom: nearly the same, because the spreads (8 and 7) and the sizes (40 and 50) are close. Then choose “Eight and eight” and slide the sizes upward. The gap of 3.5 does not change, only the standard error does, and by 180 households a side it is overwhelming. Significance is a statement about the gap relative to its noise, never about the gap alone.
Suppose σ₁² = σ₂² = σ². Then s₁² and s₂² each estimate the same σ². Using both is better than using one, so we want a combined estimate. A plain average of s₁² and s₂² would treat a sample of 3 and a sample of 300 alike, which cannot be right.
A sample variance is a sum of squared deviations divided by its degrees of freedom: s₁² = SS₁ ÷ (n₁ − 1). The most information-preserving combination adds the two sums of squares and divides by the total degrees of freedom:
That is a weighted average of s₁² and s₂² with weights n₁ − 1 and n₂ − 1: the bigger sample counts for more. For the two classes, sp² = (39 × 64 + 49 × 49) ÷ 88 = 55.648, which sits between 49 and 64, closer to 49 because class 2 is larger.
SS₁ ÷ σ² is a chi-square with n₁ − 1 degrees of freedom, since one degree is spent on estimating the mean of sample 1. The same holds for SS₂ with n₂ − 1. They are independent, and independent chi-squares add by adding their degrees of freedom (the sums-of-squares result in the chi-square derivation), so
One degree is lost for each of the two sample means, which is the number JNU 2021 asks for.
Under H₀ the numerator x̄ − ȳ is normal with mean 0 and variance σ²(1/n₁ + 1/n₂). Divide by its true standard deviation and you have a standard normal Z. Replace σ by sp and, by the definition of t (a standard normal over the square root of an independent chi-square divided by its degrees of freedom), you get t with n₁ + n₂ − 2 degrees of freedom. The standard error is sp√(1/n₁ + 1/n₂).
Take the eight households of the puzzle. Their spending before and after has a large household-to-household spread: some spend ₹16 thousand and some ₹33 thousand. That spread is not what the scheme is about, but a two-sample test has to absorb it into the standard error. The paired test removes it. For each household compute the difference, then ask whether the mean difference is zero.
The last expression is the key. It is the variance-of-a-difference rule from the correlation lesson with the correlation r kept in. Here r = 0.94: households that spend a lot before spend a lot after. The large positive covariance is subtracted away, and the spread of the differences, 2.2, is less than half of either column’s own spread, 5.8 and 4.5.
| Analysis | Standard error | t | p-value |
|---|---|---|---|
| Independent samples, 14 df | 2.595 | 1.35 | 0.1988 |
| Paired, 7 df | 0.779 | 4.49 | 0.0028 |
With each household compared with itself, the rises are tightly bunched (spread 2.2), so the paired t is 4.49 and the rise is clearly real. Treated as two unrelated groups, the household-to-household differences in the level of spending swamp the rise: t is only 1.35. Pairing helps exactly when the two measurements on a unit move together.
The independent test gets t = 1.35 on 14 degrees of freedom, below the critical value 2.145, so the rise is not significant. The paired test gets t = 4.49 on 7 degrees of freedom, above 2.365, so it is. The paired test is right, because the data are paired. Use the lab’s second button to destroy the pairing, which leaves the independent test untouched and drops the paired test, since the correlation that powered it is gone.
For two sample proportions the standard error follows from the same variance-addition rule, with p(1 − p) ÷ n in place of σ² ÷ n. The new wrinkle is what to put in for p. In a test of H₀: p₁ = p₂ the null says the two populations share one proportion, so you estimate it from the combined data. In an interval there is no such assumption.
Each sample proportion has variance p(1 − p) ÷ n. The samples are independent, so by the previous derivation
The true p₁ and p₂ are unknown, so we must plug in estimates. What we plug in depends on what we are doing.
A test asks what the world would look like if H₀ were true. H₀ says p₁ = p₂ = p, one common value. Then the variance becomes p(1 − p)(1/n₁ + 1/n₂), and the best estimate of the single p uses all the data: the total number of successes over the total number of trials,
It is a weighted average of p̂₁ and p̂₂. For District A and District B, p̄ = (168 + 96) ÷ 500 = 0.528, and the standard error is √(0.528 × 0.472 × (1/300 + 1/200)) = 0.0456.
An interval does not assume p₁ = p₂. It tries to say how large the difference is, so each proportion keeps its own variance, estimated by its own p̂(1 − p̂) ÷ n. For the same data the standard error is √(0.56 × 0.44 ÷ 300 + 0.48 × 0.52 ÷ 200) = 0.0455, and the 95% interval for p₁ − p₂ is 0.08 ± 1.96 × 0.0455, which is −0.009 to 0.169.
z = 0.08 ÷ 0.0456 = 1.76, below 1.96, and the interval contains 0. They can disagree only in a close call, because the two standard errors, 0.0456 and 0.0455, differ slightly. The rule to remember is simple: pool for the test, do not pool for the interval.
JAM 2022 asks for the standard deviation of P̄₁ − P̄₂ when sampling is without replacement from finite populations. Each variance keeps its own n and its own finite-population correction, and the two add under a root: the same rule, with an extra factor (N − n) ÷ (N − 1) on each term.
To ask whether two normal populations are equally spread out, divide one sample variance by the other. Each (n − 1)s² ÷ σ² is a chi-square, so under H₀: σ₁² = σ₂² the common σ² cancels and the ratio is an F distribution with (n₁ − 1, n₂ − 1) degrees of freedom (UOH 2019). This is the reason the F distribution exists, and the chi-square, t and F derivation shows it from scratch.
In UGC NET 2025, samples of 20 and 15 have variances 35.53 and 34.92, so F = 35.53 ÷ 34.92 = 1.02. With (19, 14) degrees of freedom the acceptance band at 5% runs from 0.378 to 2.861. An F of 1.02 is deep inside it, so there is no evidence that the variances differ.
Why does the lower limit exist if you always put the larger variance on top? You can put either on top. Swapping them turns F into 1/F and swaps the degrees of freedom, and the lower critical value for (d₁, d₂) is exactly the reciprocal of the upper critical value for (d₂, d₁): 0.378 × 2.647 = 1. Putting the larger on top just means you only need the upper limit.
The interval for μ₁ − μ₂ is the difference plus or minus the critical value times the standard error. It carries the same verdict as the test and more: the 95% interval excludes zero exactly when the two-sided 5% test rejects. For the two classes, the difference is −4 and the 95% interval is −7.14 to −0.86, which excludes zero, matching p = 0.013.
The tempting shortcut is to build a 95% interval for each group and call the difference significant if the two do not overlap. That is a sufficient condition, not a necessary one. Two independent 95% intervals can overlap and the difference still be significant, because the standard error of the difference, √(SE₁² + SE₂²), is smaller than SE₁ + SE₂. The class example does exactly this: the two groups’ own intervals overlap, yet p = 0.013. The first plot of the lab shows both intervals.
Overlapping intervals do not mean “no difference”. Judge the difference by the interval for the difference.
With small samples from clearly skewed populations the t tests lose their footing. The replacements use ranks: the Wilcoxon rank-sum (equivalently Mann-Whitney) test for two independent samples, and the Wilcoxon signed-rank test for paired data (JNU 2021). The names are close and an examiner relies on that: the signed-rank test needs pairs, the rank-sum test does not.
Definitions and one-step calculations. Most CUET and Hyderabad questions sit here.
Joint tables, standard errors and statement questions, up to JNU and IIT JAM level.
This topic’s hardest questions, from the DSE entrance, are worked through in Lesson 13: Tests on means and proportions.
These are questions from the TestStop bank. A free account answers 10 a day, each with its worked solution; All-Access opens every set with no daily limit.