Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics and Econometrics book
Econometrics guide, Unit 3, step 11 of 20Previous stepNext step

Step 11: Heteroskedasticity

SyllabusUndergraduate econometrics · Wooldridge, Introductory Econometrics, Ch. 8
In 30 seconds
  • Heteroskedasticity means the variance of the error changes with the explanatory variables: \( \text{Var}(u \mid x) \) is not a constant. In cross-section data it is the normal case, not the exception.
  • OLS coefficients stay unbiased and consistent. What breaks is the usual standard error, and with it every \( t \) statistic, \( p \)-value, confidence interval and \( F \) test. OLS is also no longer BLUE.
  • Detect it with residual plots, the Breusch–Pagan test (\( LM = nR^2 \) from regressing \( \hat{u}^2 \) on the \( x \) variables) and the White test (which adds squares and cross products).
  • Fix inference with heteroskedasticity-robust standard errors (HC1 in large samples, HC3 in small ones). If you know the shape of the variance, weighted least squares is more efficient.
  • Exam point: a test that fails to reject is not proof of homoskedasticity. Report robust standard errors anyway.

What heteroskedasticity is

Back in Step 6, OLS was the best linear unbiased estimator under five assumptions. The fifth, MLR.5, was homoskedasticity: the error has the same variance whatever the values of the explanatory variables.

\[ \text{MLR.5:}\qquad \text{Var}(u \mid x_1, \dots, x_k) = \sigma^2 . \]
Key termThe errors are heteroskedastic if \( \text{Var}(u \mid x_1, \dots, x_k) \) depends on one or more of the explanatory variables. We write \( \text{Var}(u_i \mid \mathbf{x}_i) = \sigma_i^2 \): the subscript \( i \) says the variance can differ from one observation to the next. Homoskedasticity is the special case \( \sigma_i^2 = \sigma^2 \) for everyone.
Econometrics Made Simple textbook coverChapter 11 of Econometrics Made Simple covers this in full: the Breusch–Pagan and White tests, HC0–HC3, robust F tests and FGLS, with Python, R and Stata code.Get the textbook · $15

Because the error has mean zero, its variance is just its average squared value: \( \text{Var}(u \mid \mathbf{x}) = E(u^2 \mid \mathbf{x}) \). So heteroskedasticity is about the typical size of the error, ignoring its sign. It says nothing about the error’s average, which is still zero.

Why it is so common in cross-sections

Heteroskedasticity appears whenever the room for unexplained variation grows or shrinks with an explanatory variable.

  • Income and spending. A household on $20,000 a year spends most of it on necessities; one on $200,000 can save a lot or spend a lot.
  • Firm size. An error of 10% of predicted sales is a few thousand dollars for a small firm and millions for a large one.
  • Wages and education. More schooling opens a wider range of jobs and pay.
  • Group averages. An average over \( m_i \) people has error variance \( \sigma^2/m_i \): bigger groups are less noisy.

This step uses the companion wage data from Econometrics Made Simple, Chapter 11. They were simulated with heteroskedasticity built in: the standard deviation of the error in the log-wage equation is \( 0.30 + 0.012\,\text{educ} \), rising from about 0.40 at 8 years of schooling to about 0.52 at 18 years. You know the right answer, which makes the data ideal for checking whether each tool finds it.

What heteroskedasticity does to OLS

Look again at the proof that OLS is unbiased (Step 4). It used linearity, random sampling, variation in \( x \) and the zero conditional mean assumption. Homoskedasticity never appeared. So the coefficients are fine. The problem is their variance.

In simple regression the OLS slope is the true slope plus a weighted sum of the errors, \( \hat\beta_1 = \beta_1 + \sum (x_i-\bar{x})u_i / \text{SST}_x \). The errors are independent, so the variance of the sum is the sum of the variances, and each term has variance \( (x_i-\bar{x})^2\sigma_i^2 \):

\[ \text{Var}(\hat\beta_1) = \frac{\sum_{i=1}^{n} (x_i – \bar{x})^2\, \sigma_i^2}{\text{SST}_x^{\,2}}, \qquad \text{SST}_x = \sum_{i=1}^{n}(x_i-\bar{x})^2 . \]

Only when every \( \sigma_i^2 \) equals the same \( \sigma^2 \) can you take it outside the sum and get the familiar \( \sigma^2/\text{SST}_x \). Under heteroskedasticity the familiar formula is simply the wrong formula. Notice the weights: each \( \sigma_i^2 \) is multiplied by \( (x_i-\bar{x})^2 \). If the noisiest observations sit far from \( \bar{x} \), which is typical when the variance rises with \( x \), the usual standard error is too small. If they sit near the middle, it is too large.

Worked example

Five observations have \( x = 1, 2, 3, 4, 5 \) and error variances \( \sigma_i^2 = \sigma^2 x_i^2 \). Compare the true variance of the OLS slope with what the usual formula reports.

Step 1\( \bar{x} = 3 \), so the squared deviations are \( 4, 1, 0, 1, 4 \) and \( \text{SST}_x = 10 \).
Step 2True variance: \( \sigma^2(4 \times 1 + 1 \times 4 + 0 \times 9 + 1 \times 16 + 4 \times 25)/10^2 = 124\sigma^2/100 = 1.24\sigma^2 \).
Step 3The usual formula uses the average variance, \( 55\sigma^2/5 = 11\sigma^2 \), and gives \( 11\sigma^2/10 = 1.10\sigma^2 \).

The usual formula understates the variance by about 11%, because the biggest error variances sit at the extreme \( x \) values, which have the most influence on the slope. Move the large variance to \( x = 3 \) instead and the usual formula overstates the truth: the direction depends on where the noise sits.

Property of OLSStill holds?Comment
Unbiased and consistentYesneeds only MLR.1–MLR.4
\( R^2 \) meaningfulYesbuilt from unconditional variances
Usual standard errorsNobiased, and not even consistent; fix with robust standard errors
Usual \( t \), \( F \) and LM testsNodo not have their stated distributions, even in large samples
BLUE (Gauss–Markov)Noweighted least squares is more efficient
Common mistakeWriting “heteroskedasticity biases the OLS coefficients” or “makes OLS inconsistent”. Neither is true. The coefficients are fine; their standard errors are not. The assumption that protects the coefficients is the zero conditional mean, MLR.4, which fails with omitted variables or endogeneity (Step 13), not with heteroskedasticity.

Spotting it: residual plots

The errors are unobserved, but the OLS residuals \( \hat{u}_i \) estimate them. Since \( \text{Var}(u \mid \mathbf{x}) = E(u^2 \mid \mathbf{x}) \), the natural check is whether \( \hat{u}_i^2 \) rises or falls as a suspect variable, or the fitted value \( \hat{y}_i \), changes. Two plots are standard: residuals against a suspect \( x \), and residuals against the fitted values.

The running example is the log-wage equation from Econometrics Made Simple, Chapter 11, estimated on 1,000 workers:

\[ \log(\text{wage}) = \beta_0 + \beta_1\,\text{educ} + \beta_2\,\text{exper} + \beta_3\,\text{expersq} + \beta_4\,\text{tenure} + \beta_5\,\text{female} + u, \]

where \( \text{expersq} = \text{exper}^2/100 \). Figure 1 averages the squared residuals at each level of schooling.

Average squared residual by years of education log-wage equation, n = 1,000
mean of û² at each levelfitted line from regressing û² on educ
89101112131415+0.050.100.150.200.250.30mean of û²0.140.130.210.190.190.230.230.24OLS line: û² on educ, slope 0.0134 (t = 2.86)
Figure 1. The squared residuals from the log-wage equation rise with schooling, from about 0.14 at 8–9 years to about 0.23 at 14 or more years. Workers with 15 or more years (only 56 of them) are pooled into one bar. Data: Econometrics Made Simple companion file wages.csv, recomputed.

The pattern is gentle but clear. The average squared residual is about 0.14 for workers with 8 or 9 years of school and about 0.23 for those with 14 or more. A regression of \( \hat{u}^2 \) on education has a slope of 0.0134 with a \( t \) statistic of 2.86. That is the pattern the data were built with.

The book’s house-price data (500 sales) show a stronger case. With price in dollars the residuals fan out: their standard deviation is about $43,000 for houses predicted below $250,000 and about $115,000 above $550,000. With log price, the band has roughly the same width everywhere, because a log model makes errors proportional. Taking logs (Step 8) is often the simplest cure; there the BP test passes easily (\( p = 0.744 \)).

Exam tipPlots are evidence, not proof. A few hundred points can show a fan by chance, and a mild pattern is easy to miss. Use the plot to see the shape and to choose which variables to test, then confirm with a formal test.

The Breusch–Pagan test

The null hypothesis is homoskedasticity, \( H_0: E(u^2 \mid x_1, \dots, x_k) = \sigma^2 \). Under the alternative, suppose \( u^2 \) is linearly related to the \( x \) variables, \( u^2 = \delta_0 + \delta_1 x_1 + \dots + \delta_k x_k + v \). Homoskedasticity is then the joint null \( \delta_1 = \dots = \delta_k = 0 \). Replace the unobserved \( u^2 \) with \( \hat{u}^2 \) and you have the Breusch–Pagan (BP) test. The version below, which does not need normal errors, is due to Koenker (1981).

\[ LM = n\,R^2_{\hat{u}^2} \;\overset{a}{\sim}\; \chi^2_k, \qquad F = \frac{R^2_{\hat{u}^2}/k}{(1-R^2_{\hat{u}^2})/(n-k-1)} \;\overset{a}{\sim}\; F_{k,\,n-k-1} \]
StepWhat you do
1Estimate the model by OLS and save the squared residuals \( \hat{u}_i^2 \).
2Regress \( \hat{u}^2 \) on \( x_1, \dots, x_k \) with an intercept. Record its \( R^2 \), called \( R^2_{\hat{u}^2} \).
3Compute \( LM = nR^2_{\hat{u}^2} \) and compare it with the \( \chi^2_k \) critical value (or use the \( F \) version, which every package prints for the auxiliary regression).
4Reject homoskedasticity if the statistic exceeds the critical value.
Worked example

Run the BP test on the log-wage equation (\( n = 1{,}000 \), \( k = 5 \)). The auxiliary regression of \( \hat{u}^2 \) on all five regressors has \( R^2 = 0.01056 \). A second, targeted version regresses \( \hat{u}^2 \) on education alone. What do the two tests say at 5%?

Step 1All regressors: \( LM = 1{,}000 \times 0.01056 = 10.56 \) on 5 degrees of freedom. The 5% critical value of \( \chi^2_5 \) is 11.07, and \( p = 0.061 \). Do not reject at 5% (reject at 10%). The \( F \) version agrees: \( F = 2.12 \), \( p = 0.061 \).
Step 2Education only: \( LM = 8.11 \) on 1 degree of freedom, \( p = 0.004 \). The 5% critical value is 3.84, so reject clearly.
Step 3Why the difference? With all five regressors the test spends four of its five degrees of freedom looking for variance that depends on experience, tenure and gender. When the variance depends on education alone, that power is wasted.

The targeted test finds what the data were built with. The general lesson: tests are most powerful when economic reasoning or a plot tells you where to look.

Common mistakeConcluding “the BP test does not reject, so the errors are homoskedastic”. Failing to reject is a lack of strong evidence against \( H_0 \), not evidence for it. The all-regressor test above misses heteroskedasticity that is really there.

The White test

The BP test looks only for variance that is linear in the \( x \) variables. White (1980) showed that the usual standard errors are valid as long as \( u^2 \) is uncorrelated with the \( x_j \), their squares and their cross products. The White test adds all those terms to the auxiliary regression and tests them jointly with \( LM = nR^2 \). It catches curved patterns that BP misses, but the number of terms grows fast: with \( k \) regressors there are \( k(k+3)/2 \) of them, 20 for \( k = 5 \).

A shortcut keeps the spirit with only two terms. The fitted value \( \hat{y} \) combines all the \( x \) variables, and \( \hat{y}^2 \) combines all their squares and cross products. So regress \( \hat{u}^2 \) on \( \hat{y} \) and \( \hat{y}^2 \) and test both slopes: \( LM = nR^2 \sim \chi^2_2 \) whatever the number of regressors. This is the special White test.

Test on the log-wage equation (auxiliary regressors)LMdf\( p \)-value
Breusch–Pagan (all five \( x \) variables)10.5650.061
Breusch–Pagan (educ only)8.1110.004
White, full (levels, squares, cross products)29.34180.044
White, special (\( \hat{y} \), \( \hat{y}^2 \))5.3820.068

The full White test has 18 terms, not 20, because two repeat earlier ones: \( \text{female}^2 = \text{female} \) for a dummy, and \( \text{exper}^2 = 100 \times \text{expersq} \). The tests disagree at 5% because the heteroskedasticity in log wages is mild. The one aimed at the right variable is the most powerful. (Results from Econometrics Made Simple, Chapter 11.)

Heteroskedasticity-robust standard errors

Testing tells you whether there is a problem. The standard fix does not change the estimates at all. It replaces the wrong variance formula with one that is valid whether or not the errors are heteroskedastic. The trick, due to Eicker, Huber and White, is to put the squared residual \( \hat{u}_i^2 \) in place of each unknown \( \sigma_i^2 \):

\[ \widehat{\text{Var}}_{\text{HC0}}(\hat\beta_1) = \frac{\sum_{i=1}^{n} (x_i – \bar{x})^2\, \hat{u}_i^{\,2}}{\text{SST}_x^{\,2}} . \]

One squared residual is a poor estimate of one \( \sigma_i^2 \). But the formula needs only a weighted average of them, and averages of many noisy terms are accurate. In large samples it is consistent under heteroskedasticity of any form, and under homoskedasticity too. Its square root is the robust (White, or sandwich) standard error. In multiple regression the same idea applies to each coefficient, and software does the matrix algebra.

Key termA heteroskedasticity-robust standard error remains valid in large samples whether or not the errors are heteroskedastic. It changes standard errors, \( t \) statistics and confidence intervals. It never changes the coefficient estimates.

HC0, HC1, HC2 and HC3

HC0 tends to be too small in small samples, because OLS residuals are on average smaller than the errors: the line is chosen to make them small. MacKinnon and White (1985) proposed three adjustments, each replacing \( \hat{u}_i^2 \) by something larger.

\[ \text{HC0: } \hat{u}_i^{2} \qquad \text{HC1: } \frac{n}{n-k-1}\,\hat{u}_i^{2} \qquad \text{HC2: } \frac{\hat{u}_i^{2}}{1 – h_{ii}} \qquad \text{HC3: } \frac{\hat{u}_i^{2}}{(1 – h_{ii})^2} \]

Here \( h_{ii} \) is the leverage of observation \( i \): how unusual its \( x \) values are. HC1 is Stata’s robust option and the most common choice in published economics. HC2 and HC3 inflate the residuals of high-leverage points most, because the fitted line is pulled towards them; HC3 is the default in R’s sandwich package.

Worked example

Five observations are \( (x, y) = (1, 2), (2, 5), (3, 8), (4, 12), (5, 12) \), with OLS line \( \hat{y} = -0.3 + 2.7x \). Compute the usual, HC0 and HC1 standard errors of the slope.

Step 1Fitted values \( 2.4, 5.1, 7.8, 10.5, 13.2 \); residuals \( -0.4, -0.1, 0.2, 1.5, -1.2 \): small for low \( x \), large for high \( x \). \( \bar{x} = 3 \), \( \text{SST}_x = 10 \).
Step 2Usual: \( \text{SSR} = 0.16 + 0.01 + 0.04 + 2.25 + 1.44 = 3.90 \), \( \hat\sigma^2 = 3.90/3 = 1.30 \), variance \( 1.30/10 = 0.130 \), se \( = 0.361 \).
Step 3HC0: \( \sum (x_i-\bar{x})^2\hat{u}_i^2 = 4(0.16) + 1(0.01) + 0(0.04) + 1(2.25) + 4(1.44) = 8.66 \). Variance \( 8.66/100 = 0.0866 \), se \( = 0.294 \).
Step 4HC1: multiply the variance by \( n/(n-k-1) = 5/3 \): \( 0.1443 \), se \( = 0.380 \).

HC0 comes out below the usual standard error even though the residuals fan out, because with \( n = 5 \) its downward bias is severe. HC1 corrects that. (HC3 is larger still, 0.668, because the two end points have leverage 0.6.) With five observations none of these deserves much trust; the example shows the mechanics.

In practice it is one extra word. In Python’s statsmodels, smf.ols(...).fit(cov_type="HC1"); in R, lmtest::coeftest(m, vcov = sandwich::vcovHC(m, type = "HC1")); in Stata, regress y x1 x2, robust (or vce(hc3)).

How much do robust standard errors matter?

Wage equation, \( n = 1{,}000 \)Level: coefusual serobust seLog: coefusual serobust se
educ2.3010.1790.2030.10480.007570.00736
exper0.5430.1320.1240.03010.005580.00575
expersq−0.9540.2840.284−0.05630.012040.01285
tenure0.3210.0740.0740.01540.003150.00300
female−3.3570.6670.675−0.15530.028280.02831
BP test: LM (\( p \))36.58 (< 0.001)10.56 (0.061)

Robust standard errors are HC1 (from Econometrics Made Simple, Chapter 11). Logs often reduce heteroskedasticity: the level equation fails the BP test overwhelmingly, the log equation only borderline. The biggest correction comes where the variance pattern is strongest: in levels, the robust standard error for education is about 13.5% larger than the usual one. And robust standard errors can go either way: for experience in levels the robust one is smaller.

Small samples: HC1 or HC3?

Robust standard errors rest on large-sample arguments. The book’s simulation, with right-skewed \( x \) and an error standard deviation proportional to \( x \), tests a true null at 5%, 5,000 times for each sample size.

How often a 5% t test wrongly rejects, by standard error 5,000 simulated samples per n
usual OLS seHC1 robust seHC3 robust senominal 5% (dashed)
n = 30n = 100n = 1,0005%10%15%20%25%share of tests rejecting a true null17.019.721.213.08.45.47.96.75.2
Figure 2. With heteroskedastic errors the usual standard error rejects a true null about 17–21% of the time, and a bigger sample does not help. Robust standard errors converge on 5%; HC3 is closest in small samples. Numbers from the simulation in Econometrics Made Simple, Chapter 11.

With the usual standard errors the test rejects a true null 17% to 21% of the time, and the problem does not improve as \( n \) grows. All the robust versions converge on 5%. In small samples they differ: at \( n = 30 \), HC1 rejects 13% of the time and HC3 7.9%. The rule of thumb: HC1 is fine in large samples; use HC3 when the sample is small, say below a few hundred, or when a few observations have high leverage.

Robust \( t \) and \( F \) tests

A robust \( t \) statistic is formed exactly like the usual one, with the robust standard error underneath: \( t = (\hat\beta_j – a_j)/\text{se}_{\text{robust}}(\hat\beta_j) \). In large samples it is approximately standard normal under \( H_0 \), and a robust 95% interval is \( \hat\beta_j \pm 1.96\,\text{se}_{\text{robust}} \).

Joint tests need more care. The \( F \) formulas from Step 7, built from \( R^2 \) or the SSR of restricted and unrestricted models, assume homoskedasticity, and there is no robust version of them. A robust test of several restrictions uses the robust variances and covariances of the estimates. The result is a Wald statistic; divided by the number of restrictions \( q \), it is reported as a robust \( F \). Software computes it as soon as you fit with a robust covariance matrix.

In the log-wage equation, the test that experience does not matter (\( \beta_{\text{exper}} = \beta_{\text{expersq}} = 0 \)) gives a robust \( F \) of 15.02 against the usual 15.15: the same conclusion. In the level equation the robust \( F \) is 11.65 against the usual 9.57. Both reject strongly here, but in a closer case the choice could change the verdict. The robust \( t \) for \( H_0: \beta_{\text{educ}} = 0.08 \) in the log equation is 3.37, against 3.27 with the usual standard error.

Common mistakeComputing an \( F \) statistic from \( R^2 \) values and calling it robust because the regression table showed robust standard errors. The \( R^2 \) form is valid only under homoskedasticity, whatever standard errors were printed. Use the software’s test command: f_test in statsmodels, waldtest or car::linearHypothesis with a robust vcov in R, test after regress, robust in Stata.

Weighted least squares and feasible GLS

Robust standard errors fix inference but leave OLS inefficient. If you know how the variance depends on \( x \), you can do better. Suppose \( \text{Var}(u_i \mid \mathbf{x}_i) = \sigma^2 h_i \) with \( h_i \) known, for example \( h_i = x_{i1} \). Divide every term of the model by \( \sqrt{h_i} \):

\[ \frac{y_i}{\sqrt{h_i}} = \beta_0 \frac{1}{\sqrt{h_i}} + \beta_1 \frac{x_{i1}}{\sqrt{h_i}} + \dots + \beta_k \frac{x_{ik}}{\sqrt{h_i}} + \frac{u_i}{\sqrt{h_i}} . \]

The new error has variance \( \sigma^2 h_i/h_i = \sigma^2 \): it is homoskedastic, and the parameters are the same \( \beta \)s. OLS on this transformed equation (which has no ordinary intercept) is BLUE. It is the same as minimising \( \sum \hat{u}_i^2/h_i \): each squared residual gets weight \( 1/h_i \), so noisy observations count for less. This is weighted least squares (WLS), a special case of generalised least squares.

Worked example

A savings model is \( \text{sav} = \beta_0 + \beta_1\,\text{inc} + u \) with \( \text{Var}(u \mid \text{inc}) = \sigma^2\,\text{inc} \). Write down the transformed equation and the WLS weight.

Step 1Here \( h_i = \text{inc}_i \). Divide through by \( \sqrt{\text{inc}_i} \), using \( \text{inc}_i/\sqrt{\text{inc}_i} = \sqrt{\text{inc}_i} \).
Step 2\( \dfrac{\text{sav}_i}{\sqrt{\text{inc}_i}} = \beta_0 \dfrac{1}{\sqrt{\text{inc}_i}} + \beta_1 \sqrt{\text{inc}_i} + \dfrac{u_i}{\sqrt{\text{inc}_i}} \).
Step 3Regress \( \text{sav}/\sqrt{\text{inc}} \) on \( 1/\sqrt{\text{inc}} \) and \( \sqrt{\text{inc}} \) without an intercept. Equivalently, run WLS of sav on inc with weight \( 1/\text{inc} \).

Richer households, whose saving is noisier, get less weight. The coefficients still estimate \( \beta_0 \) and \( \beta_1 \) of the original model.

In the book’s house-price data, assuming \( \text{Var}(u \mid \mathbf{x}) = \sigma^2\,\text{sqft} \), WLS gives a floor-area coefficient of 0.1367 (standard error 0.0080) against OLS’s 0.1280 (robust standard error 0.0089). Most WLS standard errors are smaller than the robust OLS ones (7.30 against 8.02 for a pool): that is the efficiency gain.

Usually \( h(\mathbf{x}) \) is unknown, and feasible GLS (FGLS) estimates it. A convenient model is \( \text{Var}(u \mid \mathbf{x}) = \sigma^2\exp(\delta_0 + \delta_1 x_1 + \dots + \delta_k x_k) \), which is always positive. Run OLS and save the residuals; regress \( \log(\hat{u}^2) \) on the \( x \) variables and save the fitted values \( \hat{g}_i \); set \( \hat{h}_i = \exp(\hat{g}_i) \); then run WLS with weights \( 1/\hat{h}_i \). On the house data, FGLS gives estimates close to OLS and smaller standard errors: 0.0081 against 0.0089 for floor area, 0.535 against 0.598 for distance, 7.25 against 8.02 for a pool.

Exam tipMost applied work simply reports OLS with robust standard errors. OLS is consistent whatever the form of heteroskedasticity, robust standard errors make inference valid, and anyone can replicate the result. WLS or FGLS is worth the effort when the heteroskedasticity is strong and its form is well understood (grouped averages are the classic case). If you use FGLS, report robust standard errors for it too, in case your variance model is wrong.

The linear probability model is always heteroskedastic

When \( y \) is 0 or 1, OLS estimates a linear probability model, \( P(y = 1 \mid \mathbf{x}) = \beta_0 + \beta_1x_1 + \dots \). A 0/1 variable with probability \( p \) has variance \( p(1-p) \), so

\[ \text{Var}(u \mid \mathbf{x}) = p(\mathbf{x})\,[1 – p(\mathbf{x})], \]

which changes with \( \mathbf{x} \) unless no regressor matters. The LPM is heteroskedastic by construction. In the book’s data on 2,000 loan applications, the Breusch–Pagan statistic is 187.0: a decisive rejection, as theory predicts. The rule is simple: always use robust standard errors with an LPM. WLS with weights \( 1/[\hat{p}(1-\hat{p})] \) fails whenever a fitted probability falls outside 0 to 1, and here 156 of the 2,000 do. That is one reason Step 14 introduces logit and probit.

What to report

Plot the residuals first and ask whether a log is the more natural dependent variable. Then report robust standard errors by default in cross-section work, and say so in the table note: “heteroskedasticity-robust (HC1) standard errors in parentheses”. Use robust \( t \) and Wald tests for every hypothesis. A BP or White test is useful to document the problem or to justify WLS, but a non-rejection is no licence to use the usual standard errors. The same sandwich idea extends to errors correlated over time (Newey–West standard errors, Step 12) and within groups (clustered standard errors, Step 15). For a longer treatment with more examples, read our article Heteroskedasticity: What It Is, Why It Matters, and How to Fix It.

Econometrics Made Simple Practice Questions coverPractise reading robust output and running BP tests until it is routine: the Practice Questions book has worked answers to every question.1,150+ questions · $9

Practise: 6 questions

Try each one on paper first, then check the worked answer.

EasyQ1. A regression with \( k = 3 \) regressors is estimated on \( n = 400 \) observations. Regressing the squared residuals on the three regressors gives \( R^2 = 0.035 \). Carry out the Breusch–Pagan LM test at the 5% level. Show worked answer
\( LM = nR^2 = 400 \times 0.035 = 14.0 \).
Under \( H_0 \) (homoskedasticity), \( LM \sim \chi^2_3 \); the 5% critical value is 7.81.
\( 14.0 > 7.81 \), so reject homoskedasticity (\( p = 0.003 \)).
Conclusion: report robust standard errors, and use the plot to see which variable drives the variance.
EasyQ2. In a simple regression with \( n = 50 \), \( \text{SST}_x = 200 \), \( \text{SSR} = 336 \) and \( \sum (x_i-\bar{x})^2\hat{u}_i^2 = 1{,}800 \). Compute the usual, HC0 and HC1 standard errors of the slope. Show worked answer
Usual: \( \hat\sigma^2 = 336/48 = 7.0 \), variance \( 7.0/200 = 0.035 \), se \( = 0.187 \).
HC0: variance \( 1{,}800/200^2 = 0.045 \), se \( = 0.212 \).
HC1: variance \( 0.045 \times 50/48 = 0.0469 \), se \( = 0.217 \).
The robust standard errors are larger, which suggests the biggest squared residuals sit at observations far from \( \bar{x} \).
MediumQ3. A model with \( k = 4 \) regressors is estimated on \( n = 600 \) observations. (a) How many terms would the full White test’s auxiliary regression contain? (b) The special White test, regressing \( \hat{u}^2 \) on \( \hat{y} \) and \( \hat{y}^2 \), gives \( R^2 = 0.012 \). Carry out the test at 5%. Show worked answer
(a) \( k(k+3)/2 = 4 \times 7/2 = 14 \) terms: 4 levels, 4 squares and 6 cross products (fewer if some repeat, such as the square of a dummy).
(b) \( LM = 600 \times 0.012 = 7.2 \). The 5% critical value of \( \chi^2_2 \) is 5.99.
\( 7.2 > 5.99 \): reject homoskedasticity (\( p = 0.027 \)).
The special test uses 2 degrees of freedom however many regressors there are, which keeps its power up.
MediumQ4. Food spending is modelled as \( \text{food} = \beta_0 + \beta_1\,\text{inc} + u \) with \( \text{Var}(u \mid \text{inc}) = \sigma^2\,\text{inc}^2 \). Write the transformed equation that WLS estimates, state the weight, and explain what the intercept of the transformed equation estimates. Show worked answer
Here \( h_i = \text{inc}_i^2 \), so \( \sqrt{h_i} = \text{inc}_i \). Divide through by income:
\( \dfrac{\text{food}_i}{\text{inc}_i} = \beta_0 \dfrac{1}{\text{inc}_i} + \beta_1 + \dfrac{u_i}{\text{inc}_i} \).
The new error has variance \( \sigma^2\text{inc}^2/\text{inc}^2 = \sigma^2 \): homoskedastic.
The WLS weight is \( 1/h_i = 1/\text{inc}_i^2 \).
Twist: regressing the food share on \( 1/\text{inc} \) with an ordinary intercept, the intercept estimates \( \beta_1 \), the marginal propensity to spend on food, and the slope on \( 1/\text{inc} \) estimates \( \beta_0 \).
MediumQ5. Five observations have \( x = 0, 1, 2, 3, 4 \) and error variances \( \sigma_i^2 = \sigma^2\left[1 + (x_i-\bar{x})^2\right] \). Find the true variance of the OLS slope and the value given by the usual formula \( \bar\sigma^2/\text{SST}_x \). By roughly what percentage is the usual standard error wrong? Show worked answer
\( \bar{x} = 2 \); deviations \( -2, -1, 0, 1, 2 \); squared deviations \( 4, 1, 0, 1, 4 \); \( \text{SST}_x = 10 \).
Variances: \( \sigma^2(5, 2, 1, 2, 5) \).
True: \( \sigma^2(4 \times 5 + 1 \times 2 + 0 + 1 \times 2 + 4 \times 5)/100 = 0.44\sigma^2 \).
Usual: average variance \( 15\sigma^2/5 = 3\sigma^2 \), so \( 3\sigma^2/10 = 0.30\sigma^2 \).
Variance ratio \( 0.44/0.30 = 1.47 \); standard-error ratio \( \sqrt{1.47} = 1.21 \). The usual standard error is about 17% too small (\( 1/1.21 = 0.83 \)), because the noisiest points are the ones far from \( \bar{x} \).
ExamQ6. A wage equation in levels (\( n = 1{,}000 \), five regressors) gives an education coefficient of 2.301 with usual standard error 0.179 and HC1 robust standard error 0.203. The Breusch–Pagan LM statistic on all five regressors is 36.58. (a) State the null hypothesis of the BP test and your conclusion at 5%. [2] (b) Compute the \( t \) statistic for education with each standard error, and a robust 95% confidence interval. [3] (c) The same model with \( \log(\text{wage}) \) gives BP \( LM = 10.56 \). Explain why the log model shows less heteroskedasticity. [2] Show worked answer
(a) \( H_0: \text{Var}(u \mid \mathbf{x}) = \sigma^2 \) (homoskedasticity). [B1] The 5% critical value of \( \chi^2_5 \) is 11.07; \( 36.58 > 11.07 \), so reject: the errors are heteroskedastic. [A1]
(b) Usual \( t = 2.301/0.179 = 12.85 \); robust \( t = 2.301/0.203 = 11.33 \). [M1 A1]
Robust interval: \( 2.301 \pm 1.96 \times 0.203 = [1.90, 2.70] \) dollars per hour per year of education. [A1]
(c) In levels, errors are in dollars, and dollar errors are larger for high earners. A log model makes errors proportional: a 10% surprise is the same size in logs at any wage. [B1] The BP \( p \)-value rises from below 0.001 to 0.061. [B1]
Total: 7 marks.

Check yourself

1. Under heteroskedasticity, with MLR.1–MLR.4 holding, the OLS coefficient estimates are

Unbiasedness needs only MLR.1–MLR.4. Heteroskedasticity breaks the variance formula, so the usual standard errors, \( t \) and \( F \) tests are invalid.

2. In a Breusch–Pagan test with \( k \) regressors in the auxiliary regression, the LM statistic is

Regress \( \hat{u}^2 \) on the \( k \) regressors; \( LM = nR^2 \) is approximately \( \chi^2_k \) under homoskedasticity.

3. If \( \text{Var}(u \mid x) = \sigma^2 x \), the WLS weight for each observation is

The weight is \( 1/h_i \) with \( h_i = x_i \). Equivalently, divide every variable by \( \sqrt{x_i} \) and run OLS.

Your score: 0 out of 3

The short version

  • Heteroskedasticity: \( \text{Var}(u \mid \mathbf{x}) \) depends on \( \mathbf{x} \). Common with income, firm size, wages and education, and group averages.
  • OLS stays unbiased and consistent; the usual standard errors and tests are invalid even in large samples, and OLS is not BLUE.
  • Detect with plots, Breusch–Pagan (\( nR^2 \sim \chi^2_k \)) and White (squares and cross products, or the special version with \( \hat{y} \) and \( \hat{y}^2 \)). Aim the test at the variable you suspect.
  • Robust standard errors replace \( \sigma_i^2 \) with \( \hat{u}_i^2 \). HC1 is standard; HC3 is best in small samples. Robust joint tests are Wald tests computed by software, not \( R^2 \) formulas.
  • WLS weights by \( 1/h_i \) when \( \text{Var}(u \mid \mathbf{x}) = \sigma^2h_i \); FGLS estimates \( h_i \) from \( \log(\hat{u}^2) \). The LPM always needs robust standard errors.
  • The full chapter in Econometrics Made Simple has the code in Python, R and Stata, more worked examples and a complete set of exercises with answers.
Econometrics Made Simple Complete Bundle coverTextbook and practice questions together: get both Econometrics Made Simple books for $19 (was $24).Both books · $19

Studying more than one subject? The Complete Book Bundle gives you every Economics, Statistics, Mathematics and Econometrics book in one download.

Want more questions like these, with worked answers?
The practice book has over 1,150 more, graded from easy to exam level.
Next: step 12 of 20Autocorrelation