Calculator Inputs
Example Data Table
This example uses one response variable and two predictors.
| Y | X1 | X2 |
|---|---|---|
| 8.7 | 1 | 2.1 |
| 9.2 | 2 | 2.4 |
| 10.1 | 3 | 2.8 |
| 11.5 | 4 | 3.0 |
| 12.4 | 5 | 3.5 |
| 13.8 | 6 | 3.9 |
Formula Used
The main regression is estimated with ordinary least squares. The model is Y = Xb + e.
The residuals are squared. Then an auxiliary regression is fitted using e squared as the response.
The main LM statistic is LM = n × R² auxiliary.
The degrees of freedom are equal to the number of predictors, excluding the intercept.
The F statistic is F = (R² / k) / ((1 - R²) / (n - k - 1)).
The null hypothesis states that the regression error variance is constant.
How To Use This Calculator
- Paste your data into the text area.
- Place the response variable in the first column.
- Place each predictor in the next columns.
- Use commas, spaces, tabs, or semicolons between values.
- Choose alpha and decimal precision.
- Press the calculate button.
- Read the LM p value and conclusion.
- Download the CSV or PDF report when needed.
About the Breusch Pagan Test
The Breusch Pagan test is a regression diagnostic for changing error variance. It checks whether residual spread grows or shrinks with predictors. A stable spread supports ordinary least squares assumptions. An unstable spread suggests heteroscedasticity. That issue can distort standard errors, confidence intervals, and hypothesis tests.
Why This Calculator Helps
This calculator accepts pasted regression data. The first column is the response variable. The remaining columns are predictor variables. It estimates the main regression, stores residuals, squares them, and fits an auxiliary regression. The auxiliary fit explains whether predictors help describe residual variance. The tool then reports the LM statistic, degrees of freedom, p value, and optional F result.
Interpreting The Result
The null hypothesis says the error variance is constant. A small p value means the data gives evidence against that claim. Many analysts compare the p value with 0.05. You can choose another alpha level when your field requires stricter control. A significant result does not prove a model is useless. It signals that uncertainty estimates may need correction.
Practical Model Guidance
If heteroscedasticity appears, review plots of residuals against fitted values. Check whether important variables are missing. Consider transformations, weighted least squares, or robust standard errors. These steps can make inference more dependable. Always keep subject knowledge in the decision. A statistical flag needs context.
Data Quality Matters
The test needs enough observations. It also needs a usable design matrix. Highly duplicated columns can make regression unstable. Missing values should be removed before entry. Extreme outliers can dominate residual variance. Compare the result with visual diagnostics for a safer conclusion.
Export And Documentation
Use the CSV option for spreadsheets and audit records. Use the PDF option for quick reporting. The example table shows the expected input style. You can replace it with your own rows. Keep variable order consistent. Then run the calculation and review both the numeric results and the formula notes.
Use the output as an early warning tool, not a final verdict. The test is most useful beside coefficient review, residual plots, and domain reasoning. When sample size is small, results may shift. When predictors are many, degrees of freedom become limited. Clean structure improves trust in practice.
FAQs
What does this test check?
It checks whether regression residual variance changes with predictor values. Constant variance supports standard least squares inference. Changing variance suggests heteroscedasticity.
What data format should I use?
Use one row per observation. Put Y first. Put each predictor after Y. Separate values with commas, spaces, tabs, or semicolons.
What does a small p value mean?
A small p value suggests evidence against constant variance. It means residual spread may depend on one or more predictors.
What is the LM statistic?
The LM statistic equals sample size multiplied by the auxiliary regression R squared. It is compared with a chi square distribution.
Why is an auxiliary regression used?
The auxiliary regression explains squared residuals using the original predictors. Its R squared measures how much residual variance patterns are explained.
Can I use many predictors?
Yes, but you need enough rows. Too many predictors can reduce degrees of freedom and make the design matrix unstable.
What should I do after a significant result?
Review residual plots, check outliers, and consider robust standard errors, transformations, or weighted least squares. Use subject knowledge before changing the model.
Do downloads include the results?
Yes. The CSV includes metrics, coefficients, and row diagnostics. The PDF gives a concise report with main test results.