Regression Assumptions Checker
Validate your model with mathematical rigor. Our diagnostic engine performs a comprehensive audit of all OLS assumptions, ensuring your insights are built on a solid statistical foundation.
Regression Assumptions Checker
Check all four linear regression assumptions for your data. Test for linearity, independence, homoscedasticity, and normality with detailed diagnostics.
Enter your data points
| # | X Values | Y Values |
|---|
Results
Summary
1. Linearity
2. Independence of Errors
3. Homoscedasticity
4. Normality of Residuals
Data Points (n)
R²
Equation
Step-by-Step Details
How to Use This Regression Assumptions Checker
Assumption Validation
Tests all four OLS assumptions: linearity, independence, homoscedasticity, normality.
Enter X & Y Data
Input paired data — the tool fits the regression and analyzes residuals automatically.
Formal Test Results
Get Durbin-Watson, Breusch-Pagan, RESET, and Jarque-Bera test statistics.
Best For
Validating regression models before interpreting coefficients or making predictions.
Always check assumptions before trusting regression results — violated assumptions can invalidate your conclusions.
Why Check Regression Assumptions?
📐 Linear regression makes four key assumptions about your data, collectively known as the Gauss-Markov conditions. When all four are satisfied, the ordinary least squares (OLS) estimator is the best linear unbiased estimator (BLUE) — meaning it has the smallest variance among all unbiased linear estimators. Violating any assumption compromises this guarantee, potentially producing biased coefficients, unreliable standard errors, invalid p-values, and inaccurate confidence intervals. The four OLS assumptions are: (1) Linearity — the relationship between the independent variable X and the dependent variable Y is truly linear. If the actual relationship is curved, the fitted line will systematically misrepresent the data, and both the slope and intercept estimates will be biased. You can check this visually with a scatterplot or a residual-versus-fitted plot, and formally with a RESET test.
📊 (2) Independence — the residuals (errors) are independent of each other. This is most often violated in time-series data, where consecutive observations tend to be correlated — a phenomenon called autocorrelation. Autocorrelation inflates apparent significance, making relationships appear stronger than they truly are. The Durbin-Watson test detects first-order autocorrelation.
📊 (3) Homoscedasticity — the variance of the residuals is constant across all levels of the predicted values. When variance changes (heteroscedasticity), standard errors become unreliable, which invalidates confidence intervals and hypothesis tests. A funnel shape in the residual plot is the classic visual indicator. The Breusch-Pagan test formally checks for this violation.
❌ (4) Normality — the residuals are approximately normally distributed. This assumption is critical for the validity of t-tests, F-tests, and confidence intervals in small samples. With large samples (n > 30), the central limit theorem provides some protection, but in small datasets non-normality can lead to dramatically wrong p-values. The Shapiro-Wilk test and Q-Q plots are the standard diagnostic tools. Checking assumptions before trusting your model is a critical step that many analysts skip — leading to flawed conclusions, failed replications, and poor decisions.
Regression Assumptions Tests Explained
🧮 Each of the four OLS assumptions is evaluated using a specific statistical test or diagnostic procedure. Understanding how these tests work helps you interpret the results correctly and take appropriate remedial action when violations are detected.
🔍 Residual vs. Fitted Plot (Linearity): The most intuitive check for linearity is a scatterplot of residuals on the vertical axis against fitted (predicted) values on the horizontal axis. If the true relationship is linear, the residuals should be randomly scattered around the horizontal zero line with no systematic pattern. A curved pattern — such as a U-shape, an inverted-U, or a sinusoidal wave — indicates that the linear model is misspecified and that a polynomial term or nonlinear transformation is needed. A more formal test is Ramsey's RESET test, which adds powers of the fitted values (ŷ², ŷ³) as auxiliary regressors and tests whether their coefficients are jointly zero using an F-test. If the F-statistic is significant, the linear specification is rejected in favor of a more flexible functional form.
📊 Durbin-Watson Test (Independence): The Durbin-Watson (DW) statistic tests for first-order autocorrelation in the residuals — that is, whether each residual is correlated with the immediately preceding one. The statistic is defined as DW = Σ(eᵢ − eᵢ₋₁)² / Σeᵢ², and it ranges from 0 to 4. A value near 2 indicates no autocorrelation. Values substantially below 2 suggest positive autocorrelation (consecutive residuals tend to have the same sign), while values substantially above 2 suggest negative autocorrelation (consecutive residuals tend to alternate signs). Exact critical values depend on the sample size and number of predictors, but as a rough guide, DW < 1.5 or DW > 2.5 warrants investigation. Autocorrelation is most common in time-series data — for example, monthly sales figures where high sales in one month tend to be followed by high sales in the next.
📊 Breusch-Pagan Test (Homoscedasticity): The Breusch-Pagan test checks whether the variance of the residuals depends on the fitted values or the independent variables. It works by regressing the squared residuals on the original predictors and testing whether the regression coefficients are jointly zero. The test statistic LM = n × R² (where R² is from the auxiliary regression of eᵢ² on the predictors) follows a chi-squared distribution with degrees of freedom equal to the number of predictors. A significant LM statistic indicates heteroscedasticity — the residual variance is not constant, and OLS standard errors are unreliable. Common causes include data spanning several orders of magnitude (e.g., income vs. expenditure), proportional measurement error, or omitted variables that influence variability. Remedies include using robust (Huber-White) standard errors, transforming the dependent variable, or switching to weighted least squares.
📊 Shapiro-Wilk Test and Q-Q Plot (Normality): The Shapiro-Wilk test is the most powerful formal test for normality for small to moderate sample sizes. It computes a test statistic W that measures how closely the ordered residuals match the expected order statistics of a normal distribution. W ranges from 0 to 1, with values close to 1 indicating normality. A p-value below the chosen significance level rejects the null hypothesis of normality. A Q-Q (quantile-quantile) plot provides a visual complement: it plots the quantiles of the residuals against the theoretical quantiles of a standard normal distribution. If the residuals are normally distributed, the points will fall approximately along a straight diagonal line. Systematic departures — such as an S-shaped curve, heavy tails, or skewness — indicate non-normality. For large samples (n > 30), moderate non-normality is often tolerable because the central limit theorem ensures approximate normality of the coefficient estimators, but severe departures still warrant attention and possible transformation of the dependent variable or use of bootstrap methods.
| Assumption | Test | What to Check |
|---|---|---|
| Linearity | Residual vs Fitted plot | No systematic pattern in residuals |
| Independence | Durbin-Watson test | DW statistic near 2 |
| Homoscedasticity | Breusch-Pagan test | Constant variance across fitted values |
| Normality | Shapiro-Wilk and Q-Q plot | Residuals approximately normally distributed |
The Four Assumptions & How We Test Them
What to Do When Assumptions Fail
📊
When an assumption violation is detected, you have several remedial options depending on which assumption failed and how severely. Non-linearity is the most straightforward to fix: add polynomial terms such as x² or x³ to capture curvature, apply a transformation to the dependent variable (log, square root, or reciprocal), or switch to a genuinely nonlinear model such as exponential or logistic regression. The choice depends on the shape of the relationship — a U-shape suggests a quadratic term, while accelerating growth suggests a logarithmic transformation of Y. Autocorrelation is most common in time-series data. Remedies include adding lagged values of the dependent variable or the residuals as additional predictors, using the Cochrane-Orcutt or Prais-Winsten procedure to transform the data, or switching to ARIMA models that explicitly model the correlation structure. Ignoring autocorrelation leads to underestimated standard errors, making results appear more significant than they truly are. Heteroscedasticity can be addressed in three ways: (1) transform the dependent variable — a log transformation is often effective when variance increases with the level of Y;
📊 (2) use robust (Huber-White) standard errors that are consistent even under heteroscedasticity; or
📐 (3) switch to weighted least squares, which gives less weight to observations with higher variance. Non-normality of residuals can sometimes be resolved by transforming Y or removing influential outliers that create skewness. For large samples (n > 30), moderate non-normality is tolerable because the central limit theorem ensures approximate normality of the coefficient estimators. For small samples with severe non-normality, bootstrap methods provide reliable confidence intervals without relying on the normality assumption. Always re-check assumptions after applying any fix to confirm that the violation has been resolved and no new violations have been introduced.
Non-linearity: Add polynomial terms (x²), apply transformations (log, sqrt), or use non-linear models
Autocorrelation: Add lag terms for time-series, use ARIMA or mixed-effects models
Heteroscedasticity: Transform y (log, sqrt), use weighted least squares, or robust standard errors
Non-normality: Transform y, remove outliers, or rely on CLT for large samples (n > 30)
When to Check Assumptions
📊 You should check regression assumptions every time you fit a new model or apply an existing model to new data. Assumption checking is not optional — it is a fundamental part of responsible statistical practice that protects you from drawing incorrect conclusions. Specifically, check assumptions before using a least squares regression line for prediction or inference, before interpreting coefficients or p-values from a multiple regression model, when residual plots show suspicious patterns such as curves or funnels, after collecting new data for an existing model, and when publishing research that relies on regression analysis. Reviewers and peers expect evidence that assumptions were verified. Skipping this step can undermine the credibility of your entire analysis.
Before relying on regression results for decision-making
When your residual plots show suspicious patterns
After collecting new data for an existing model
When publishing research that uses regression analysis
Frequently Asked Questions
What are the OLS assumptions for linear regression?
📊 The four OLS (Ordinary Least Squares) assumptions, also called the Gauss-Markov conditions, are: (1) Linearity — the relationship between X and Y is linear; (2) Independence — residuals are uncorrelated with each other; (3) Homoscedasticity — residual variance is constant across all fitted values; (4) Normality — residuals follow a normal distribution. When all four are satisfied, the OLS estimator is the best linear unbiased estimator (BLUE), meaning it has the smallest variance among all unbiased linear estimators.
What happens if I ignore assumption violations?
📊 Ignoring assumption violations can lead to seriously misleading results. Non-linearity produces biased coefficients that systematically misrepresent the relationship. Autocorrelation inflates t-statistics and R², making the model appear more significant than it truly is.
⚠️ Heteroscedasticity makes standard errors unreliable, producing confidence intervals that are too narrow or too wide. Non-normality invalidates p-values and confidence intervals in small samples. In each case, you risk drawing incorrect conclusions — accepting effects that do not exist, missing effects that do, or making predictions with far less accuracy than the model suggests.
How do I test for linearity in regression?
🔍 Test for linearity using both visual and formal methods. Visually, create a scatterplot of Y vs. X and a residual-vs-fitted plot — look for curved patterns that deviate from a random scatter.
📊 Formally, use Ramsey's RESET test, which adds squared and cubed fitted values as auxiliary regressors and tests whether their coefficients are jointly zero using an F-test. A significant F-statistic indicates that the linear specification is inadequate. If linearity is violated, add polynomial terms (x², x³) or apply a transformation such as log(Y) or √Y.
How do I test for autocorrelation?
📊 The primary test for first-order autocorrelation is the Durbin-Watson (DW) test. The DW statistic ranges from 0 to 4, with d ≈ 2 indicating no autocorrelation.
📊 Values below 1.5 suggest positive autocorrelation (consecutive residuals tend to have the same sign), while values above 2.5 suggest negative autocorrelation (consecutive residuals alternate signs). For higher-order autocorrelation, use the Breusch-Godfrey LM test, which can test for autocorrelation at multiple lags simultaneously. Autocorrelation is most common in time-series data, such as monthly sales, daily stock returns, or annual economic indicators.
How do I test for heteroscedasticity?
📊 The Breusch-Pagan test is the standard formal test for heteroscedasticity. It regresses the squared residuals on the original predictors and tests whether the regression coefficients are jointly zero. The test statistic LM = n × R² follows a chi-squared distribution.
📊 A significant result means the residual variance depends on the predictors — violating homoscedasticity. Visually, plot residuals against fitted values: a funnel shape (spread increasing or decreasing) indicates heteroscedasticity. Remedies include using robust standard errors, transforming Y (often log transformation), or switching to weighted least squares.
How do I test for normality of residuals?
📊 Use both visual and formal methods. Visually, create a histogram of residuals (should look bell-shaped) and a Q-Q plot (points should fall along the diagonal).
📊 Formally, the Shapiro-Wilk test is the most powerful test for normality in small to moderate samples — it computes a statistic W near 1 for normal data, with a significant p-value rejecting normality. The Jarque-Bera test is an alternative based on skewness and kurtosis that works well for larger samples. For large datasets (n > 30), moderate non-normality is often tolerable due to the central limit theorem, but severe departures still warrant attention.
What is robust regression?
📊 Robust regression refers to estimation methods that are less sensitive to outliers and assumption violations than ordinary least squares. Common approaches include M-estimation (which downweights large residuals using a function that grows less quickly than squaring), S-estimation (which minimizes a robust measure of scale), MM-estimation (combining high breakdown point with high efficiency), and Theil-Sen estimation (based on pairwise slopes).
⚠️ Robust methods produce coefficient estimates that are not unduly influenced by a few extreme observations, making them valuable when outliers are present and cannot be removed. However, they do not eliminate the need to check assumptions — they simply make the results more resistant to certain types of violations.
Can I use regression if assumptions are violated?
📊 It depends on the type and severity of the violation. Mild violations often have limited practical impact, especially with large samples. The central limit theorem protects against moderate non-normality when n > 30, and robust standard errors can compensate for heteroscedasticity.
✅ However, severe violations — especially non-linearity and severe autocorrelation — fundamentally undermine the validity of the model and must be addressed before trusting any results. The safest approach is to diagnose violations, apply appropriate remedies, re-check assumptions, and only then interpret the regression output. If violations cannot be adequately fixed, consider alternative modeling approaches such as generalized linear models, quantile regression, or nonparametric methods.
How many data points do I need to check assumptions?
📊 The mathematical minimum for computing a simple linear regression is n = 2, but assumption tests require far more data to be meaningful. The Durbin-Watson test needs at least n ≥ 6 for useful critical values.
❌ The Breusch-Pagan and Shapiro-Wilk tests have very low statistical power below n = 20 — violations may exist but go undetected. For reliable assumption checking across all four tests, aim for at least n = 30. With small samples, the tests may fail to detect genuine violations (Type II error), so visual diagnostics and domain knowledge become even more important.
What is the Durbin-Watson statistic and how do I interpret it?
📊 The Durbin-Watson (DW) statistic tests for first-order autocorrelation in regression residuals. It is computed as DW = Σ(eᵢ − eᵢ₋₁)² / Σeᵢ² and ranges from 0 to 4. DW ≈ 2 indicates no autocorrelation.
📊 DW < 2 suggests positive autocorrelation (consecutive residuals are similar), with values below 1.5 being strong evidence. DW > 2 suggests negative autocorrelation (consecutive residuals alternate), with values above 2.5 being concerning. Exact critical values depend on n and the number of predictors, but the rough thresholds of 1.5 and 2.5 are widely used as practical guidelines.
What is the Breusch-Pagan test and how do I interpret it?
📊 The Breusch-Pagan test detects heteroscedasticity by testing whether the variance of residuals depends on the predictor variables. It works by regressing squared residuals on the predictors and computing LM = n × R² from this auxiliary regression.
📊 Under the null hypothesis of homoscedasticity, LM follows a chi-squared distribution with degrees of freedom equal to the number of predictors. A p-value below α (typically 0.05) rejects homoscedasticity, indicating that residual variance is not constant and that OLS standard errors are unreliable. The remedy is to use robust standard errors, transform Y, or apply weighted least squares.
What is the Shapiro-Wilk test and how do I interpret it?
📊 The Shapiro-Wilk test assesses whether a sample comes from a normally distributed population. It computes a statistic W that measures the correlation between the ordered sample values and the expected order statistics from a normal distribution. W ranges from 0 to 1, with values close to 1 indicating normality.
📊 A p-value below α (typically 0.05) rejects the null hypothesis of normality, meaning the residuals deviate significantly from a normal distribution. The Shapiro-Wilk test is the most powerful normality test for small to moderate samples (n < 50). For larger samples, even tiny deviations from normality can produce significant p-values, so visual inspection of Q-Q plots should always accompany the formal test.
What is the difference between homoscedasticity and heteroscedasticity?
📊 Homoscedasticity means the variance of the residuals is constant across all levels of the fitted values — the spread of residuals is roughly the same whether you are predicting small or large values of Y.
📐 Heteroscedasticity means the variance changes — typically, the spread of residuals increases with the magnitude of the fitted values, producing a funnel shape in the residual plot. Heteroscedasticity is common when the dependent variable spans several orders of magnitude (e.g., income, population sizes) or when measurement precision varies across the range. It does not bias the coefficient estimates, but it makes their standard errors incorrect, which invalidates t-tests, F-tests, and confidence intervals.
Do I need to check assumptions for multiple regression too?
📊 Yes — multiple regression has the same four core assumptions as simple linear regression (linearity, independence, homoscedasticity, normality) plus a fifth assumption: no multicollinearity (predictors should not be too highly correlated with each other). Multicollinearity inflates standard errors and makes individual coefficients unstable.
📊 Detect it using variance inflation factors (VIF > 5 indicates a problem). All five assumptions should be checked before interpreting a multiple regression model. Our assumptions checker tests the first four; you should additionally calculate VIF for each predictor when using multiple regression.
Can I use this checker for polynomial or exponential regression?
📊 This checker is designed for simple linear regression with one predictor variable. For polynomial regression, the linearity assumption is automatically satisfied by including polynomial terms (the model is linear in the coefficients even though the relationship is nonlinear in X).
📊 You can still check independence, homoscedasticity, and normality of the residuals from a polynomial model. For exponential regression, the assumptions apply to the linearized model (after log transformation), not the original data. If you need to check assumptions for these more complex models, fit the model first using the appropriate calculator, then examine the residuals manually or with our tool.
Related Regression Calculators
Discover more specialized regression modeling tools.
Least Squares Regression Line Calculator
Compute the OLS best-fit line y = mx + b with full statistical output
Exponential Regression Calculator
Model growth and decay patterns with y = a·e^(bx)
Quadratic Regression Calculator
Model parabolic relationships with y = ax² + bx + c
Multiple Regression Calculator
Use two or more predictors with y = b₀ + b₁x₁ + b₂x₂
Pearson Correlation Calculator
Measure the strength and direction of the linear relationship between two variables
Grubbs' Test Calculator
Detect a single outlier in normally distributed data using Grubbs' test
Assumptions verified? Head back to our Free regression equation calculator to finalize your predictive model.