Skip to content
We use only essential cookies to keep you signed in and remember your preferences. See our Cookie Policy.
TestStop
MocksPracticeResourcesIndiaBlogPricing
Sign in
Resources › Statistical inference › 8. Tests in practice
Statistical inference · Lesson 8 of 13

The tests you will be asked

Lesson 7 built the machinery of a test. Here it is put to use. Every test in this lesson has the same shape: a statistic that measures how far the data sit from the null, divided by its standard error, compared with a distribution you already know. What changes from test to test is which statistic, and which distribution. The skill the exams reward is choosing correctly, so the lesson starts with a map and ends with a drill.

← Statistical inference moduleLesson 8 of 13 · about 55 minutes
1Joint distributions2Sampling3CLT4Estimators5Likelihood6Intervals7Testing8Tests in practice9Two samples10Chi-square tests11ANOVA12Regression inference13Hard problems
A question to hold on to
A poll of 300 voters in District A and 200 in District B shows 56% and 48% in favour of a candidate. At the 5% level, test (a) whether the two districts differ, and (b) whether the candidate is preferred in District A, meaning that more than half of its voters favour the candidate.
DSE 2007Solved at the end ↓
In this guide
Lesson · about 55 minutes
  1. Which test? A map
  2. One mean: z and t
  3. Two means, paired data and two proportions
  4. Variances: F, and the t test for a correlation
  5. Chi-square for association
  6. Several means: ANOVA in one picture
  7. Parametric and non-parametric
  8. Which test? A drill
  9. The opening question, solved
  10. The lesson on one screen
  11. Check yourself
  12. Past papers, by level
01
The idea

Which test? A map

Two questions pick the test. How many groups and what kind of data? And what is known about the spread? Almost every test is a statistic of the form (estimate − null value) ÷ standard error, compared with the normal, t, chi-square or F distribution (the four of Lesson 6).

SituationStatisticDistribution under H₀
One mean, σ knownσ/n​xˉ−μ0​​Standard normal
One mean, σ unknowns/n​xˉ−μ0​​t, n − 1 df
One proportionp0​(1−p0​)/n​p^​−p0​​Standard normal
Two independent meanssp​1/n1​+1/n2​​xˉ−yˉ​​t, n₁ + n₂ − 2 df (z with σ known)
Paired datasd​/n​dˉ​t, n − 1 df
Two proportionspˉ​(1−pˉ​)(1/n1​+1/n2​)​p^​1​−p^​2​​Standard normal
Two variancess12​/s22​F, (n₁ − 1, n₂ − 1) df
Association, goodness of fit∑(O−E)2/EChi-square, (r − 1)(c − 1) df
Several meansBetween ÷ within mean squaresF, (k − 1, N − k) df
02
One sample

One mean: z and t

For a normal sample, the standardised mean follows a t distribution with n − 1 degrees of freedom when σ is estimated by s (CUET 2018), so for a test of a mean against an unknown-variance alternative the test statistic is Student’s t (GATE 2026). Be careful with the standard error: it is s/√n, not s/√(n − 1) and not s/n (UGC NET 2024). For a one-sided alternative such as “the average salary is greater than 64” you use a one-sided hypothesis, and reject when the calculated t exceeds the tabulated value (JNU 2020).

DSE 2009 · hard
In a survey of 102 Timarpur residents the average monthly income is ₹4,635. A previous study puts the population variance of income at 12,342. It is asserted that the mean is ₹4,650. Can the assertion be rejected at 10%? at 5%?
  1. 1
    σ is known from earlier work, so use z.
    σ = √12,342 = 111.1. Standard error = 111.1 ÷ √102 = 11.0.
  2. 2
    Statistic.
    z = (4,635 − 4,650) ÷ 11.0 = −1.36.
  3. 3
    Compare.
    The two-sided critical values are ±1.645 at 10% and ±1.96 at 5%. |−1.36| is below both.
Answer
The assertion is not rejected at 10%, and so not at 5% either: option C. The sample mean differs from the claim by 15 rupees, but a standard error of 11 means that is well inside normal sampling variation.

One proportion

In a test of a proportion the null value supplies the standard error, since you are asking what would happen if H₀ were true. Of 100 people, 64 are vaccinated and H₀ is π = 0.58. The standard error under H₀ is √(0.58 × 0.42 ÷ 100) = 0.0494, so z = (0.64 − 0.58) ÷ 0.0494 = 1.22 (IIT JAM 2023). That is below 1.96, so a two-sided 5% test does not reject H₀.

03
Two samples

Two means, paired data and two proportions

To compare two independent means, divide the difference by the standard error of the difference, √(σ₁²/n₁ + σ₂²/n₂). With a common variance estimated from both samples, the statistic is a t with n₁ + n₂ − 2 degrees of freedom (JNU 2021), one degree lost for each sample mean. Lesson 9 takes this branch apart: why the variances add, pooled and Welch tests, and why pairing matters.

DSE 2007 · hard
Two classes sit an exam. Class 1: 40 students, mean 74, standard deviation 8. Class 2: 50 students, mean 78, standard deviation 7. Is there a significant difference at 5%? at 1%? (Critical values ±1.96 and ±2.58.)
  1. 1
    Standard error of the difference.
    √(8² ÷ 40 + 7² ÷ 50) = √(1.60 + 0.98) = √2.58 = 1.606.
  2. 2
    Statistic.
    z = (74 − 78) ÷ 1.606 = −2.49.
  3. 3
    Compare.
    |−2.49| is above 1.96 and below 2.58.
Answer
Significant at 5%, not at 1%: option B. A statistic between 1.96 and 2.58 always lands here: reject at 5%, no rejection at 1% (JNU 2021). With samples of 1,000 and 1,200 and means 30 g apart, as in DSE 2008, the statistic is near 66 and the null is rejected at any level one cares to name.

Paired data

If the two measurements are on the same unit, the same eight households before and after a scheme, they are not independent, and the right move is to take the difference for each unit and run a one-sample t test that the mean difference is zero. In the invented example the spending rises are 4, 3, 0, 5, 6, 1, 6 and 3 thousand rupees. The mean difference is 3.5, the standard deviation of the differences is 2.20, and t = 3.5 ÷ (2.20 ÷ √8) = 4.49 on 7 degrees of freedom. The two-sided 5% critical value is 2.365, so the rise is significant. Treating the same data as two independent samples would ignore that each household is compared with itself, and would throw away most of the power.

Two proportions: the opening question

Under H₀: p₁ = p₂ the two samples share one proportion, so the standard error uses the pooled proportion. Pooled: (0.56 × 300 + 0.48 × 200) ÷ 500 = 264 ÷ 500 = 0.528, and the standard error is √(0.528 × 0.472 × (1/300 + 1/200)) = 0.0456.

DSE 2007 · hard
56% of 300 voters in District A and 48% of 200 in District B favour a candidate. At 5%: (a) do the districts differ? (b) Is the candidate preferred in District A?
  1. 1
    (a) Two-sided test of equal proportions.
    z = (0.56 − 0.48) ÷ 0.0456 = 1.76. The critical value is 1.96, so no significant difference.
  2. 2
    (b) One-sided test of p = 0.5 in District A.
    Standard error under H₀ = √(0.25 ÷ 300) = 0.0289, so z = 0.06 ÷ 0.0289 = 2.08, above the one-sided critical value 1.645. Preferred.
Answer
No significant difference between the districts, yet the candidate is preferred in District A: option B. The two conclusions do not contradict each other. They are answers to different questions, a two-sample test with two-sided tails and a one-sample test with one tail.
04
Spread and association

Variances: F, and the t test for a correlation

To test whether two normal populations have the same variance, take the ratio of the sample variances. Under H₀: σ₁² = σ₂² it follows an F distribution with (n₁ − 1, n₂ − 1) degrees of freedom (Hyderabad 2019). Samples of 20 and 15 with variances 35.53 and 34.92 give F = 35.53 ÷ 34.92 = 1.02 (UGC NET 2025). The 5% critical value for (19, 14) degrees of freedom is 2.40, far above 1.02, so there is no evidence the variances differ. Put the larger variance on top, and an F near 1 is always consistent with equality.

To test whether a correlation is different from zero, use the t statistic r√(n − 2) ÷ √(1 − r²) with n − 2 degrees of freedom (Hyderabad 2016). With r = 0.6 and n = 27 it is 0.6 × 5 ÷ 0.8 = 3.75, well past the critical value 2.06 for 25 degrees of freedom. The same t test, applied to a regression slope, is Module 3’s business. Note what is not a t test: the t statistic does not test the overall significance of a regression as a whole, that is the F statistic’s job (Hyderabad 2019).

05
Interactive

Chi-square for association

The chi-square test is used for association between attributes (Hyderabad 2015): two categorical variables, summarised in a table of counts. If they were unrelated, each cell would hold (row total × column total) ÷ grand total. The statistic adds up how far each observed count O is from that expected count E, scaled by E. Its shape is fixed by its degrees of freedom (CUET 2019), here (rows − 1) × (columns − 1).

Chi-square test of independence
χ2=cells∑​E(O−E)2​,E=grand totalrow total×column total​,df=(r−1)(c−1)
Reject independence when the statistic is above the upper critical value. Every expected count should be at least about 5.

Households by head’s schooling and whether the household holds a bank account (invented). Type any counts.

Has an accountNo accountTotal
No schoolingexpected 21contributes 3.86expected 29contributes 2.7950
Primaryexpected 21contributes 0.05expected 29contributes 0.0350
Secondary or moreexpected 21contributes 4.76expected 29contributes 3.4550
Total6387150
χ² = Σ (O − E)² ÷ E14.943
Degrees of freedom (r − 1)(c − 1)2
5% critical value5.991
p-value0.0006

χ² = 14.94 exceeds 5.99, so at the 5% level we reject independence: schooling and account-holding are associated. The shaded cells, with the longest bars, are where the table departs most from what independence predicts. Account-holding rises with schooling, far more than chance would explain.

In the first table, 150 households by schooling and account-holding, the expected count in every cell of the first column is 21. The observed counts, 12, 20 and 31, are far from 21 in both directions, and the statistic is 14.94 on 2 degrees of freedom against a 5% critical value of 5.99. Independence is rejected. Edit a few cells to see how little it takes to pull the statistic below the line. The same statistic, with expected counts from a hypothesised distribution instead of from margins, gives the goodness-of-fit test, with degrees of freedom (categories − 1). Lesson 10 derives both tests and adds Cramér’s V.

06
Interactive

Several means: ANOVA in one picture

To compare more than two means at once, do not run every pairwise t test: the false-alarm rate climbs with the number of tests (Lesson 7). One-way analysis of variance tests all the means together. Its idea is a split of the total variation in the data, SST, into the part explained by group membership, SSB (between groups), and the part left over, SSW (within groups).

One-way ANOVA
F=SSW/(N−k)SSB/(k−1)​,SST=SSB+SSW
k groups, N observations in all. Under H₀: all group means are equal, F follows an F distribution.
Farm, mean ₹409Construction, mean ₹453Factory, mean ₹522₹300₹400₹500₹600₹700
grand mean ₹461group means
SourceSum of squaresdfMean squareFp-value
Between groups51,458225,72925.17< 0.0001
Within groups21,466211,022
Total72,92423

The group means differ by more than the scatter inside the groups would lead us to expect: F = 25.2 on (2, 21) degrees of freedom, so we reject the hypothesis that all three mean wages are equal. ANOVA does not say which group differs. It says at least one does. Widen the spread inside the groups to watch F fall without moving a single group mean.

Read F as a signal-to-noise ratio. The numerator is how far apart the group means are, per degree of freedom. The denominator is the ordinary scatter of workers around their own group’s mean. If the groups really have the same mean, both estimate the same variance and F is near 1. The lab’s first slider pulls the Factory group down towards the others and F collapses. The second slider widens the scatter, and F also falls though no mean has moved. A significant F says at least one mean differs. It does not say which, and a follow-up comparison is needed for that. In a simple regression the F test is the square of the t test on the slope.

Derive it

Why total variation splits into between and within: SST = SSB + SSW

We want to show
For groups of observations, ∑∑(ygi​−yˉ​)2=∑g​ng​(yˉ​g​−yˉ​)2+∑∑(ygi​−yˉ​g​)2.
  1. 1
    Split each worker's distance from the grand mean.

    Let ȳ be the grand mean and ȳg the mean of the worker’s own group. Then

    ygi​−yˉ​=(yˉ​g​−yˉ​)+(ygi​−yˉ​g​)

    Between plus within: how far the worker’s group sits from the grand mean, then how far the worker sits from the group.

  2. 2
    Square and add over everyone.
    SST∑∑(ygi​−yˉ​)2​​​=SSB∑∑(yˉ​g​−yˉ​)2​​+SSW∑∑(ygi​−yˉ​g​)2​​+2∑∑(yˉ​g​−yˉ​)(ygi​−yˉ​g​)​

    In SSB the same value (ȳg − ȳ)² is added once for every member of the group, which is why it appears as ng(ȳg − ȳ)².

  3. 3
    The cross term is zero.

    Inside group g the factor (ȳg − ȳ) is the same for every member, so it comes outside the inner sum, which is Σ(ygi − ȳg). Deviations from a group’s own mean add to zero. Every group contributes 0, so the whole cross term is 0 and SST = SSB + SSW.

  4. 4
    See it, and break it.

    Pick a worker: the total gap, the between gap and the within gap add as plain numbers. Then drag the group means together or apart with the slider. SSB changes, SSW stays where it is, and SST always equals their sum. If the pieces were allowed a cross term, the bars would not match.

  5. 5
    What it is used for.

    For the wages of the three sectors: SST = 72,924 splits into SSB = 51,458 and SSW = 21,466. SSB ÷ SST = 0.71, so about 71% of the variation in wages goes with the sector. The F ratio compares the two parts per degree of freedom, (51,458 ÷ 2) ÷ (21,466 ÷ 21) = 25.17: when group means differ a lot compared with the scatter inside groups, the ratio is large.

Step 1 of 5
So
The decomposition holds because deviations from a group’s own mean cancel inside the group. The same step is behind R² = SSR ÷ SST in regression, where explained and residual parts play the roles of between and within.
07
When the assumptions fail

Parametric and non-parametric

The t, z and F tests are parametric: they assume a distribution, usually normal, for the data (Hyderabad 2019). The chi-square test is generally treated as non-parametric (IIT JAM 2024), since it does not assume a distribution for the observations. Small-sample tests can be used on large samples, but not the reverse. When the data are clearly not normal and the sample is small, rank-based tests replace the t test:

  • Wilcoxon rank-sum (equivalently Mann-Whitney) for two independent samples. It replaces the two-sample t test (JNU 2021).
  • Wilcoxon signed-rank for paired data. It replaces the paired t test.
  • Kruskal-Wallis for several independent samples. It replaces one-way ANOVA.

One question asks which statement is not true among several about tests, and the false one is that the t-statistic is for testing overall significance of a model as a whole (Hyderabad 2019): that is the F test.

In economics

Applied papers use these tests constantly, though often behind a regression command: a t test for each coefficient, an F test for a group of coefficients, a chi-square test of a restriction. This lesson is where those tests come from. Module 3 returns to them in the regression setting.

08
Drill

Which test? A drill

The hardest step in the exam is the first: naming the test. Seven situations, seven tests. Look for the number of groups, whether the units are paired and what the data are.

Which test? · 1 of 7
A district claims a mean household income of ₹30,000. You sample 25 households and have the sample mean and the sample standard deviation.
The pattern

Every test here is an estimate minus its null value, over a standard error, compared with a table. A proportion supplies its own spread, a mean needs s, a pair is one sample of differences, a table of counts needs χ², and several means need F.

Watch out for

The mistakes examiners are fishing for

  • Paired data are not two independent samples. Take differences first.
  • Degrees of freedom. One mean: n − 1. Two pooled means: n₁ + n₂ − 2. Chi-square: (r − 1)(c − 1). F: two numbers.
  • Standard error under H₀. A test of a proportion uses p₀, a confidence interval uses p̂.
  • One-sided against two-sided. The same data can be significant for one and not the other (the opening question).
  • A significant ANOVA does not name the different group.
09
Solving the opening question

The opening question, solved

Both parts were worked in the two-proportions section above: (a) z = 1.76 against 1.96, no significant difference between the districts; (b) z = 2.08 against 1.645, the candidate is preferred in District A. That is option B of DSE 2007. The two answers look paradoxical until you see that the first test spends its α on both tails and uses a larger standard error from two noisy samples, while the second has a one-sided alternative and a single sample against a fixed 50%.

10
Revise

The lesson on one screen

The lesson on one screen
Shape of every test
(estimate − null value) ÷ standard error, compared with N, t, χ² or F.
One mean
z with σ known, t with n − 1 df and s/√n otherwise. One proportion: standard error from p₀.
Two means
Independent: difference over √(s²/n₁ + s²/n₂), t on n₁ + n₂ − 2 df when pooled. Paired: one-sample t on the differences.
Two proportions
Pooled proportion in the standard error. Two-sided and one-sided versions can disagree.
Variances, correlation
F = s₁²/s₂² on (n₁ − 1, n₂ − 1) df. Correlation: t = r√(n − 2)/√(1 − r²) on n − 2 df.
Chi-square
Σ(O − E)²/E, E = row × column ÷ total, df = (r − 1)(c − 1). Association between attributes, or goodness of fit.
ANOVA
F = [SSB/(k − 1)] ÷ [SSW/(N − k)]. Tests that all means are equal, not which differs. Non-parametric stand-ins: Wilcoxon rank-sum, signed-rank, Kruskal-Wallis.
11
Practice

Check yourself

0 of 13 correct so far

Compute

A one-sample t statistic
H₀: μ = 100. A sample of 25 has mean 105 and standard deviation 15. Find the t statistic.
Two proportions
45% of 200 households in town A and 35% of 150 in town B own a refrigerator. Find the z statistic for H₀: p₁ = p₂, using the pooled proportion.
Two means
Sample 1: n = 50, mean 62, standard deviation 10. Sample 2: n = 60, mean 58, standard deviation 12. Find the z statistic for the difference in means (do not pool).
Paired data
Eight households’ spending rises by 4, 3, 0, 5, 6, 1, 6 and 3 (thousand ₹) after a scheme. Find the paired t statistic for H₀: mean rise = 0.
An F statistic
Sample 1 has n = 21 and variance 50. Sample 2 has n = 16 and variance 20. Find the F statistic for equal variances, with the larger variance on top.
A chi-square statistic
A 2 × 2 table has rows 30, 20 and 20, 30. Find the chi-square statistic for independence.
A correlation test
r = 0.6 from n = 27 pairs. Find the t statistic for H₀: ρ = 0.
ANOVA
Three groups, N = 30 observations. The between-groups sum of squares is 120 and the within-groups sum of squares is 270. Find F.

Quick questions

1To test whether two normal populations have equal variances, use
2A sample of 9 from a normal population with unknown σ is used to test H₀: μ = μ₀. The statistic follows
3A chi-square test of independence is run on a table with 3 rows and 4 columns. The degrees of freedom are
4A significant one-way ANOVA tells you that
5Two independent samples are clearly non-normal and small. A suitable non-parametric test is
12
Real questions

Past papers, by level

Foundation

Definitions and one-step calculations. Most CUET and Hyderabad questions sit here.

2 questionsPractise →

Standard

Joint tables, standard errors and statement questions, up to JNU and IIT JAM level.

6 questionsPractise →

Delhi School level

This topic’s hardest questions, from the DSE entrance, are worked through in Lesson 13: Tests on means and proportions.

4 questionsLesson 13 →
All 8 past-paper questions for this lesson, easiest first: practise the full set →

✦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.

← Lesson 7Hypothesis testing: errors, power and p-valuesLesson 9 →Comparing two groups: means, proportions and spreads

Read next

All resources →
StatisticsInference 9: comparing two groups, means, proportions and variancesWhy the variances add in the standard error of a difference, the pooled and Welch t tests, paired data, the pooled test for two proportions, the F test for two variances, and the overlap trap for confidence intervals.Complete guide · 55 minStatisticsHypothesis testing in one placeThe 2×2 of Type I and Type II errors, power and p-values, with a lab that shows the α–β trade-off as areas.Complete guide · 30 minStatisticsStatistical inference for economics students, from joint distributions to hypothesis testsA module in thirteen lessons: joint distributions and covariance, sampling and the sampling distribution, the standard error and the central limit theorem, estimators and maximum likelihood, confidence intervals, hypothesis tests and p-values, two-sample tests, chi-square tests, analysis of variance and regression inference, on one running example with labs to move and graded past papers.Module · 635 min