t-Tests and Chi-Squared Tests: Which One, and Why
GATE 2027 DA core: z-test, t-test, chi-squared test, t and chi-squared distributions
“Pick the right test in ten seconds, get the degrees of freedom right, and stop losing marks on assumptions.”
1.Which test? Decide before you calculate
§ 5.1.Prerequisites: the testing framework (H₀, H₁, α, p-value, rejection region) from [confidence intervals and the z, t and chi-square tests](/notes/probability-and-statistics/confidence-intervals-z-t-and-chisquare-tests), and the t and chi-squared distributions from [sampling distributions](/notes/probability-and-statistics/sampling-distributions-chisquare-t-and-f).
Most mistakes happen before any arithmetic, when the wrong test gets picked. Ask two questions. Is the data numeric measurements or counts in categories? Counts point to chi-squared. For measurements, do you know the population standard deviation σ? If yes (or n is large), use z. If you estimate it with the sample standard deviation s, use t.
The t distribution looks like the normal distribution but has heavier tails, because s itself varies from sample to sample. As df grows, t approaches the standard normal, which is why large samples can use z.
2. The decision table
| Feature / Aspect | Situation | Test and statistic | Degrees of freedom |
|---|---|---|---|
| One mean, σ known | Mean of a measurement vs a claimed μ₀ | z = (x̄ − μ₀)/(σ/√n) | none (standard normal) |
| One mean, σ unknown | Small sample, roughly normal population | t = (x̄ − μ₀)/(s/√n) | n − 1 |
| Before vs after on the same units | Paired measurements | one-sample t on differences d | n − 1 (pairs) |
| Two independent groups | Equal variances assumed | pooled two-sample t | n₁ + n₂ − 2 |
| Counts vs expected proportions | One categorical variable, k categories | χ² goodness of fit | k − 1 − (parameters estimated) |
| Are two categories related? | Contingency table, r rows × c columns | χ² test of independence | (r − 1)(c − 1) |
✎ Takeaway: Measurements and known σ: z. Measurements and estimated σ: t. Counts: χ².
3. Worked example: one-sample t-test
| n9 | x̄52 g | s3 g | μ₀50 g |
σ is unknown and n is small, so use a one-sample t-test.
↳ Result: H₀: μ = 50, H₁: μ ≠ 50Standard error s/√n = 3/3 = 1.
df = n − 1 = 8. For a two-sided test at α = 0.05, use t(0.975, 8).
↳ Result: t_crit = 2.306|2.0| < 2.306, so the statistic is not in the rejection region.
↳ Result: Fail to reject H₀4. Worked example: chi-squared goodness of fit
A fair die gives 60/6 = 10 for every face.
↳ Result: E = 10 for all six facesSquared deviations are 4, 4, 1, 1, 16, 16.
k = 6 categories and no parameters estimated from the data.
↳ Result: df = 5The critical value χ²(0.05, 5) is 11.070. 4.2 < 11.070.
↳ Result: Fail to reject H₀5. Worked example: chi-squared test of independence
Passed 50, failed 30, N = 80; each row has 40.
↳ Result: Row totals 40, 40; column totals 50, 30E = row total × column total / N.
Every cell is 5 away from its expected count.
df = (2 − 1)(2 − 1) = 1, and χ²(0.05, 1) = 3.841. 5.33 > 3.841.
↳ Result: Reject H₀6.Common mix-ups
§ 5.6.Pairing removes the variation between individuals, so the two-sample test wastes power and uses the wrong df.
The statistic depends on sample size. 30% of 10 and 30% of 1000 carry very different evidence.
Small samples often fail to reject even when an effect exists.
Practice
A 3 × 4 contingency table is tested for independence. How many degrees of freedom does the chi-squared statistic have?
12 students take a test before and after a revision session. Which test compares the means correctly?
Counts in 5 categories are tested against a Poisson model whose mean was estimated from the same data. What is the df?
Why does a t-test need a larger statistic than a z-test to reject at the same α with a small sample?
One-minute revision
“Counts → χ². Measurements with known σ → z. Measurements with estimated σ → t.”
- •t = (x̄ − μ₀)/(s/√n), df = n − 1
- •Pooled t: df = n₁ + n₂ − 2
- •χ² = Σ(O − E)²/E
- •Independence: df = (r−1)(c−1); fit: df = k − 1 − estimated params
- •Paired ≠ two-sample
- •Counts, not percentages
- •Expected counts ≥ ~5
- •Fail to reject ≠ accept
Primary Academic References & Exam Sources
Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.