Normality in linear regression refers to the assumption that the residuals (the differences between observed and predicted values) are normally distributed, not that the raw dependent variable itself must be normal. This assumption matters primarily for producing valid confidence intervals and p-values in small samples, while the coefficient estimates themselves remain unbiased even when residuals are non-normal.
Formula
The standard error of a regression coefficient for a single predictor is:
SE = s / √n
where s is the residual standard deviation (the typical distance of points from the regression line, in the same units as the outcome), and n is the sample size. The margin of error for a confidence interval around the coefficient is:
Margin = SE × zα/2
where zα/2 = 1.96 for a 95% confidence interval. The critical t-value shown is the same 1.96 for large samples; for small samples you would use the t-distribution with n − k − 1 degrees of freedom.
Worked Example
Using the defaults from the calculator: n = 30, k = 3 predictors, s = 5, α = 0.05.
Step 1: Compute the standard error:
SE = 5 / √30 = 5 / 5.4772 = 0.9129
Step 2: Compute the margin of error for a 95% CI:
Margin = 0.9129 × 1.96 = 1.7893
So a coefficient estimate of, say, 2.0 would have a 95% confidence interval from 2.0 − 1.79 = 0.21 to 2.0 + 1.79 = 3.79. The calculator rounds the SE to 0.9129 and the margin to 1.789, matching these values.
Assumptions
- The model is correctly specified (linear relationship, no missing important predictors).
- Residuals have constant variance (homoscedasticity).
- Residuals are independent of each other.
- For the t-values and p-values to be exact, residuals should be normally distributed, especially in small samples.
- The formula above assumes one predictor; with multiple predictors, the SE formula involves the variance inflation factor (VIF), but the principle of normality of residuals remains the same.
What Normality Actually Means in Regression
The normality assumption in linear regression is about the error term, not the outcome variable. The model is written as:
Y = β0 + β1X1 + … + βkXk + ε
where ε is the error term. The assumption is that ε follows a normal distribution with mean 0 and constant variance σ². In practice, we check the residuals (the observed errors) after fitting the model. A common misconception is that the dependent variable Y must be normally distributed — this is only true if there are no predictors, i.e., when you are just estimating a mean. With predictors, Y can be highly skewed or bimodal while the residuals are perfectly normal, because the predictors explain the systematic variation.
Why Normality Matters (and When It Doesn’t)
Normality of residuals affects three things:
- P-values and confidence intervals: The t-tests for coefficients assume the sampling distribution of the coefficient estimates is normal. By the Central Limit Theorem, this holds approximately for large samples regardless of the residual distribution.
- Prediction intervals: A 95% prediction interval for a new observation assumes the new residual is normally distributed. If residuals are heavy-tailed, the actual coverage may be less than 95%.
- Maximum likelihood estimation: Ordinary least squares (OLS) is equivalent to maximum likelihood when residuals are normal. With non-normal residuals, OLS is still consistent but not efficient.
For large samples (n > 30 or so per predictor), the normality assumption is often described as “not critical” because the Central Limit Theorem ensures the coefficient estimates are approximately normal even if residuals are not. However, for small samples, non-normality can inflate the Type I error rate — you may declare a predictor significant when it is not.
How to Check Normality of Residuals
You should always check residuals after fitting the model, not the raw outcome. Common methods:
- Histogram of residuals: Look for a bell-shaped curve, but histograms can be misleading with small samples.
- Q-Q plot (quantile-quantile plot): Plot the sorted residuals against the quantiles of a normal distribution. Points falling roughly along the 45-degree line suggest normality. S-curves indicate skewness; U-shapes indicate heavy or light tails.
- Shapiro-Wilk test: A formal hypothesis test. If p > 0.05, you fail to reject normality. However, with large samples this test can flag trivial deviations that don’t matter.
- Kolmogorov-Smirnov test: Less powerful than Shapiro-Wilk for small samples but commonly used.
Visual inspection (Q-Q plot) is generally recommended over formal tests because formal tests answer a question you rarely care about — whether the residuals are exactly normal — rather than whether the deviation is large enough to matter.
What to Do If Residuals Are Not Normal
If your residuals are clearly non-normal, you have several options, in order of preference:
- Transform the outcome variable: A log, square root, or Box-Cox transformation often makes residuals more normal and stabilizes variance. For example, if Y is a count or a positive skewed variable, log(Y) often works well.
- Use robust standard errors: These adjust the standard errors to be valid even with non-normal residuals and heteroscedasticity. The coefficient estimates remain the same, but the p-values and confidence intervals become trustworthy.
- Use a generalized linear model (GLM): If the outcome is binary, a count, or a proportion, a logistic, Poisson, or binomial GLM is more appropriate than transforming and fitting OLS.
- Use bootstrapping: Resample the data many times and compute the coefficient distribution empirically, without assuming normality.
- Use a nonparametric or rank-based method: These make fewer assumptions but are less powerful and harder to interpret.
A common mistake is to transform the predictor X instead of the outcome Y. Transforming predictors changes the interpretation of the coefficient but does not fix non-normal residuals — the residuals are about the error, not the predictors.
Common Misconceptions
“My dependent variable is skewed, so I can’t use linear regression.” This is false if the skewness is explained by the predictors. For example, predicting income from education level: income is right-skewed, but if education explains much of the variation, the residuals may be roughly normal. Check residuals, not Y.
“I need at least 30 observations for normality.” The number 30 is a rough guideline for the Central Limit Theorem applying to the mean, not a magic threshold for regression. With 3 predictors, you might need 30–50 observations for the coefficient distributions to be approximately normal. With 10 predictors, you need more.
“Normality of residuals means the data must be normal.” No — the residuals are what matter. The predictors can have any distribution whatsoever (binary, skewed, uniform) without violating any assumption.
“If my residuals fail a normality test, my model is invalid.” Not necessarily. In large samples, the test may detect a deviation that has negligible effect on your conclusions. Look at the Q-Q plot and consider the sample size before discarding the model.
Frequently Asked Questions
Do I need to check normality of the dependent variable or the residuals?
Always check the residuals, never the raw dependent variable. The model assumes the errors are normal, not the outcome. A skewed outcome can yield normal residuals if the predictors explain the skewness. Plot the residuals from your fitted model, not a histogram of Y.
What sample size makes normality unnecessary?
There is no hard cutoff, but the Central Limit Theorem makes the sampling distribution of coefficients approximately normal for large samples. A common rule of thumb is n > 30 per predictor, but this is rough. With n = 100 and 2 predictors, even clearly non-normal residuals usually produce valid p-values. With n = 20, normality matters a lot more.
Should I transform my data if residuals are not normal?
Only if the deviation is severe and the sample is small. Try a log or square-root transformation on the outcome first. If the residuals become approximately normal and the Q-Q plot looks better, the transformation is worthwhile. If the sample is large, consider robust standard errors instead, which avoid changing the interpretation of coefficients.
What is the difference between normality and homoscedasticity?
Normality refers to the shape of the residual distribution (bell-shaped). Homoscedasticity refers to the variance of residuals being constant across all fitted values. You can have normal residuals with non-constant variance (a funnel shape in the residual plot), or constant variance with non-normal residuals. Both assumptions are checked separately, and both affect standard errors.
Can I use linear regression if my outcome is a count?
Technically yes, but counts are often non-normal and have variance that increases with the mean. A Poisson or negative binomial regression is usually better. If the counts are large (e.g., > 30) and the range is wide, linear regression on the raw count may be acceptable, but a log link GLM is safer. If you stick with linear regression, use robust standard errors.
Does normality affect the R-squared value?
No. R-squared measures how much variance in Y is explained by the predictors, and it is computed from sums of squares, not from normality. R-squared is the same whether residuals are normal or not. Normality only affects the validity of p-values and confidence intervals, not the fit measure itself.
Related
Formula used
in n | Sample size | - | 30 | 3 in k | Number of predictors | - | 3 | 1 in s | Residual standard deviation (SD) | - | 5 | 0.001 in a | Significance level (alpha) | - | 0.05 | 0.001 out se | Standard error of a coefficient | - | s / sqrt(n) | 4 out ci | Margin of error (95% CI half-width) | - | se * 1.96 | 3 out tcrit | Critical t-value (two-tailed) | - | 1.96 | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Normality to g/L Converter & Formula29.220 g/L
- Normality to meq/mL Conversion Calculator1.0000 meq/mL
- Normality Test Q-Q Plot: How to Read It
- Normality Test Results: How to Analyze Them
- Normality Slay the Spire?
- Normality Test for Paired t Test: How to Check