Statistical Tests Open Access

White's Test for Heteroskedasticity

Diagram of a residuals-versus-fitted-values scatterplot showing a curved, non-linear spread of points, illustrating the broader class of heteroskedasticity patterns that White's Test for Heteroskedasticity is designed to detect.
Figure 1. White's Test for Heteroskedasticity checks whether the spread of regression residuals follows any systematic pattern in the predictors-linear, curved, or interactive-by regressing squared residuals on the predictors, their squares, and their cross-products.

Introduction

White's Test for Heteroskedasticity checks whether the residuals from a regression model have constant variance-a property called homoskedasticity-or whether the spread of the residuals changes systematically with the predictors, a problem called heteroskedasticity. It answers the same underlying question as the Breusch-Pagan Test, but without assuming the relationship between variance and the predictors has to be a straight line-making it the test to reach for when you suspect the pattern might be curved, U-shaped, or driven by an interaction between two predictors rather than either one alone.

By the end of this article you will be able to state exactly when White's Test applies, compute the statistic completely by hand on a small worked example, understand how its auxiliary regression differs from Breusch-Pagan's, interpret the result correctly, know what to do if heteroskedasticity is detected, and run the same test in one line of Python with statsmodels.

What Is White's Test?

Ordinary least squares regression assumes the errors have constant variance across all values of the predictors. In practice this often fails, and it doesn't always fail in a simple, straight-line way: prediction errors might be small for mid-sized houses but large for both very small and very large ones, producing a U-shaped variance pattern that a purely linear check would miss entirely. White's Test was built specifically to catch patterns like this, without requiring the analyst to know their exact shape in advance.

The test works by asking the same clever question the Breusch-Pagan Test asks-can the squared residuals themselves be predicted from the regressors?-but with a much richer set of candidate predictors. In addition to the original regressors, White's auxiliary regression also includes their squared terms and every pairwise cross-product between them. If residual variance really is constant, none of these terms should explain the squared residuals in a systematic way. If variance depends on the predictors-linearly, quadratically, or through an interaction-the richer auxiliary regression is far more likely to pick it up.

It exists for the same underlying reason the Breusch-Pagan Test does: heteroskedasticity doesn't bias the regression coefficients themselves, but it does make the standard errors reported by ordinary least squares unreliable-often making significance tests look more (or less) confident than they should be. White's contribution was to widen the net so that variance patterns beyond simple linear relationships don't slip through undetected.

Core idea in one line: square the residuals, regress them on the original predictors, their squares, and their cross-products, and check whether that richer auxiliary regression explains a meaningful amount of variation-if it does, the residual spread depends on the predictors in some systematic way, linear or not.

When to Use It

Use White's Test after fitting any ordinary least squares regression whenever you want to formally check the constant-variance assumption and you are not confident the variance pattern-if one exists-would be a simple straight-line function of the predictors. The key requirement: you already have a fitted linear regression, and you either suspect a nonlinear or interactive variance pattern, or you simply want the most general available check before trusting the model's standard errors.

ScenarioRegressionWhat's Being Checked
House price modelingSale price vs square footage, ageWhether price residuals widen for both very small and very large homes (U-shape)
Manufacturing yield studiesDefect rate vs temperature, pressureWhether variability depends on an interaction between temperature and pressure
Marketing response modelsSales vs ad spend, price discountWhether residual spread changes nonlinearly with spend, not just linearly
Model specification checksAny linear regressionWhether a significant result reflects heteroskedasticity or a missing nonlinear term
General-purpose OLS diagnosticAny linear regression with multiple predictorsThe broadest available check on whether OLS standard errors can be trusted
A more general default, at a cost. Many analysts reach for White's Test as their default heteroskedasticity check precisely because it doesn't require guessing the shape of the variance pattern in advance-though that generality comes with a real cost in degrees of freedom, discussed in Limitations.

Key Assumptions

  • Correctly specified mean model: the original regression must be reasonably well specified-omitted variables or the wrong functional form can produce residual patterns that mimic heteroskedasticity without actually being a variance problem.
  • Independent observations: the auxiliary regression on squared residuals assumes observations are independent of one another, just like the original regression.
  • Large-sample approximation: the \( LM = nR^2 \) statistic follows a chi-square distribution asymptotically-with very small samples, or many predictors relative to the sample size, the approximation may be unreliable.
  • Enough observations relative to predictors: because the auxiliary regression includes squares and cross-products, the number of regressors grows quickly with the number of original predictors-see Limitations for how this can become a practical constraint.

Hypotheses

White's Test formally tests whether the error variance depends on the predictors, their squares, or their cross-products:

  • Null Hypothesis (\( H_0 \)): the error variance is constant (homoskedastic)-it does not depend on any of the predictors, their squares, or their cross-products.
  • Alternative Hypothesis (\( H_1 \)): the error variance depends on at least one of these terms (heteroskedastic).

(Formally, if the original model is \( y_i = \beta_0 + \beta_1 x_{1i} + \cdots + \beta_k x_{ki} + \varepsilon_i \) with \( \text{Var}(\varepsilon_i) = \sigma_i^2 \), the null hypothesis states \( \sigma_i^2 = \sigma^2 \) for every observation \( i \), while the alternative allows \( \sigma_i^2 \) to vary systematically with the \( x \) variables, their squares, or their products.)

The Formula, Explained

Start with a fitted regression \( y_i = \beta_0 + \beta_1 x_{1i} + \cdots + \beta_k x_{ki} + \varepsilon_i \) and its residuals \( e_i = y_i - \hat{y}_i \). White's procedure follows three steps:

Step 1. Square the residuals to get \( e_i^2 \), an estimate of the local error variance at each observation.

Step 2. Run the auxiliary regression of the squared residuals on the original predictors, their squares, and their pairwise cross-products. For two predictors \( x_1 \) and \( x_2 \), that means:

\[ e_i^2 = \gamma_0 + \gamma_1 x_{1i} + \gamma_2 x_{2i} + \gamma_3 x_{1i}^2 + \gamma_4 x_{2i}^2 + \gamma_5 x_{1i} x_{2i} + u_i \]

Step 3. Compute the test statistic from the \( R^2 \) of that auxiliary regression:

\[ LM = n \cdot R^2_{\text{aux}} \]

Under \( H_0 \) (constant variance), this statistic is asymptotically distributed as a chi-square distribution with degrees of freedom equal to the number of regressors \( p \) in the auxiliary regression (not counting the constant):

\[ LM \;\xrightarrow{d}\; \chi^2_p \quad \text{under } H_0 \]

With \( k \) original predictors, the full auxiliary regression has \( p = 2k + \binom{k}{2} \) regressors: the \( k \) original predictors, their \( k \) squares, and \( \binom{k}{2} \) pairwise cross-products. With just one predictor (\( k = 1 \)), this simplifies to only two terms-\( x_i \) and \( x_i^2 \)-since there are no cross-products to include.

Why this is a Score (Lagrange Multiplier) Test. Like the Breusch-Pagan Test, White's statistic is a Score Test (Lagrange Multiplier Test): it only ever needs the model fitted under \( H_0 \) (constant variance)-the original regression's residuals-and never has to estimate a full model with variance explicitly depending on the predictors.

White's Special Form (Using Fitted Values)

With many predictors, the full auxiliary regression can quickly run out of degrees of freedom-five predictors already produce \( 2(5) + \binom{5}{2} = 20 \) regressors before the constant. White (1980) suggested a practical shortcut for this case, sometimes called the special form of the test: instead of including every predictor, square, and cross-product individually, regress the squared residuals on just the fitted values \( \hat{y}_i \) and their square:

\[ e_i^2 = \gamma_0 + \gamma_1 \hat{y}_i + \gamma_2 \hat{y}_i^2 + u_i \]

Because \( \hat{y}_i \) is itself a linear combination of all the predictors, its square captures a useful summary of the squares and cross-products without needing to list them all individually. This reduces the auxiliary regression to just two regressors regardless of how many predictors the original model has, at the cost of losing the ability to identify which specific predictor is driving the heteroskedasticity.

Full form vs special form. Most software, including statsmodels' het_white, implements the full form by default. Reach for the special form mainly as a manual, degrees-of-freedom-saving shortcut when you have many predictors and don't need to identify which one is responsible for the changing variance.

Worked Example 1: A Small Numerical Example by Hand

Suppose a simple regression of \( y \) on a single predictor \( x \) for 8 observations produces the following fitted values and residuals. Notice the pattern: the squared residuals are large at both ends of the \( x \) range and small in the middle-a U-shape that a purely linear check would struggle to see.

Observation\( x_i \)Residual \( e_i \)Squared residual \( e_i^2 \)
113.19.61
220.60.36
33-0.30.09
440.150.0225
55-0.150.0225
660.30.09
77-0.60.36
883.210.24

Step 1: Run the Breusch-Pagan (linear-only) auxiliary regression, for comparison

First, see what the simpler linear-only check would find. Regressing \( e_i^2 \) on \( x_i \) alone gives an essentially flat fit:

\[ R^2_{\text{aux, linear}} \approx 0.0008, \qquad LM_{\text{BP}} = 8 \times 0.0008 \approx 0.006 \]

With \( k = 1 \), the critical value at \( \alpha = 0.05 \) is \( \chi^2_{1,0.05} = 3.841 \). Since \( LM_{\text{BP}} = 0.006 \) is nowhere close to that threshold (p-value \( \approx 0.94 \)), the linear-only Breusch-Pagan check would fail to detect anything-it sees a symmetric U-shape as no relationship at all, since the squared residuals are just as likely to be large when \( x \) is small as when \( x \) is large.

Step 2: Run White's auxiliary regression, including \( x_i^2 \)

Now regress the squared residuals \( e_i^2 \) on both \( x_i \) and \( x_i^2 \):

\[ e_i^2 = \gamma_0 + \gamma_1 x_i + \gamma_2 x_i^2 + u_i \]

Fitting this by least squares gives:

\[ \hat{\gamma}_0 \approx 14.77, \qquad \hat{\gamma}_1 \approx -7.39, \qquad \hat{\gamma}_2 \approx 0.827 \]

Step 3: Compute \( R^2 \) of White's auxiliary regression

Using the fitted auxiliary values \( \hat{e_i^2} = \hat{\gamma}_0 + \hat{\gamma}_1 x_i + \hat{\gamma}_2 x_i^2 \), the quadratic term now picks up the U-shape:

\[ R^2_{\text{aux}} \approx 0.802 \]

Step 4: Compute the White statistic

\[ LM = n \cdot R^2_{\text{aux}} = 8 \times 0.802 \approx 6.412 \]

Step 5: Compare against the critical value

With \( p = 2 \) regressors in the auxiliary regression (\( x_i \) and \( x_i^2 \)), \( LM \) is compared against a \( \chi^2_2 \) distribution. The critical value at \( \alpha = 0.05 \) is \( \chi^2_{2,0.05} = 5.991 \). Since \( LM = 6.412 > 5.991 \) (p-value \( \approx 0.0405 \)), we reject \( H_0 \): the residual variance is not constant-it follows a U-shaped pattern in \( x \) that the quadratic term in White's auxiliary regression was able to detect.

The point of this example. The Breusch-Pagan check and White's Test were run on the exact same residuals. Breusch-Pagan's linear-only auxiliary regression completely missed the heteroskedasticity (p \( \approx 0.94 \)), while White's richer auxiliary regression caught it clearly (p \( \approx 0.04 \))-this is precisely the kind of nonlinear pattern White's Test exists to catch.

Worked Example 2: House Price Regression in Python

A more realistic case involves multiple predictors, where computing every cross-product by hand becomes impractical. An analyst regresses house sale price on square footage and age for 50 houses, suspecting that price prediction errors widen sharply for larger homes.

import numpy as np
import statsmodels.api as sm
from statsmodels.stats.diagnostic import het_white, het_breuschpagan

np.random.seed(7)
n = 50
sqft = np.random.uniform(800, 3500, n)
age = np.random.uniform(0, 50, n)

# Error spread grows sharply (roughly quadratically) with square footage
price = 50 + 0.15*sqft - 0.8*age + np.random.normal(0, 1, n) * (2 + 0.02*sqft + 0.000015*sqft**2)

X = sm.add_constant(np.column_stack([sqft, age]))
model = sm.OLS(price, X).fit()

lm_stat, lm_pvalue, f_stat, f_pvalue = het_white(model.resid, model.model.exog)

print(f"White LM statistic: {lm_stat:.3f}")
print(f"White LM p-value: {lm_pvalue:.4f}")
print(f"White F statistic: {f_stat:.3f}")
print(f"White F p-value: {f_pvalue:.4f}")

Output:

White LM statistic: 26.246
White LM p-value: 0.0001
White F statistic: 9.723
White F p-value: 0.0000

With \( k = 2 \) predictors, White's full auxiliary regression includes \( sqft \), \( age \), \( sqft^2 \), \( age^2 \), and the cross-product \( sqft \times age \)-five regressors in total, matching \( p = 2(2) + \binom{2}{2} \cdot 1 = 5 \) degrees of freedom for the \( \chi^2_5 \) reference distribution. The p-value of \( 0.0001 \) is far below \( 0.05 \), giving strong evidence of heteroskedasticity-consistent with how the data was generated, where the error spread was built to grow with square footage.

Getting Robust Standard Errors as a Fix

If the test detects heteroskedasticity, switching to heteroskedasticity-robust standard errors is often the simplest remedy-no need to change the model itself:

# Refit with heteroskedasticity-consistent (HC3) standard errors
robust_model = sm.OLS(price, X).fit(cov_type='HC3')

print("Original SE:", model.bse)
print("Robust SE:  ", robust_model.bse)
# Coefficients are identical to the original fit;
# only the standard errors, t-values, and p-values change.

The coefficient estimates themselves stay exactly the same between the two fits-only the standard errors change, which is exactly the correction the test is meant to prompt.

How to Interpret Results

The significance level \( \alpha = 0.05 \) is the standard threshold used to decide whether heteroskedasticity is "statistically detected."

ConditionInterpretation
\( p < 0.05 \)Reject \( H_0 \)-heteroskedasticity is present; residual variance depends systematically on the predictors, their squares, or their cross-products.
\( p \geq 0.05 \)Fail to reject \( H_0 \)-not enough evidence against constant variance; homoskedasticity remains a reasonable assumption.
Note. Detecting heteroskedasticity does not mean the regression coefficients are wrong-under standard assumptions, OLS coefficients remain unbiased and consistent regardless. What breaks down is the efficiency of the estimates and the reliability of the standard errors, which is why the fix (see What to Do If Heteroskedasticity Is Detected) usually targets inference rather than the coefficients themselves.

Checking Assumptions in Practice

  • Plot residuals against fitted values first: a simple scatterplot of \( e_i \) versus \( \hat{y}_i \) often reveals curved or U-shaped patterns visually before running any formal test-Worked Example 1 above would show exactly this pattern.
  • Check the mean model is reasonably well specified: omitted variables or an incorrect functional form can create residual patterns that look like heteroskedasticity but are really a specification problem-White's Test can pick up either issue, so a significant result deserves a second look at the mean model too.
  • Watch degrees of freedom with many predictors: the number of regressors in the full auxiliary regression grows quickly-see Limitations-so with many predictors, consider the special form using fitted values instead.
  • Compare against the Breusch-Pagan Test: if White's Test rejects \( H_0 \) but a linear Breusch-Pagan check does not, that gap itself is informative-it suggests the variance pattern is nonlinear or interaction-driven, as in Worked Example 1.
  • Sample size: the \( LM = nR^2 \) chi-square approximation is asymptotic; with very small samples, treat the result with appropriate caution or consider a bootstrap approach.

What to Do If Heteroskedasticity Is Detected

  • Use heteroskedasticity-robust standard errors: the most common and simplest fix-refit with White or HC3 standard errors, which keep the same coefficient estimates but correct the standard errors and resulting inference, as shown in the Python Example.
  • Apply Weighted Least Squares (WLS): if the variance pattern is well understood (e.g., variance proportional to \( x^2 \) or to the fitted values), WLS can produce more efficient coefficient estimates than plain OLS with robust standard errors.
  • Transform the outcome variable: a log transform of the dependent variable often stabilizes variance in money- or count-based outcomes, such as price, income, or sales.
  • Re-examine the model specification: since heteroskedasticity can be a symptom of a missing predictor or incorrect functional form-especially given how White's Test can also flag functional-form misspecification-revisit whether the mean model itself is correctly specified before assuming the variance structure alone is the issue.
  • Consider a Generalized Linear Model: for outcomes with a naturally non-constant variance (e.g., counts, proportions), a GLM with an appropriate variance function may be a better fit than forcing OLS to work with a correction.

Advantages

  • Does not require the analyst to specify the functional form of the heteroskedasticity in advance-squares and cross-products are included automatically.
  • Detects a broader class of variance patterns than the Breusch-Pagan Test, including curved (e.g., U-shaped) and interaction-driven heteroskedasticity, as shown in Worked Example 1.
  • Only requires the model fitted under \( H_0 \) (constant variance)-never needs to estimate a full model where variance explicitly depends on the predictors, as it is a Score Test by construction.
  • Can also serve as a general specification check, since it is sensitive to some forms of functional-form misspecification in the mean model, not just pure variance changes.
  • Widely implemented in standard statistical software, including a one-line call in statsmodels.

Limitations

  • Degrees of freedom grow quickly: with \( k \) predictors, the full auxiliary regression has \( 2k + \binom{k}{2} \) regressors-five predictors already require 20, which can strain small or moderate sample sizes.
  • Like other chi-square-based tests, the \( \chi^2_p \) reference distribution is asymptotic-can be less reliable in very small samples, especially once degrees of freedom are large relative to \( n \).
  • Sensitive to mean-model misspecification-an omitted variable or wrong functional form can trigger a significant result that isn't really about variance at all.
  • Does not identify which specific predictor, square, or interaction is driving a significant result nearly as cleanly as the Breusch-Pagan Test does for its simpler auxiliary regression-diagnosing the source often requires inspecting the auxiliary regression's individual coefficients directly.
  • Does not, by itself, tell you how to fix the heteroskedasticity-only that it is present; see What to Do If Heteroskedasticity Is Detected.

When NOT to Use It

  • Breusch-Pagan Test: use instead when you specifically want to know whether variance is linearly related to the predictors, when degrees of freedom are tight, or when identifying which predictor drives the effect matters more than catching every possible pattern.
  • Goldfeld-Quandt Test: use instead when you have a specific ordering variable in mind (e.g., you suspect variance differs cleanly between a low-value group and a high-value group) and prefer a test based on comparing two subsample variances directly.
  • Levene's Test or Bartlett's Test: use instead when comparing variances across a small number of clearly defined groups rather than as a function of continuous regression predictors.
  • Many predictors, small sample: if the full auxiliary regression's degrees of freedom would overwhelm the sample size, prefer White's special form using fitted values, or fall back to the more parsimonious Breusch-Pagan Test.

White vs Breusch-Pagan vs Goldfeld-Quandt

17.1 White's Test vs Breusch-Pagan Test

AspectWhite's TestBreusch-Pagan Test
Auxiliary regression predictorsOriginal predictors plus their squares and cross-productsOriginal predictors only (linear terms)
Patterns detectedBroader-including nonlinear and interaction-driven patternsLinear heteroskedasticity in the predictors
Degrees of freedom usedMore-grows quickly with many predictorsFewer-just the number of predictors
Also sensitive toBoth heteroskedasticity and some functional-form misspecificationPrimarily variance misspecification

17.2 White's Test vs Goldfeld-Quandt Test

AspectWhite's TestGoldfeld-Quandt Test
ApproachRegress squared residuals on predictors, squares, and cross-productsCompare residual variances between two ordered subsamples
Requires an ordering variableNo-uses all predictors directlyYes-data must be sortable by a suspected variance driver
Test statisticChi-square (\( LM = nR^2 \))F-statistic (ratio of two subsample residual variances)
Best suited forGeneral-purpose checks when the variance pattern's shape is unknownA specific, known suspected split point (e.g., before/after a threshold)

17.3 White's Test vs Durbin-Watson Test

AspectWhite's TestDurbin-Watson Test
What it detectsNon-constant residual variance (heteroskedasticity), including nonlinear patternsSerial correlation between consecutive residuals (autocorrelation)
Requires ordered dataNoYes-observations must be in a meaningful sequence
Typical remedy if significantRobust standard errors, WLS, or a variance-stabilizing transformHAC standard errors, GLS, or an explicit time-series model

Common Misconceptions

  • "Heteroskedasticity means my regression coefficients are wrong." Not true-under standard assumptions, OLS coefficients remain unbiased and consistent; only the standard errors become unreliable, as discussed in How to Interpret Results.
  • "White's Test is always strictly better than the Breusch-Pagan Test." Not necessarily-White's richer auxiliary regression can detect patterns Breusch-Pagan misses, but it also burns more degrees of freedom, which can hurt power in small samples with many predictors; see Limitations.
  • "A significant White's Test result always means the data needs a Weighted Least Squares fix." Robust standard errors are usually the simpler, more common remedy-see What to Do If Heteroskedasticity Is Detected for the full range of options.
  • "A non-significant White's Test result proves variance is exactly constant." Failing to reject \( H_0 \) only means there was not enough evidence against constant variance with this sample-it does not prove homoskedasticity holds exactly.
  • "White's Test can also detect autocorrelation." It cannot-it is specifically about variance, not serial correlation; for that, use the Durbin-Watson Test instead.

Interview Questions

  1. Describe the three steps of White's procedure, from the original regression to the final test statistic.
  2. How does White's auxiliary regression differ from the Breusch-Pagan Test's, and what extra patterns can it detect as a result?
  3. With \( k \) original predictors, how many regressors appear in White's full auxiliary regression, and why does this number grow so quickly?
  4. What is White's "special form," and what trade-off does it make relative to the full form?
  5. Explain why White's Test is a special case of the Score (Lagrange Multiplier) Test framework.
  6. Does heteroskedasticity bias the OLS coefficient estimates, the standard errors, or both? Explain why.
  7. Why might a significant White's Test result actually reflect a misspecified mean model rather than a genuine variance problem?
  8. If White's Test is significant but the Breusch-Pagan Test on the same data is not, what does that difference suggest about the shape of the heteroskedasticity?
  9. Compare White's Test to the Goldfeld-Quandt Test-when would you prefer one over the other?
  10. How would you interpret the individual coefficients of White's auxiliary regression itself, beyond just the overall test statistic?

Frequently Asked Questions

  • White's Test checks whether the variance of the residuals from a fitted regression model stays constant (homoskedastic) or instead changes systematically as a function of the predictors (heteroskedastic)-and unlike simpler tests, it does not assume that relationship has to be a straight line, so it can catch curved or interaction-driven variance patterns too.
  • Fit the original regression and obtain its residuals. Square the residuals, then regress the squared residuals on the original predictors, the squares of those predictors, and every pairwise cross-product between them, in what is called an auxiliary regression. The test statistic is LM = n * R-squared, where n is the sample size and R-squared comes from that auxiliary regression, following a chi-square distribution with degrees of freedom equal to the number of regressors in the auxiliary regression under the null hypothesis of constant variance.
  • If the p-value is below your chosen significance level (commonly alpha = 0.05), you reject the null hypothesis of constant variance and conclude heteroskedasticity is present-the spread of the residuals depends systematically on the predictors, possibly in a nonlinear or interactive way. If the p-value is at or above alpha, there is not enough evidence against constant variance, and the homoskedasticity assumption is reasonable to keep.
  • The Breusch-Pagan Test regresses squared residuals only on the original predictors in levels, so it is best at catching heteroskedasticity that is linearly related to those predictors. White's Test enlarges the auxiliary regression to include squared terms and cross-products of the predictors, letting it detect a broader range of heteroskedasticity patterns-including curved, U-shaped, or interaction-driven variance-at the cost of consuming more degrees of freedom, especially with many predictors.
  • No-that is its central advantage over more targeted tests. Because the auxiliary regression automatically includes every predictor, its square, and every pairwise cross-product, White's Test can pick up a wide class of variance patterns without the analyst needing to guess the correct functional form in advance, unlike the Goldfeld-Quandt Test, which requires choosing a specific ordering variable up front.
  • The most common fix is to switch to heteroskedasticity-consistent (robust) standard errors, such as White or HC3 standard errors, which leave the coefficient estimates unchanged but correct the standard errors and resulting p-values. Alternatives include Weighted Least Squares if the variance pattern is well understood, or a variance-stabilizing transformation like taking the log of the outcome variable.
  • No-under standard assumptions, ordinary least squares coefficient estimates remain unbiased and consistent even when heteroskedasticity is present. What breaks down is the efficiency of the estimates and the reliability of the standard errors, which is why White's Test matters for trustworthy hypothesis tests and confidence intervals rather than for the coefficients themselves.

Key Takeaways

  • White's Test checks whether the variance of regression residuals is constant (homoskedastic) or changes systematically with the predictors (heteroskedastic), without assuming that relationship has to be linear.
  • It works by regressing the squared residuals on the original predictors, their squares, and their pairwise cross-products, then computing \( LM = nR^2 \) from that auxiliary regression, compared against a \( \chi^2_p \) distribution.
  • Compared to the Breusch-Pagan Test, White's Test can catch curved, U-shaped, or interaction-driven heteroskedasticity that a linear-only check would miss entirely-demonstrated directly in Worked Example 1.
  • That extra flexibility costs degrees of freedom: with \( k \) predictors, the full auxiliary regression has \( 2k + \binom{k}{2} \) regressors, which can strain small samples-see White's Special Form for a lighter-weight alternative.
  • Detecting heteroskedasticity does not bias OLS coefficients, but it does undermine the reliability of standard errors, t-tests, and confidence intervals.
  • In Python, statsmodels' het_white computes the test directly from a fitted OLS model's residuals and design matrix in a single line.
  • If heteroskedasticity is detected, the simplest fix is usually heteroskedasticity-robust (White/HC3) standard errors; Weighted Least Squares and variance-stabilizing transforms are alternatives, as outlined in What to Do If Heteroskedasticity Is Detected.

White's Test remains one of the most general regression diagnostics available precisely because it doesn't ask the analyst to guess the shape of the heteroskedasticity in advance-linear, curved, or interactive patterns are all folded into the same auxiliary regression. That generality is its whole appeal: almost any regression involving money, size, or physical processes is a plausible candidate for residual variance that changes in ways more complex than a straight line.

The two worked examples above showed the same underlying advantage from two angles: a small, hand-calculated case where a U-shaped variance pattern slipped straight past a linear-only Breusch-Pagan check but was caught cleanly by White's quadratic term, and a multi-predictor house price regression where statsmodels' het_white handled every square and cross-product automatically. Reporting the White statistic alongside a residuals-versus-fitted-values plot, and switching to robust standard errors whenever the test is significant, gives a reliable foundation for trusting a regression's inference-especially when you aren't sure in advance what shape the heteroskedasticity might take.