An ABA White test calculator asks whether squared residuals from one documented ordinary least-squares model are systematically related to a broad expansion of that model's predictors. The expansion includes squares and pairwise products, which lets the diagnostic look for more than one prespecified variance pattern. It is a model check, not a verdict about treatment, a client, or the quality of care.

Clinicians & ABA Professionals / Data, Outcomes and Clinical Decision-Making.

What the White test actually examines

Ordinary least squares produces a fitted value and residual for every included row. The classical constant-variance assumption concerns how the residual distribution behaves across the design. When residual spread changes with fitted values or predictors, conventional standard-error calculations may be poorly calibrated even if the coefficient estimates can still be computed.

White's diagnostic uses squared residuals as the response in an auxiliary regression. Its candidate explanations are the original exogenous columns, their squares, and their interactions. That breadth is useful when a team has not prespecified one variance driver, but it also consumes degrees of freedom quickly. With many predictors and few rows, the expanded matrix can be redundant or too large to support a stable calculation.

This ABA White Test Expanded-Variance Heteroscedasticity Diagnostic Calculator follows the current statsmodels convention for its worked example. The supplied exogenous matrix must contain a constant. The implementation generates unique products of its columns, fits auxiliary OLS to squared residuals, and uses the auxiliary model rank minus one for the chi-square reference degrees of freedom. A package that expands factors differently, drops redundant columns differently, or omits the constant can return another result.

A model record comes before a statistic

The worksheet should be attached to the exact model that produced the residuals. A copied p-value cannot reconstruct that model later.

Record itemWhat belongs in the filePause whenIntended useExploratory diagnosis or a prespecified inferential reviewThe statistic will decide service or treatment by itselfRow unitSession, interval, client, site, or another defined unitDependent units are pooled as independent rowsRow keyStable, authorized, de-identified identifierThe source record and analysis row cannot be reconciledResponseOperational definition, unit, denominator, and observation windowMeasurement or opportunity changes are uncodedOriginal designOrdered columns, exact coding, interactions, offsets, and transformationsA residual-producing column is missing or undocumentedConstantIncluded explicitly for this conventionThe software adds or removes one silentlyInclusion rulesMissingness, exclusions, weights, windows, and verified correctionsRows were changed after the diagnostic was seenTest conventionExpansion rule, rank tolerance, statistic, reference distributionOutput from another convention is presented as identicalSoftwarePackage, version, precision, and result fieldsOnly a rounded screenshot survivesClinical contextDirect graph, phase labels, integrity, and setting eventsThe model is detached from the observed series

Freeze this record before calculating. If several plausible models were planned, retain every planned result instead of presenting only the most convenient one.

From residuals to the LM statistic

Let X be the original n by p design matrix, including its constant, and let e_i be the OLS residual for row i. Form an auxiliary response:

ui = ei^2

Next, construct Z from every unique product Xij * Xik with j <= k. Because the constant is one of the columns, its products reproduce the constant and original predictors. With an intercept plus predictors A and B, the resulting columns are:

1, A, B, A^2, A*B, B^2

Fit u = Z*gamma + v. Record the auxiliary R-squared and numerical rank r. The Lagrange-multiplier statistic and reference degrees of freedom used here are:

LM = n * R_aux^2

df = r - 1

pLM = P(ChiSquaredf >= LM)

The current statsmodels White-test documentation returns this LM result and an alternative F result. The implementation source shows the product expansion, auxiliary OLS, rank-based degrees of freedom, and n * R-squared calculation. Keep the LM and F labels intact. They are related references, not interchangeable numbers.

Copyable White-test worksheet

Preserve the original fit first. Used carefully, this ABA White test calculator keeps the variance question attached to the rows and model that generated it. Add rows rather than replacing the examples.

Row keyResponseOriginal predictors and codingFitted valueResidualResidual squaredContext note

Document how the auxiliary matrix is generated.

Auxiliary columnDefinitionRank statusCoefficientReview noteConstant1Predictor AAPredictor BBA squaredA^2A by BA*BB squaredB^2

Summary fieldRecorded valueRows nAuxiliary rank rAuxiliary residual degrees of freedomAuxiliary R-squaredLM = n * R_aux^2Chi-square reference df = r - 1LM upper-tail probabilityAlternative F statisticF numerator and denominator degrees of freedomF upper-tail probabilitySoftware, version, and precision

Save residual-versus-fitted and scale-location views beside the table. The statistic compresses the pattern and can hide whether a small number of rows drives it.

Fictional eighteen-row calculation

This fixture is synthetic. It is not a client record, a suitable clinical model, or a claim that session number and opportunity count explain a behavior. The original design contains a constant, session index, and a fictional opportunity count. The response is an arbitrary score.

RowSessionOpportunitiesResponseFittedResidualResidual squared1187.15.16457093131.93542906873.745885680022118.47.59691321070.80308678930.64494839113398.07.43140138790.56859861210.3233043817441410.610.9028853082-0.30288530820.0917395099551010.19.69823184450.40176815550.1614176507661512.013.1697157649-1.16971576491.3682349705771212.912.48463312160.41536687840.1725296437881714.415.9561170419-1.55611704192.4215002481991313.714.7514635782-1.05146357821.105575656310101816.818.2229474985-1.42294749852.024779583611111115.215.4595815735-0.25958157350.067382593312121618.918.9310654938-0.03106549380.000965064913131417.118.7655536710-1.66555367102.774069031014141922.422.23703759130.16296240870.026556746615151219.019.4736716663-0.47367166630.224364847416162025.624.50386804791.09613195211.201505256317171522.322.7796437638-0.47964376380.230058140118182129.826.77069850463.02930149549.1766675503

The original OLS coefficients for constant, session, and opportunities are 0.1343745496, 0.8736298181, and 0.5195708204. The auxiliary columns are 1, session, opportunities, session squared, session times opportunities, and opportunities squared. They have rank 6.

The auxiliary coefficients in that order are 11.5005499456, -0.4132918269, -1.5291660458, 0.0196601794, 0.0023869847, and 0.0600310046. Its R-squared is 0.4749271163, so:

LM = 18 * 0.4749271163 = 8.5486880934

With df = 6 - 1 = 5, the chi-square upper-tail probability is 0.1284770417. The alternative F statistic is 2.1707940259 on 5 and 12 degrees of freedom, with probability 0.1259592960.

Those probabilities are not proof of constant variance. They say how this documented statistic compares with its chosen reference under its assumptions. A small sample may have limited power, while leverage, dependence, nonnormality, or specification problems can complicate either reference.

One changed value, a visibly different summary

For a sensitivity check, change only row 18's fictional response from 29.8 to 26.8. Refit the original model, recompute all residuals, square them, and refit the same auxiliary design. The auxiliary R-squared becomes 0.1960627841; LM becomes 3.5291301133; and its five-degree-of-freedom probability becomes 0.6189845285.

The movement does not establish that 29.8 is an error or that 26.8 is better. It shows that a broad residual-variance summary can be sensitive to one high-end observation. Verify the source, inspect leverage and influence, and retain both versions if a documented correction is necessary.

Adding a constant to every response value preserves the residuals when the model has an intercept. Multiplying the response by a nonzero constant scales residuals and squared residuals but preserves the auxiliary R-squared and LM, apart from numerical tolerance. A joint permutation of X and the response also preserves the calculation. Permuting only one side corrupts row identity rather than creating a meaningful sensitivity analysis.

White and Breusch-Pagan answer different questions

The related Breusch-Pagan diagnostic uses a specified variance design, often the original predictors, rather than automatically adding every square and interaction. White is broader but may be less economical. Agreement can strengthen a diagnostic story; disagreement may reflect different alternatives, rank, or small-sample behavior. Neither test identifies the correct covariance estimator or model repair.

The statsmodels diagnostics index lists multiple heteroscedasticity procedures because one number does not cover every model defect. NIST's analysis of residuals emphasizes graphical checks for constant spread, independence, distributional shape, and functional form. Its residual standard-deviation plot offers another view of changing variation across a factor or predictor.

Robust covariance can change standard errors without changing the fitted coefficients, but it does not fix an incorrect mean model, dependent rows, bad measurement, data leakage, or a clinically meaningless specification. Weighted least squares and variance models make additional assumptions. Choose any response with a qualified methods reviewer, not from whichever option yields a preferred label.

What should stop the calculation

Stop if the residuals cannot be reproduced from the recorded model, the row keys do not align, a required constant is absent under this convention, or any value is nonfinite. Also stop when the original design is rank deficient, the expanded design has inadequate residual degrees of freedom, or software handles redundancy without exposing the retained rank.

Repeated observations from several clients, providers, or sites should not be flattened into independent rows without a defensible dependence model. Ordered residual correlation, clustering, changing denominators, varying exposure, measurement drift, phase misspecification, and influential observations can all produce patterns that White alone cannot diagnose.

Do not remove a row, add a transform, collapse a category, or revise a phase boundary after seeing the p-value unless a verified correction or prespecified sensitivity plan supports it. Preserve the original calculation, revised calculation, reason, author, date, and downstream decisions.

Clinical meaning remains outside the test

A variance diagnostic cannot establish a functional relation, experimental control, causation, treatment effectiveness, social validity, or meaningful change. Direct observation, measurement quality, design logic, phase context, treatment integrity, and client priorities still carry the clinical interpretation. A residual plot that widens may signal a modeling concern, but it may also reflect changing opportunities or context that should be understood directly.

The BACB Ethics Code materials support competent, data-based practice and appropriate professional boundaries. Measurement, visual display, interpretation, and experimental design topics appear in the BCBA Test Content Outline. The Standards for Educational and Psychological Testing tie supporting evidence to a defined interpretation and use. None of these sources requires the White test or validates this fictional fixture.

A statistician or regression-diagnostics specialist should review the expansion, rank, sample size, reference distribution, model assumptions, and inferential use. The responsible clinician should review measurement, phase logic, direct graphs, treatment integrity, and client relevance. Clients and caregivers should be included when an analysis could influence goals or services. All named external reviews remain pending.

Privacy, security, and accessible use

Use authorized, de-identified row keys and keep any re-identification key in an approved system. For federal background relevant to covered entities and business associates, consult the HHS Privacy Rule summary together with the HHS Security Rule summary. Neither page determines every organization's obligations or approves a particular calculator.

Do not paste protected data into an unapproved public tool. Store the model record, residual table, expanded design, results, software version, reviewer notes, and corrections together in an authorized location. An accessible implementation should support keyboard use, persistent labels, visible focus, readable errors, text equivalents for plots, downloadable tables, and conclusions that do not depend on color alone.

Related resources

Sources