White Test Calculator
Enter an aligned response Y and predictor X to fit a one-predictor OLS model, then calculate White’s heteroskedasticity LM and auxiliary F references. The calculator exposes the base and squared-residual regressions row by row without declaring the model homoskedastic, heteroskedastic, valid or suitable for trading.
Enter the base regression rows
Provide one finite response and predictor per row. The engine fits Y = β0 + β1X + e, then regresses e² on an intercept, X and X².
Enter 20 to 500 finite response values without percent signs, one aligned value per row.
Enter one finite, nonconstant predictor value for every Y row. The page adds the intercept.
White auxiliary regression
Entered Regression Specification Diagnostics 1.0.0.
On smaller screens, scroll horizontally to inspect the complete audit table.
| Row | Response Y | Predictor X | Base fitted | Base residual | Residual squared | Fitted residual squared | Auxiliary residual |
|---|
How this White test is calculated
First, the calculator fits an ordinary least-squares regression with an intercept and one entered predictor. The displayed fitted values and residuals reconcile row by row: Y equals the base fitted value plus the base residual.
Second, each base residual is squared. The auxiliary design contains an intercept, the entered predictor and its square. In the general multi-regressor White procedure, squares and pairwise interactions are generated from the original explanatory variables; with one predictor, that design reduces to 1, X and X squared.
The LM statistic equals the number of observations multiplied by the auxiliary R-squared. Its displayed asymptotic reference uses two degrees of freedom because the auxiliary design adds two nonconstant terms. The auxiliary-regression F reference is also shown with numerator degrees of freedom two and denominator degrees of freedom n minus three.
The engine maintains full floating-point precision for calculation and rounds only the interface. Every auxiliary fitted squared residual and auxiliary residual is displayed, so the squared-residual response can be reconciled independently.
Worked example from the audited fixture
The governed example contains 48 aligned Y and X rows and was independently reproduced with statsmodels 0.14.6.
- The base OLS fit has intercept 0.40445558, slope 0.86262914, R-squared 0.78135869 and residual sum of squares 3.47334755.
- The squared-residual auxiliary regression has R-squared 0.14767605, producing LM 7.08845027 and auxiliary F 3.89841334. Their displayed upper-tail references are 0.02889100 and 0.02745400; no model verdict is attached.
Reproduce it: select “Load audited example” above. The governed engine retains full precision and rounds only the visible interface.
How to interpret the result
- Treat LM and F as conditional reference statistics for this declared auxiliary regression, not as a score for strategy quality, forecast accuracy or profitability.
- A small reference probability can flag tension with the maintained constant-variance null under the stated design. It does not identify the cause, the correct remedy or the economic importance of any variance pattern.
- A larger reference probability is not proof that variance is constant. Power depends on sample size, the auxiliary specification, data quality and the actual form of any heteroskedasticity.
- The White design can react to broader functional-form misspecification as well as changing variance. Inspect residual plots and the base equation rather than assigning one causal label from one statistic.
- Use the Breusch–Pagan calculator when you want a narrower variance relationship tied to a declared predictor. Use Engle ARCH LM when the question concerns dependence in squared residual lags.
- If the response and predictor come from market data, preserve their timestamps, units, sampling rule and missing-row treatment outside this browser calculator. The page cannot verify those facts.
Assumptions and limits
- Enter 20 to 500 aligned finite rows. The predictor must vary, the base residual sum of squares must be positive, and the auxiliary design must have full rank.
- Only one predictor plus an intercept is fitted. Additional predictors, categorical variables, interactions among several predictors, weights, fixed effects, robust covariance and clustered errors are outside this contract.
- The calculator does not verify chronology, equal spacing, stationarity, exogeneity, independence, normality, structural stability, influential observations or selection bias.
- Reference probabilities are asymptotic and conditional on the maintained procedure. They are not universal accept-or-reject thresholds.
- Transforming, filtering or choosing X after viewing the result changes the inferential context. Record that process separately and avoid treating exploratory selection as pre-specified confirmation.
- No heteroskedasticity state, model-adequacy decision, forecast, edge estimate, backtest, grade, signal, order size or recommendation is generated.
Which regression diagnostic answers which question?
These diagnostics are complementary rather than interchangeable. They use different auxiliary responses, added terms and maintained nulls. A reference probability only has meaning alongside its source model, entered rows, chosen lag or power, auxiliary design and data-selection process.
| Diagnostic | Primary question | Output reference | Declared specification | Requires original Y and X |
|---|---|---|---|---|
| White | Residual variance versus X and X² | LM χ²(2) plus auxiliary F | One predictor; generated square | No |
| Breusch–Pagan / Koenker | Residual variance versus declared predictor | LM χ²(1) plus auxiliary F | Residuals and variance predictor | No |
| Breusch–Godfrey | Residual levels versus own lags | LM χ²(q) plus joint F | Base Y, X and fixed lag q | Yes |
| Ramsey RESET | Added fitted-value powers | Joint F plus Wald χ² | Base Y, X and maximum power | Yes |
Frequently asked questions
- It fits a one-predictor OLS model, squares its residuals, regresses those squares on an intercept, X and X squared, then reports LM and auxiliary F references.
- The statistic is the aligned observation count multiplied by the R-squared from the squared-residual auxiliary regression.
- White’s procedure generates squares and interactions from the original explanatory variables; with one entered predictor, the transparent design is an intercept, X and X squared.
- Version 1.0.0 uses two degrees of freedom because the one-predictor auxiliary design contains two nonconstant terms: X and X squared.
- It is the standard joint significance reference for the two nonconstant auxiliary-regression terms and can be inspected alongside the asymptotic LM reference.
- No. The pattern may reflect changing variance, functional-form misspecification, data selection or another source; the statistic does not diagnose a unique cause.
- No. Failure to obtain a small reference probability can reflect limited power, sample size, predictor choice or an alternative variance pattern not represented by the auxiliary design.
- No. It generates no homoskedasticity or heteroskedasticity verdict, model grade, predictive-edge claim, forecast, signal or recommendation.
Sources and methodology
- statsmodels — White test — Official documentation for the automatic square-and-interaction auxiliary design, LM statistic and F reference.
- statsmodels — diagnostic source — Official implementation source used to reconcile degrees of freedom and returned statistics.
Version 1.0.0 was locked after the base regression, auxiliary statistics, degrees of freedom, reference probabilities, coefficients and worked examples were independently recomputed with statsmodels 0.14.6 and SciPy 1.13.1. The browser calculator performs local arithmetic and does not upload entered observations. Outputs remain conditional on the disclosed model and assumptions.
Continue the variance and specification audit
Verify the source data before testing the regression
Reconcile the exact symbol, observation timestamps, timezone, sampling frequency, missing rows, spread, commission, financing, currency conversion, rollover adjustments and preprocessing before entering Y and X. Correct diagnostic arithmetic cannot repair a selected, misaligned, cost-inconsistent or otherwise misspecified source model.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

