Tutorials › Exam SRM - Statistics for Risk Modeling › Residual Histograms and the Limits of Visual Normality Checks

Exam SRM · Regression Diagnostics · Tutorial 91 of 926

Residual Histograms and the Limits of Visual Normality Checks

Use residual histograms cautiously: assess their shape in context, recognize binning and sample-size effects, and avoid treating visual appearance as proof of normality.

Intermediate 11 min read

What You'll Learn

  • State the normal-error assumption that a residual histogram is intended to help assess
  • Distinguish the distribution of regression errors from the distribution of fitted-model residuals
  • Explain why small samples can look irregular even when a normal model is reasonable
  • Compare how bin width and bin placement can change a histogram's apparent shape
  • Recognize how an extreme residual can dominate a visual assessment
  • Use a histogram alongside, rather than instead of, other regression diagnostics

Why Look at a Residual Histogram?

A regression model can describe the mean response and still rely on assumptions about the errors when making inferences. In the usual linear model, the errors are assumed to be normally distributed conditional on the predictors. A residual histogram offers a quick visual check for conspicuous departures from a roughly symmetric, mound-shaped pattern. It is a supplementary diagnostic: the plot can raise a concern, but its appearance alone cannot establish that errors are normal or that the model is appropriate.

This distinction matters because a histogram displays fitted-model residuals, not the unobserved errors themselves. Residuals are calculated from the same observations used to estimate the regression coefficients. As a result, their values are constrained and need not behave like a collection of independent, identically distributed observations. A histogram is useful for seeing broad features of their distribution, but it should not be read as a direct picture of the errors without qualification.

Definition: In a linear regression model \(y=X\beta+\varepsilon\), the residual for observation \(i\) is \(e_i=y_i-\hat{y}_i\), where \(y_i\) is its observed response and \(\hat{y}_i\) is its fitted response. A residual histogram groups the \(e_i\)'s into intervals, called bins, and displays the count or proportion of residuals in each bin.

The Normal-Error Assumption and Residuals

For the standard normal-error model, assume the design matrix \(X\) is fixed and has full column rank, and that, conditional on \(X\), the errors are independent with mean zero and common variance \(\sigma^2\). The additional normality assumption is \(\varepsilon\mid X\sim N(0,\sigma^2I)\). In this model, the conditional response satisfies \(y\mid X\sim N(X\beta,\sigma^2I)\). Normality is relevant to the exact finite-sample distributions used for regression inference; it is not required merely to calculate an ordinary least squares fit.

Let \(H=X(X^\mathsf{T}X)^{-1}X^\mathsf{T}\) be the projection matrix for the fitted model. Since \(\hat{y}=Hy\), the residual vector is \(e=y-\hat{y}=(I-H)y\). The fitted mean \(X\beta\) lies in the column space of \(X\), so \((I-H)X\beta=0\). Therefore, \(e=(I-H)\varepsilon\). This gives a useful justification for caution: even when the errors satisfy the normal model, residuals are transformed errors, not the original errors.

$$ E(e\mid X)=0,\qquad \operatorname{Cov}(e\mid X)=\sigma^2(I-H) $$

The covariance result follows by applying the covariance rule for a linear transformation: if \(e=A\varepsilon\), then \(\operatorname{Cov}(e\mid X)=A\operatorname{Cov}(\varepsilon\mid X)A^\mathsf{T}\). Set \(A=I-H\), use \(\operatorname{Cov}(\varepsilon\mid X)=\sigma^2I\), and use the symmetry and idempotence of \(I-H\). Thus the residuals can be correlated, and their variances are generally not all equal: \(\operatorname{Var}(e_i\mid X)=\sigma^2(1-h_{ii})\). In a model with an intercept, their sum is zero. These facts do not make the histogram useless; they explain why it is a visual aid, not a literal sample of independent errors.

Under the stated normal-error model, the residual vector is a linear transformation of a multivariate normal vector and is therefore multivariate normal, although it has the covariance structure above. The histogram is most informative about broad distributional features, such as pronounced asymmetry or an isolated tail observation. It cannot reliably assess every feature of the error distribution, and a smooth-looking histogram does not prove that the model assumptions hold.

Reading the Shape Without Overclaiming

A roughly symmetric, single-peaked histogram centered near zero is broadly compatible with normal errors. By contrast, strong skewness, multiple separated groups, or a long tail may prompt further investigation. Those patterns are clues, not automatic diagnoses: binning can create or hide apparent features, and a small sample often looks jagged even when the underlying distribution is normal.

Histogram bars depend on choices made by the person plotting them. The bin width determines how many observations are grouped together, while the bin edges determine where those groups begin and end. Wider bins can conceal detail; narrow bins can create a jagged appearance. Shifting the edges can move observations between bars and change the apparent balance around zero. With unequal-width bins, bar heights should represent density (count divided by bin width), not raw counts, if the areas of bars are to correspond to frequencies.

Sample size changes what is reasonable to expect visually. A small set of residuals can have gaps, uneven bar heights, or a shape that looks lopsided just by chance. A larger sample tends to show more detail about the distribution, but it can also make small departures from a smooth shape visible. Neither a small sample's irregularity nor a large sample's visible imperfection is, by itself, a verdict on the normal-error assumption.

Worked Example: How Bin Placement Changes a Small Histogram

A hypothetical regression model has 12 residuals, in response units: \(-4,-3,-2,-1,-1,0,0,1,1,2,3,4\). Compare two reasonable equal-width binning choices. What can the resulting counts tell you?

Method. Count each residual once, using intervals that include their left endpoint and exclude their right endpoint; close the final interval at its right endpoint. First use the five bins \([-5,-3),[-3,-1),[-1,1),[1,3),[3,5]\).

The counts are \(1,2,4,3,2\), respectively: \([-5,-3)\) contains \(-4\); \([-3,-1)\) contains \(-3,-2\); \([-1,1)\) contains \(-1,-1,0,0\); \([1,3)\) contains \(1,1,2\); and \([3,5]\) contains \(3,4\). The total is \(1+2+4+3+2=12\).

Now use four equal-width bins \([-5,-2),[-2,1),[1,4),[4,7]\). The counts are \(2,5,4,1\): the bins contain \((-4,-3)\), \((-2,-1,-1,0,0)\), \((1,1,2,3)\), and \(4\). Their counts also total \(2+5+4+1=12\).

Interpretation. The residual values are balanced around zero, but the bar counts look different under the two choices. With only 12 observations, neither histogram should be expected to form a smooth bell. A conclusion that the data are strongly asymmetric based only on one set of bar heights would be too strong.

Common mistake avoided: Treating a histogram's bar pattern as a fixed property of the data. The data are fixed, but bin placement changes the displayed pattern.

Worked Example: Interpreting a Small and a Larger Sample

Two hypothetical residual histograms use five equal-width bins, ordered from the most negative to the most positive residuals. The first, from \(n=16\) observations, has counts \(1,3,7,4,1\). The second, from \(n=400\), has counts \(18,72,148,127,35\). Compare their broad appearances without treating either as a formal test.

Method. Check each total, then compare proportions rather than raw counts, since the sample sizes differ. For \(n=16\), the counts sum to \(1+3+7+4+1=16\). The proportions are \(1/16=0.0625\), \(3/16=0.1875\), \(7/16=0.4375\), \(4/16=0.2500\), and \(1/16=0.0625\).

For \(n=400\), the counts sum to \(18+72+148+127+35=400\). The proportions are \(18/400=0.0450\), \(72/400=0.1800\), \(148/400=0.3700\), \(127/400=0.3175\), and \(35/400=0.0875\). Each set of proportions sums to 1.

Interpretation. Both displays have their largest count in a central bin, with smaller counts farther from the center. The \(n=16\) display has a noticeably irregular sequence, but that jaggedness is unsurprising in a small sample. The larger display is more detailed and has a somewhat heavier count in its most positive bin than its most negative bin. That difference is worth noticing, not enough on its own to establish nonnormality. The values within bins, and other diagnostic information, are not shown.

Common mistake avoided: Comparing raw counts across sample sizes or demanding smooth bars from a small sample. Proportions make the scale comparable; neither proportions nor visual smoothness constitute a test.

Worked Example: An Extreme Residual and a Misleading Shape

Suppose a hypothetical intercept-model fit has 20 residuals: one residual of \(-8\), eight residuals of \(1\), and eleven residuals of \(0\), all in the same response units. Use the bins \([-10,-5),[-5,-1),[-1,1),[1,5),[5,10]\). What does the histogram show, and what should be checked?

Method. First verify the residual total: \(-8+8(1)+11(0)=0\), consistent with the zero-sum constraint for an intercept model. The bin counts are \(1,0,11,8,0\), totaling \(1+0+11+8+0=20\). The isolated \(-8\) creates a bar far from the main group, while all the other values lie at zero or one.

Interpretation. This histogram makes the extreme negative residual conspicuous, but the plot alone cannot explain why it occurred or establish that the errors are nonnormal. Check that observation's recorded response and predictors, then consider the histogram alongside the other relevant regression diagnostics. The specified bins also matter: the gap between \(-8\) and the central values is visually prominent, but a histogram does not show where observations lie within each bar.

Common mistake avoided: Deleting or dismissing an extreme residual merely to make a histogram look more symmetric. Investigate the observation and report what the diagnostic shows; do not silently alter the data.

A Practical Diagnostic Process

1
Confirm what is plotted.
Use residuals from the fitted regression model, and note whether the display uses counts, proportions, or density. Keep the response units and any residual scaling clear.
2
Look for broad features.
Assess whether the histogram is centered near zero and broadly symmetric and single-peaked, or whether it shows conspicuous skewness, multiple groups, or a long tail.
3
Question the visual impression.
Consider sample size, bin width, and bin edges. If the conclusion depends on one arbitrary binning choice, describe the appearance as uncertain rather than definitive.
4
Investigate unusual observations and use context.
Check extreme values against the data and consider the other regression diagnostics. A residual histogram addresses distributional shape; it does not establish linearity, constant variance, or independence.

What a Histogram Can and Cannot Establish

A residual histogram is most useful as an initial, visual screen for a pronounced departure from a roughly symmetric distribution. It can make a severe tail imbalance or a separated cluster easier to notice than a table of residuals would. Its interpretation is strongest when the sample is not too small and the broad conclusion persists under reasonable bin choices.

There are important limits. First, residuals are constrained by the fitted regression, so their distribution is not exactly the same as the errors' distribution. Second, binning discards information about the precise values within each interval. Third, small samples provide limited visual evidence, while large samples can reveal minor irregularities whose practical importance is not apparent from the histogram alone. Finally, even an attractive bell-shaped display does not confirm the other model assumptions.

What you seeReasonable interpretationOverclaim to avoid
Roughly symmetric, single-peaked shape near zeroNo conspicuous visual departure is apparent at this scale.“The errors are definitely normal.”
Jagged bars in a small sampleSampling variation and bin choices may account for irregularity.“The errors are nonnormal because the bars are not smooth.”
An isolated tail observationReview the observation and its context; consider other diagnostics.“The observation can be removed to improve the plot.”
A shape that changes substantially with bin edgesThe visual conclusion is sensitive to the display choice.“One particular histogram proves the conclusion.”

For regression inference, normality is an assumption about the conditional errors, not a visual property that must be perfectly reproduced by a finite set of residuals. The careful conclusion is therefore limited: state what the histogram suggests, note when its appearance is sensitive to sample size or binning, and avoid claiming that a visual check proves or disproves the assumption. This is aligned with the SOA Exam SRM (Statistics for Risk Modeling) syllabus.

Check Your Understanding

For each problem, give a cautious interpretation and show any requested arithmetic.

  1. A regression has 20 residuals in five equal-width bins with counts \(2,5,7,4,2\). Check the total, calculate the central-bin proportion, and state what the shape does and does not suggest. (Answer: The total is 20; the central-bin proportion is \(7/20=0.3500\); the histogram is broadly centered and mound-shaped, but does not prove normal errors.)
  2. A set of 10 residuals has a histogram with counts \(0,1,7,2,0\). The analyst says the distribution is definitely nonnormal because the bars are not symmetric. Give one reason that conclusion is too strong. (Answer: With only 10 residuals, bar counts can be irregular from sampling variation, and the appearance also depends on bin choices; the histogram alone cannot establish nonnormality.)
  3. For \(n=200\), two outer bins contain 12 and 28 residuals. Calculate their proportions and state the limited visual concern. (Answer: The proportions are \(12/200=0.0600\) and \(28/200=0.1400\); the unequal tail counts may suggest asymmetry worth investigating, but do not establish nonnormality.)
  4. A model includes an intercept. Its 15 residuals sum to \(3.6\). What should you check before interpreting the histogram? (Answer: Recheck the residual calculations, model fit, and whether the displayed values are the raw residuals from that intercept model; their raw sum should be zero, apart from negligible numerical rounding.)
  5. A histogram shows one isolated residual far from the rest. Give two appropriate next steps and one inappropriate response. (Answer: Check the observation's recorded data and consider other regression diagnostics; do not silently delete the observation just to make the histogram appear more symmetric.)
Clinical Biostats