Analysis of Variance (ANOVA) for SSC CGL Statistics

advanced 20 min read

Concept

Analysis of Variance — ANOVA — answers a deceptively simple question: are the means of several groups actually different, or is the observed variation just noise?

Here is the core analogy. Imagine you have three classrooms taught by three different teachers. The students' scores vary. Some variation comes from the teaching method (between-classroom differences). Some variation comes from individual students being inherently different from each other (within-classroom differences). ANOVA splits total variation into these two buckets and asks: is the between-group bucket disproportionately large?

If between-group variation is much larger than within-group variation, you have evidence that the group means differ. If both buckets are roughly the same size, the group differences are probably just random scatter.

The test statistic is the F-ratio: the ratio of mean square between groups to mean square within groups. Under the null hypothesis (all group means are equal), both quantities estimate the same population variance — so the ratio should be close to 1. A ratio significantly greater than 1 triggers rejection of the null.

Why not just run multiple t-tests? Look — if you have 4 groups and run all pairwise t-tests, you have 6 comparisons. At 5% significance each, your actual Type I error rate balloons far beyond 5%. ANOVA controls this by doing one omnibus test.

Two main variants appear in SSC CGL Statistics paper:

The entire SSC CGL ANOVA question set reduces to one skill: correctly computing degrees of freedom. Master that and you solve every question in this topic in under 30 seconds.


Deep Dive

The Partition of Total Variation

For one-way ANOVA with k groups and N total observations, let x_{ij} be the j-th observation in group i, \bar{x}_i be the group mean, and \bar{x} be the grand mean.

Total Sum of Squares (SST) splits cleanly:

SST=SSB+SSWSST = SSB + SSW

where:

SSB=i=1kni(xˉixˉ)2(Between Groups)SSB = \sum_{i=1}^{k} n_i(\bar{x}_i - \bar{x})^2 \quad \text{(Between Groups)}

SSW=i=1kj=1ni(xijxˉi)2(Within Groups / Error)SSW = \sum_{i=1}^{k}\sum_{j=1}^{n_i}(x_{ij} - \bar{x}_i)^2 \quad \text{(Within Groups / Error)}

Degrees of Freedom — The Only Thing That Gets Tested

This is the leverage point. Every SSC CGL ANOVA question lives here.

One-way ANOVA:

| Source | df | |---|---| | Between Groups (Treatment) | k1k - 1 | | Within Groups (Error) | NkN - k | | Total | N1N - 1 |

Verification: (k1)+(Nk)=N1(k-1) + (N-k) = N-1. Always check this adds up — it's your built-in answer verification.

Two-way ANOVA without replication (one observation per cell, r rows, c columns):

| Source | df | |---|---| | Rows | r1r - 1 | | Columns | c1c - 1 | | Error (Residual) | (r1)(c1)(r-1)(c-1) | | Total | rc1rc - 1 |

The error df formula (r1)(c1)(r-1)(c-1) is not arbitrary — it equals dftotaldfrowsdfcolumns=(rc1)(r1)(c1)df_{total} - df_{rows} - df_{columns} = (rc-1) - (r-1) - (c-1). Expanding: rc1r+1c+1=rcrc+1=(r1)(c1)rc - 1 - r + 1 - c + 1 = rc - r - c + 1 = (r-1)(c-1).

Two-way ANOVA with replication (n observations per cell, a levels of factor A, b levels of factor B):

| Source | df | |---|---| | Factor A | a1a - 1 | | Factor B | b1b - 1 | | Interaction (A×B) | (a1)(b1)(a-1)(b-1) | | Error | ab(n1)ab(n-1) | | Total | abn1abn - 1 |

This is where SSC CGL likes to set traps. The interaction df (a1)(b1)(a-1)(b-1) is easy to confuse with the error df ab(n1)ab(n-1).

Mean Squares and the F-Ratio

Mean squares are simply sum of squares divided by their degrees of freedom:

MSB=SSBk1,MSW=SSWNkMSB = \frac{SSB}{k-1}, \quad MSW = \frac{SSW}{N-k}

F=MSBMSWF = \frac{MSB}{MSW}

Do not compute F as SS/SS — that is the single most common wrong answer in SSC CGL options. It is always mean square over mean square.

What F = 1 Means

When the null hypothesis is true (all population means equal), MSB and MSW both estimate the same underlying population variance σ2\sigma^2. So F1F \approx 1. When group means genuinely differ, MSB inflates, pushing F above 1. This is why the null hypothesis F-expectation is 1, not 0.

Assumptions of ANOVA (for MCQ recognition)

Three classical assumptions:

  1. Observations are independent.
  2. Populations are normally distributed.
  3. Population variances are equal across groups — this is called homoscedasticity or homogeneity of variance.

If a question asks "which assumption is violated when group variances differ significantly," the answer is homogeneity of variance, not normality.


Memory Tricks & Shortcuts

patternThe N-minus rule for df

One-way ANOVA df in 5 seconds: Between = N minus something small (N − (N−k+1) = k−1), Within = N minus something big (N − k). More precisely: Between = (groups − 1), Within = (total − groups). Freeze this as two subtractions: "groups minus 1" and "total minus groups." For any question with k=4, N=20: Between = 3, Within = 16, Total = 19. Verify: 3 + 16 = 19. Standard calculation: 20 seconds. With this pattern: 8 seconds.

patternTwo-way without replication: the rectangle formula

For two-way ANOVA without replication with r rows and c columns, error df = (r−1)(c−1). Think of it as the area of a rectangle with sides (r−1) and (c−1). For 3 rows and 4 columns: rectangle is 2 × 3 = 6. No subtraction chain needed. Standard approach (subtract row df and column df from total df): 3 steps, ~25 seconds. Rectangle formula: 1 multiplication, 8 seconds.

patternInteraction df in two-way with replication

Interaction df = (a−1)(b−1). This is identical in form to the two-way-without-replication error formula — same pattern, different context. The distinction: with replication, error df = ab(n−1), NOT (a−1)(b−1). So when a question gives you n observations per cell and asks for interaction df, use (a−1)(b−1). When it asks for error df, use ab(n−1). Confusing these two is the trap SSC CGL sets. Writing both formulas side by side when you read the question takes 5 seconds and eliminates the wrong options instantly.

eliminationF-ratio elimination

In any MCQ asking for F-ratio definition, eliminate options with SS/SS (sum of squares over sum of squares) — that is never the F-ratio. Eliminate options with MSW/MSB (within over between) — F is always the larger variance source on top. Only MS/MS with between on top survives. This eliminates 3 of 4 options in under 10 seconds without any calculation.

patternNull hypothesis F-value anchor

When the null is true, F expected = 1. When a question asks "what is F when all group means are equal," anchor to 1. It cannot be 0 (that would require zero between-group variation, which is impossible with real data unless all observations in all groups are identical). It cannot equal the number of groups (that has no statistical meaning). It cannot be greater than the critical value by definition when null is true. Only 1 survives. Zero-calculation answer in 5 seconds.


Fast-Solving Framework

Read the question stem and immediately identify:

Step 1 — One-way or two-way?

Step 2 — With or without replication?

Step 3 — What is being asked?

Step 4 — Verify. For one-way: df(between) + df(within) = N−1. If it does not add up, you misread k or N.

Total time for a degrees-of-freedom question: under 25 seconds.


Solved PYQs

Why this question: Tests the most basic one-way ANOVA df formula — the foundation everything else builds on.

Previous Year Questionपिछले वर्ष का प्रश्न
In a one-way ANOVA, if there are 4 groups and a total of 20 observations, what is the degrees of freedom for the error (within groups)?
एक-तरफा ANOVA में, यदि 4 समूह हैं और कुल 20 observations हैं, तो error (within groups) के लिए degrees of freedom क्या होगी?
  1. 16
  2. 15
  3. 19
  4. 3
  1. 16
  2. 15
  3. 19
  4. 3
Solutionसमाधान
In one-way ANOVA, degrees of freedom for error = Total observations − Number of groups = 20 − 4 = 16. Degrees of freedom for treatment = k − 1 = 3, and total df = n − 1 = 19.
एक-तरफा ANOVA में, error के लिए degrees of freedom = कुल observations − समूहों की संख्या = 20 − 4 = 16 होती है। Treatment के लिए df = k − 1 = 3, और कुल df = n − 1 = 19 होती है।

Solving path: k=4 groups, N=20 observations. Error (within groups) df = N − k = 20 − 4 = 16. Verify: treatment df = k−1 = 3, total df = N−1 = 19, and 3 + 16 = 19. Option A is correct.


Why this question: Asks both df values simultaneously — tests whether you can apply the formula twice without mixing up which formula gives which number.

Previous Year Questionपिछले वर्ष का प्रश्न
In a one-way Analysis of Variance (ANOVA), if there are 4 groups and a total of 20 observations, what are the degrees of freedom for the 'Between Groups' (treatment) and 'Within Groups' (error) respectively?
एक-तरफ़ा Analysis of Variance (ANOVA) में, यदि 4 समूह हैं और कुल 20 प्रेक्षण (observations) हैं, तो 'Between Groups' (treatment) और 'Within Groups' (error) के लिए degrees of freedom क्रमशः क्या होंगे?
  1. 3 and 16
  2. 4 and 19
  3. 4 and 16
  4. 3 and 15
  1. 3 और 16
  2. 4 और 19
  3. 4 और 16
  4. 3 और 15
Solutionसमाधान
In one-way ANOVA with k groups and N total observations: df(Between Groups) = k − 1 = 4 − 1 = 3, and df(Within Groups) = N − k = 20 − 4 = 16. The total degrees of freedom = N − 1 = 19, which equals 3 + 16 = 19, confirming the answer.
एक-तरफ़ा ANOVA में k समूह और N कुल प्रेक्षण होने पर: df(Between Groups) = k − 1 = 4 − 1 = 3, और df(Within Groups) = N − k = 20 − 4 = 16 होता है। कुल degrees of freedom = N − 1 = 19 = 3 + 16, जो उत्तर की पुष्टि करता है।

Solving path: df(Between) = k−1 = 3. df(Within) = N−k = 16. The answer is "3 and 16." Distractor "4 and 16" uses k instead of k−1 for between-groups — classic trap. Distractor "3 and 15" uses N−k−1 for within — wrong subtraction.


Why this question: Abstract version — no numbers. Tests whether you know the formula symbolically, not just how to plug in numbers.

Previous Year Questionपिछले वर्ष का प्रश्न
In a one-way ANOVA with k groups and a total of N observations, what are the degrees of freedom for the 'Between Groups' sum of squares?
एक-तरफा ANOVA में, जहाँ k समूह और कुल N प्रेक्षण हैं, 'Between Groups' (समूहों के बीच) वर्गों के योग के लिए स्वतंत्रता की कोटि क्या होगी?
  1. k
  2. k − 1
  3. N − 1
  4. N − k
  1. k
  2. k − 1
  3. N − 1
  4. N − k
Solutionसमाधान
In one-way ANOVA, the Between Groups (treatment) degrees of freedom equals the number of groups minus one, i.e., k − 1. The Within Groups (error) degrees of freedom is N − k, and the Total degrees of freedom is N − 1.
एक-तरफा ANOVA में, Between Groups (उपचार) की स्वतंत्रता की कोटि समूहों की संख्या घटा एक, यानी k − 1 होती है। Within Groups (त्रुटि) की स्वतंत्रता की कोटि N − k होती है, और कुल स्वतंत्रता की कोटि N − 1 होती है।

Solving path: Between Groups df = k−1. Eliminate k (off by one), N−1 (that's total df), N−k (that's within-groups df). Only k−1 survives.


Why this question: Tests the F-ratio definition — the conceptual core of ANOVA.

Previous Year Questionपिछले वर्ष का प्रश्न
In ANOVA, the F-ratio is computed as:
ANOVA में F-अनुपात की गणना किस प्रकार की जाती है?
  1. Sum of Squares Between Groups / Sum of Squares Within Groups
  2. Mean Square Between Groups / Mean Square Within Groups
  3. Mean Square Within Groups / Mean Square Between Groups
  4. Total Sum of Squares / Sum of Squares Between Groups
  1. Sum of Squares Between Groups / Sum of Squares Within Groups
  2. Mean Square Between Groups / Mean Square Within Groups
  3. Mean Square Within Groups / Mean Square Between Groups
  4. Total Sum of Squares / Sum of Squares Between Groups
Solutionसमाधान
The F-ratio in ANOVA is the ratio of Mean Square Between Groups (MSB) to Mean Square Within Groups (MSW), i.e., F = MSB / MSW. A large F-value indicates that the variation between groups is significantly larger than the variation within groups.
ANOVA में F-अनुपात, Between Groups के Mean Square (MSB) को Within Groups के Mean Square (MSW) से भाग देकर निकाला जाता है, यानी F = MSB / MSW। बड़ा F-मान यह दर्शाता है कि समूहों के बीच का विचरण, समूहों के भीतर के विचरण से काफी अधिक है।

Solving path: F = MSB/MSW. Eliminate SS/SS (wrong units — MS needed). Eliminate MSW/MSW (inverted). Eliminate TSS/SSB (meaningless ratio). MSB/MSW is the answer.


Why this question: Tests conceptual understanding of what F = 1 means — a subtler question than a calculation.

Previous Year Questionपिछले वर्ष का प्रश्न
In one-way ANOVA, if all group means are equal, the expected value of the F-ratio is approximately:
एक-तरफा ANOVA में, यदि सभी समूहों के माध्य बराबर हों, तो F-अनुपात का अपेक्षित मान लगभग कितना होगा?
  1. 1
  2. 0
  3. Equal to the number of groups
  4. Greater than the critical value
  1. 1
  2. 0
  3. समूहों की संख्या के बराबर
  4. क्रांतिक मान से अधिक
Solutionसमाधान
When all group means are equal (i.e., the null hypothesis is true), both MSB and MSW estimate the same population variance, so their ratio F = MSB / MSW is expected to equal 1. A value significantly greater than 1 leads to rejection of the null hypothesis.
जब सभी समूहों के माध्य बराबर हों (अर्थात् शून्य परिकल्पना सत्य हो), तो MSB और MSW दोनों एक ही जनसंख्या विचरण का अनुमान लगाते हैं, इसलिए F = MSB / MSW का अपेक्षित मान 1 होता है। 1 से काफी अधिक मान शून्य परिकल्पना को अस्वीकार करने का आधार बनता है।

Solving path: When null is true, MSB ≈ MSW (both estimate σ²), so F ≈ 1. Cannot be 0 (MSB is a sum of squares scaled by df — always non-negative and not zero unless all group means equal the grand mean exactly). Cannot equal number of groups (no statistical basis). Cannot be "greater than critical value" by definition of null being true.


Why this question: Two-way ANOVA with replication — interaction df specifically. The hardest df formula in this topic.

Previous Year Questionपिछले वर्ष का प्रश्न
In a two-way ANOVA, a researcher studies the effect of 3 teaching methods and 4 school types on student scores. If there are 2 observations per cell, what are the degrees of freedom for the interaction effect?
एक two-way ANOVA में एक researcher 3 teaching methods और 4 school types का student scores पर प्रभाव अध्ययन करता है। यदि प्रत्येक cell में 2 observations हैं, तो interaction effect के लिए degrees of freedom क्या होगी?
  1. 3
  2. 24
  3. 12
  4. 6
  1. 3
  2. 24
  3. 12
  4. 6
Solutionसमाधान
In two-way ANOVA with factor A having 'a' levels and factor B having 'b' levels, the degrees of freedom for the interaction (A×B) = (a - 1)(b - 1). Here, teaching methods (a = 3) and school types (b = 4), so df_interaction = (3 - 1)(4 - 1) = 2 × 3 = 6. The df for error = ab(n - 1) = 3×4×(2-1) = 12, which is a common distractor.
Two-way ANOVA में interaction (A×B) के लिए df = (a - 1)(b - 1) होती है, जहाँ a = teaching methods के levels = 3 और b = school types के levels = 4 हैं। अतः df_interaction = (3-1)(4-1) = 2 × 3 = 6। Error के लिए df = ab(n-1) = 3×4×1 = 12 होती है, जो एक सामान्य गलत विकल्प है।

Solving path: Factor A (teaching methods) has a=3 levels. Factor B (school types) has b=4 levels. Interaction df = (a−1)(b−1) = (3−1)(4−1) = 2×3 = 6. The distractor 12 = ab(n−1) = 3×4×1 is the error df — SSC CGL deliberately offered it as option C. Read what is being asked: interaction, not error.


Why this question: Two-way ANOVA without replication — error df using the rectangle formula.

Previous Year Questionपिछले वर्ष का प्रश्न
In a two-way ANOVA without replication, there are 3 rows and 4 columns. The degrees of freedom for the Error (Residual) term is:
Replication के बिना एक two-way ANOVA में 3 rows और 4 columns हैं। Error (Residual) term के लिए degrees of freedom क्या होगा?
  1. 11
  2. 6
  3. 8
  4. 3
  1. 11
  2. 6
  3. 8
  4. 3
Solutionसमाधान
In a two-way ANOVA without replication with r rows and c columns: df_rows = r−1 = 2, df_columns = c−1 = 3, df_total = rc−1 = 11. df_error = df_total − df_rows − df_columns = 11 − 2 − 3 = 6. This can also be computed as (r−1)(c−1) = 2×3 = 6.
Replication रहित two-way ANOVA में r rows और c columns के साथ: df_rows = r−1 = 2, df_columns = c−1 = 3, df_total = rc−1 = 11। df_error = df_total − df_rows − df_columns = 11 − 2 − 3 = 6। इसे (r−1)(c−1) = 2×3 = 6 के रूप में भी निकाला जा सकता है।

Solving path: r=3 rows, c=4 columns, no replication. Error df = (r−1)(c−1) = 2×3 = 6. Alternatively: df_total = rc−1 = 11, df_rows = 2, df_columns = 3, df_error = 11−2−3 = 6. Both routes give 6. The distractor 11 is total df — another standard trap.


Common Mistakes


Related Topics

Practice on SarkariRise

Sign up + get 3 free mocks →