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 › Econometrics › 9. Heteroscedasticity
Econometrics · Lesson 9 of 18

Heteroscedasticity

One of the classical assumptions says every error has the same variance. In cross-section data this is often false: richer households have more erratic spending, big firms more erratic profits. This lesson shows what unequal variances break and, as important, what they leave alone; the tests that detect them and what each one assumes; and the two repairs, weighting and robust standard errors, with real data in which life expectancy is more scattered in poor countries than in rich ones.

← Econometrics moduleLesson 9 of 18 · about 55 minutes
1Multiple regression2Matrix form and Gauss-Markov3t and F tests4R² and adjusted R²5Dummies and interactions6Functional forms7Misspecification8Multicollinearity9Heteroscedasticity10Autocorrelation11Instrumental variables12Simultaneous equations13Panel data14Logit and probit15Unit roots16ARMA, VAR and cointegration17Test Atlas18Hard problems
A question to hold on to
What would be the consequences for the OLS estimator if heteroscedasticity is present in a regression model but ignored? Assume all the other classical assumptions are valid. (A) It will be biased. (B) It will be inconsistent. (C) It will be unbiased but inefficient. (D) It will be unbiased but inconsistent.
GATE Economics (XH-C1) 2021Solved at the end ↓
New here?What is the Ashanagar survey?The invented household survey behind this page's examples: 600 households, generated from a model whose true coefficients we publish.

The Ashanagar survey is invented. The statistics modules used one district of 60 households. Econometrics needs more households and more variables, so this is a new, larger survey of 600 households in the same imaginary district: income, spending, household size, whether the household is in the town or a village, the head’s schooling and earnings.

Because we wrote the data-generating process, we know the true answers, and every lab can show whether a regression recovers them. Household spending, in thousands of rupees a month, was generated as 1 + 0.45 × income + 0.9 × household size + 1.5 × town + an error with standard deviation 2.5. A real survey never tells you its true coefficients. This one does, so you can see how close an estimate comes.

It also holds a variable, the head’s ability, that a real survey could not observe. It is kept so that the lessons on omitted variables can show what happens when it is left out. Every figure here is illustrative, not official statistics.

Households
600
Share in the town
41%
Mean monthly income
₹15.4 thousand
Mean monthly spending
₹12.6 thousand
Mean schooling of the head
8.2 years

How the module uses it →

In this guide
Lesson · about 55 minutes
  1. Unequal spread
  2. What it breaks, and what it does not
  3. The tests
  4. Fixing it
  5. The opening question, solved
  6. The lesson on one screen
  7. Check yourself
  8. Past papers, by level
01
The idea

Unequal spread

Homoscedasticity says Var(ui | x) = σ² for every observation. Heteroscedasticity says the variance differs: Var(ui | x) = σi². The usual picture is a fan: the points are tightly packed around the line at one end and spread out at the other. Typical causes are a variable that scales the noise (household income, firm size), learning (error rates fall as practice grows), outliers, and a wrong functional form or an omitted variable whose effect shows up as changing spread (lesson 7).

Real data show it clearly. In the World Bank data (life expectancy against ln GDP per head, 186 economies in 2019), the residuals of the straight-line regression have a standard deviation of 5.47 years among the poorest third of countries, 4.25 in the middle third and 2.78 among the richest third. Poor countries are far less predictable: some have high life expectancy for their income, some have been hit by conflict or disease. The invented survey, by contrast, was written homoscedastic, and its tests will say so.

02
Interactive

What it breaks, and what it does not

Unbiasedness only needs E(u | X) = 0 (lesson 2): variances do not enter. So OLS stays unbiased and consistent. What fails is everything built on the assumption of constant variance:

  • OLS is no longer best. It is not BLUE: there is a linear unbiased estimator with a smaller variance (weighted least squares), because OLS treats noisy observations as if they were as informative as precise ones.
  • The usual standard errors are wrong, because the formula σ²(X′X)⁻¹ assumes constant σ². They can be too small or too large, depending on how the variance relates to the regressors. So t statistics, F statistics and confidence intervals are unreliable: they do not have their stated distributions, even in large samples.
  • R² is not meaningfully affected as a descriptive measure.

One subtlety the Delhi School has asked: if the error variance depends on a variable z that is not in the model, the usual standard errors are wrong only if z is related to the regressors. What matters is Var(u | x), the variance given the regressors; if z were completely unrelated to x, the variance given x would be constant and the usual standard errors would be fine. In the textbook reading z is related to x, and the coefficients are unbiased while the estimated standard errors are biased.

Try it. Move γ from 0 to 1.5 and watch which numbers move. The slope stays centred on the truth. The usual standard error stops matching the real spread, and the 95% interval stops holding the truth 95% of the time. The robust standard error repairs the inference. Weighting gives a tighter slope. At small γ with x between 1 and 5, notice that the problem is mild: heteroscedasticity does the most harm when it is strong.

True model: y = 1 + 1 × x + u, with x between 1 and 5 and the standard deviation of u equal to xγ. At γ = 0 the variance is constant. The slope we want is 1.

Average OLS slope (truth 1)0.998
Real spread of the OLS slope0.31
Usual standard error, on average0.278
Robust standard error, on average0.29
95% interval holds the truth: usual SE92%
95% interval holds the truth: robust SE93.2%
Spread of the weighted (WLS) slope0.24
Breusch-Pagan test rejects equal variances99.3%
11.522.533.544.5551015xy

Horizontal: x. Vertical: y. One sample of 100 points; the lines are fitted to it.

True lineOLS lineWeighted (WLS) line
What it shows

OLS is still unbiased (average 0.998), so heteroscedasticity does not bias the slope. What fails is the usual standard error: it averages 0.278 against a real spread of 0.31, so the 95% interval holds the truth 92% of the time. The robust standard error (0.29) repairs the inference without changing the estimate. And OLS is no longer the most precise: weighting each point by the inverse of its variance gives a slope with spread 0.24, 23% tighter. Breusch-Pagan finds the problem in 99.3% of samples.

Watch out for

The mistakes examiners are fishing for

  • Saying heteroscedasticity biases the coefficients. It does not: OLS is unbiased and consistent. It makes OLS inefficient and the usual standard errors invalid.
  • Saying the usual standard errors are “too small”. The direction depends on how the variance moves with the regressor. They are wrong, not always too small.
Pause and predict
Heteroscedasticity is present and ignored. Which of these is still true of the OLS slope?
03
Detection

The tests

Start with a plot: the residuals (or their squares or absolute values) against a regressor or against the fitted values. A fan is the evidence. The tests put numbers on it. All have the null hypothesis of homoscedasticity.

TestHow it worksDistributionWhat it assumes
ParkRegress ln e² on ln x. A significant slope signals heteroscedasticity.t test on the slopeVariance a power of x
GlejserRegress |e| on x (or √x, 1/x). A significant slope signals it.t test on the slopeA chosen functional form
Goldfeld-QuandtOrder the data by x, drop the middle, fit the two ends, take the ratio of their residual variances.F with (n − c) ÷ 2 − k in each dfVariance rises (or falls) steadily with one x; errors normal
Breusch-PaganRegress e² on the regressors. LM = nR² of that regression.Chi-square, df = number of regressors testedVariance linear in the regressors
WhiteRegress e² on the regressors, their squares and cross-products. LM = nR².Chi-square, df = number of terms in the auxiliary regressionNothing about the form (a general test)
The two LM tests
LM=nRaux2​ ∼ χq2​(Breusch-Pagan),LM=nRaux2​ ∼ χq∗2​(White)
R² is from the auxiliary regression of the squared residuals. Breusch-Pagan uses the original regressors (q of them); White adds squares and cross-products (q* terms). Reject homoscedasticity when LM exceeds the chi-square critical value.

For White’s test with the regression y = α₀ + α₁x₁ + α₂x₂ + u, the squared residuals are regressed on x₁, x₂, x₁², x₂² and x₁x₂ (five terms), and the test statistic is nR² from that regression with 5 degrees of freedom. Omitting the cross-product, or regressing on lagged residuals, gives a different test. (A regression on the lagged residual is a test for autocorrelation, the next lesson.)

On the World Bank regression, Breusch-Pagan gives LM = 8.54 (1 df, p = 0.0035), White gives 12.28 (2 df, p = 0.0022), and Goldfeld-Quandt, comparing the poorest 74 and the richest 74 countries after leaving out the middle 38, gives F = 4.01 with (72, 72) degrees of freedom (p < 0.001). All three reject. In the survey’s spending regression, where the variance is constant by construction, Breusch-Pagan gives p = 0.95 and White p = 0.97: no sign of a problem, as there should not be.

Watch out for

The mistakes examiners are fishing for

  • Using the Goldfeld-Quandt ratio the wrong way round. Put the larger variance on top for a one-sided test, or you get F below 1. Check which end is expected to be noisier.
  • Putting the Durbin-Watson test in a list of heteroscedasticity tests. It detects first-order autocorrelation (lesson 10). Park, Glejser, Goldfeld-Quandt, Breusch-Pagan and White detect unequal variances.
04
Repair

Fixing it

Two routes, with different goals. Weighted least squares (WLS) aims at the efficiency OLS lost. If Var(ui) = σ²zi², divide the equation by zi and the new error has constant variance:

Derive it

Weighted least squares: divide through by the standard deviation

We want to show
If Var(uᵢ) = σ²zᵢ², dividing the whole equation by zᵢ gives errors with constant variance σ², and least squares on the divided equation is the best linear unbiased estimator. It is the same as least squares with weights 1 ÷ zᵢ².
  1. 1
    Write the model with its unequal variances.

    yi = a + b xi + ui, with Var(ui) = σ²zi², where zi is known (often z = x). Observations with a large z are noisier and carry less information about the line.

  2. 2
    Divide through by z.
    zi​yi​​=azi​1​+bzi​xi​​+zi​ui​​,Var(zi​ui​​)=zi2​σ2zi2​​=σ2

    The transformed error has the same variance for every observation, so the Gauss-Markov theorem applies to the transformed equation: least squares on it is BLUE.

  3. 3
    That is weighting.

    Least squares on the divided equation minimises Σ(ei ÷ zi)² = Σ wiei² with wi = 1 ÷ zi². Noisy observations get small weights. When z = x the transformed equation is y ÷ x = b + a(1 ÷ x) + (u ÷ x): the old slope is now the intercept.

  4. 4
    A five-point check.

    Take x = 1, 2, 3, 4, 5 and y = 2.5, 3.2, 5.1, 4.4, 8.3, with variance proportional to x². Ordinary least squares gives a slope of 1.28. Weighted least squares with weights 1 ÷ x² gives 1.0994. And regressing y ÷ x on a constant and 1 ÷ x gives a constant of 1.0994, the same number: the transformed regression and the weighted one are one estimator.

Step 1 of 4
So
WLS is GLS for a diagonal covariance matrix. It needs the form of the variances. If that form is only estimated (feasible GLS) it is no longer exactly optimal, and if it is wrong the estimates stay unbiased while the usual standard errors go wrong again. That is why many applied papers keep OLS and report robust standard errors instead.
  • WLS or GLS needs the form of the variances. If the form is known up to a constant, WLS is BLUE. If it is estimated first (feasible GLS), the result is efficient only in large samples and only if the form is right. “GLS can be used when the disturbances are autocorrelated or heteroscedastic”; it does not help with collinear regressors or an incorrect functional form.
  • Robust (White, or HC) standard errors aim at valid inference without changing the estimate. They keep the OLS coefficients and replace the standard errors by ones that are consistent whatever the form of the variances. For the World Bank regression the usual standard error of the slope is 0.281 and the robust one is 0.355, about 26% larger: the usual formula understated the uncertainty. Nothing else changes: the coefficient is still 6.03.
  • Transform the variables. Taking logs often steadies the variance, because proportional noise becomes constant noise (lesson 6).

Many applied economists now report robust standard errors by default, because they work whether or not the problem is present and need no model of the variance. WLS gains more when its model of the variance is right.

In economics

Heteroscedasticity often points to something else. A fan can come from an omitted variable, a wrong functional form, or a mixture of two groups with different variances. Before weighting, ask whether the model is right (lesson 7). A better specification sometimes makes the fan disappear.

What to say in an exam

Heteroscedasticity leaves OLS unbiased and consistent but inefficient (not BLUE) and makes the usual standard errors, and so the t and F tests, invalid. Detect it with Breusch-Pagan, White, Goldfeld-Quandt, Park or Glejser. Fix it with WLS/GLS (efficiency) or robust standard errors (valid inference).

05
Solving the opening question

The opening question, solved

GATE Economics (XH-C1) 2021 · moderate
What are the consequences for OLS of ignoring heteroscedasticity, with the other classical assumptions valid?
  1. 1
    Which assumptions does each property need?
    Unbiasedness needs E(u | X) = 0 and Consistency needs the same plus a law of large numbers. Neither involves the variance of u. So OLS stays unbiased and consistent: A and B are false.
  2. 2
    What does the Gauss-Markov theorem need?
    Constant variance is one of its assumptions. Without it, OLS is no longer the minimum-variance linear unbiased estimator: it is inefficient.
  3. 3
    Reject the last option.
    D says unbiased but inconsistent. A well-behaved estimator that is unbiased (and has variance falling with n) is consistent, so D is false.
Answer
(C) Unbiased but inefficient. The standard errors are also invalid, but that is a failure of inference, not of the estimator’s bias or consistency.
06
Revise

The lesson on one screen

The lesson on one screen
Definition
Var(uᵢ | x) = σᵢ², not constant. Typical in cross-sections where a scale variable (income, size) drives the noise.
What survives
Unbiasedness and consistency (they need only E(u | X) = 0), and R².
What fails
Efficiency (OLS is not BLUE) and the usual standard errors, so t, F and intervals are invalid.
Tests (H₀: homoscedastic)
Park (ln e² on ln x), Glejser (|e| on x), Goldfeld-Quandt (F ratio of two ends), Breusch-Pagan (nR² of e² on x), White (adds squares and cross-products; a general test).
White's auxiliary regression
e² on regressors, their squares and cross-products. Two regressors: five terms, 5 df.
WLS / GLS
Divide through by zᵢ if Var(uᵢ) = σ² zᵢ². Weights 1 ÷ zᵢ². Efficient if the form is right.
Robust standard errors
Keep the OLS estimate, correct the standard error. Valid for any form of heteroscedasticity (in large samples).
Not a heteroscedasticity test
Durbin-Watson (it tests autocorrelation).
07
Practice

Check yourself

0 of 13 correct so far

Compute

The Breusch-Pagan statistic
A regression of squared residuals on two regressors, from 100 observations, has R² = 0.08. Find the Breusch-Pagan LM statistic nR².
White's auxiliary regression: how many terms
A regression has two regressors, x₁ and x₂. How many regressors (not counting the constant) are in White’s auxiliary regression, the degrees of freedom of the test?
White's test with three regressors
The same for a regression with three regressors (none of them a dummy).
Goldfeld-Quandt
After ordering by x and dropping the middle observations, the residual sum of squares is 40 for the lower group and 100 for the upper, each with 20 degrees of freedom. Find the Goldfeld-Quandt F.
Weights
Var(uᵢ) = σ²xᵢ². Using weights 1 ÷ xᵢ², how many times larger is the weight of an observation with x = 2 than that of one with x = 4?
An interval with a robust standard error
A regression on 186 observations gives a slope of 6.03 with robust standard error 0.355. Using the critical value 1.973 (t with 184 degrees of freedom), find the lower end of the 95% confidence interval.
The ratio of two spreads
The residuals of the poorest group of countries have standard deviation twice that of the richest group. If the two groups have equal numbers of observations, find the F ratio of their variance estimates.
R² of the auxiliary regression
A White test from 50 observations gives LM = 12.5. Find the R² of the auxiliary regression.

Quick questions

1In the presence of heteroscedasticity the OLS estimators are
2Which of these is NOT used to detect heteroscedasticity?
3Robust (White) standard errors differ from the usual ones in that they
4With Var(uᵢ) = σ²zᵢ², least squares on the equation divided by zᵢ gives
5Generalised least squares can be used when the disturbances are
08
Real questions

Past papers, by level

Foundation

Definitions and one-step calculations: a t statistic, an R², which assumption is which. Most CUET and JNU questions sit here.

1 questionPractise →

Standard

Restricted against unrestricted regressions, reading output, and statement questions, up to GATE and IIT JAM level.

6 questionsPractise →

Delhi School level

This topic’s hardest questions, from the DSE entrance, are worked through in Lesson 18: Heteroscedasticity: consequences and tests.

2 questionsLesson 18 →
All 7 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.

The Delhi School’s questions here (the case where the variance depends on a variable outside the model, and the form of White’s auxiliary regression) are in the hard-problems lesson at the end of the module. The matching of tests to problems is in the test atlas.

← Lesson 8MulticollinearityLesson 10 →Autocorrelation and the Durbin-Watson statistic

Read next

All resources →
EconometricsEconometrics 10: autocorrelation, Durbin-Watson, Breusch-Godfrey and remediesAR(1) errors, what serial correlation breaks, the Durbin-Watson statistic as about 2(1 minus rho) with its decision zones, Breusch-Godfrey, Cochrane-Orcutt and Prais-Winsten, the lagged dependent variable problem, and a real consumption function for India.Complete guide · 50 minEconometricsEconometrics 2: OLS in matrix form and the Gauss-Markov theoremThe estimator (X'X)^-1 X'y worked in exact fractions, the hat and residual-maker matrices, the classical assumptions and what each buys, why OLS is unbiased with variance sigma squared (X'X)^-1, and why it is BLUE.Complete guide · 55 minEconometricsHow to read a regression table: coefficients, t, p, R squared and F, on real dataSix answers in a fixed order, practised on an interactive table of real World Bank data: tap any figure to see where it comes from, or cover one and work it out. Then what a table hides: an outlier, unequal spread, overlapping regressors, and the gap between association and cause.Complete guide · 30 min