Tutorials › Population Pharmacokinetics › Reading Residual Histograms And Summary Statistics

Diagnostics: Goodness of Fit and Shrinkage · Tutorial 334 of 599

Reading Residual Histograms And Summary Statistics

Use residual summary statistics and histograms together to assess centering and spread, while recognizing when an extreme observation can distort the picture.

Intermediate 10 min read

What You'll Learn

  • Define residual mean, sample standard deviation, and moment skewness for a set of residuals.
  • Interpret centering and spread when conditional weighted residuals are expected to be approximately standard normal.
  • Use histogram shape alongside numerical summaries rather than treating either as conclusive by itself.
  • Distinguish a broadly shifted residual distribution from a centered bulk with an extreme observation.
  • Explain how one extreme value can affect the mean, spread, and skewness.
  • Identify limitations caused by small samples, bin choices, and pooling.

Why Read Residuals as a Distribution?

A residual summary reduces many observations to a few numbers. That is useful, but it can conceal important differences: a set of residuals may be shifted in one direction, unusually dispersed, asymmetric, or mostly unremarkable except for one extreme value. Reading a histogram together with summary statistics helps distinguish these patterns during population pharmacokinetic model evaluation.

This tutorial focuses on the distribution of a selected set of residuals, not on how residuals vary with time, predictions, or covariates. The choice of residual matters. For example, conditional weighted residuals (CWRES) are commonly assessed against an approximately standard normal reference when the conditions discussed in the earlier material on when CWRES are approximately standard normal are reasonable. That reference is a diagnostic target, not a guarantee that a finite set of fitted residuals will look exactly normal.

Definition: For \(n\) residuals \(r_1,\ldots,r_n\), the residual mean is \(\bar{r}=\frac{1}{n}\sum_{i=1}^n r_i\), and the sample standard deviation is \(s_r=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(r_i-\bar{r})^2}\). The moment skewness is \(g_1=\frac{m_3}{m_2^{3/2}}\), where \(m_k=\frac{1}{n}\sum_{i=1}^n(r_i-\bar{r})^k\). These are descriptive summaries of the selected residuals.

Residuals such as CWRES are standardized and therefore dimensionless. Under the relevant model and approximation conditions, their distribution is expected to be centered near zero with spread near one. A positive residual, under the usual observed-minus-predicted convention, indicates an observation above its prediction; a negative residual indicates one below. A positive residual mean can therefore suggest overall underprediction, while a negative mean can suggest overall overprediction. Neither pattern alone establishes its cause.

The sample standard deviation \(s_r\) describes spread around the sample mean. It is not the same as the root mean square residual around zero: the latter also reflects any shift in the mean. Skewness describes asymmetry. Positive skewness indicates a longer or more influential upper tail relative to the lower tail; negative skewness indicates the corresponding lower-tail pattern. Skewness does not by itself identify which observations produced the asymmetry.

Assumptions and a Practical Reading Sequence

First decide which residuals are being summarized and whether they are suitable for comparison with the intended reference. Interpret a near-zero mean and a standard deviation near one as targets only when the selected residual type is expected to have those properties. The approximate standard-normal target for CWRES relies on the model and residual-calculation conditions described in the earlier material. If those conditions are doubtful, deviation from that target is not a simple pass-or-fail verdict.

The formulas above require only a finite set of numerical residuals; they do not require the residuals to be independent or normally distributed to describe that set. However, a histogram and its summaries do not automatically provide valid inferential tests. Residuals from a fitted model can be related through shared parameter estimation, and observations may also be clustered within individuals. Treating every residual as an independent draw can overstate how much information the sample contains.

1
Check the target.
Confirm the residual definition and whether a zero-centered, unit-spread reference is appropriate for this diagnostic.
2
Read the center and spread.
Use \(\bar{r}\) to summarize location and \(s_r\) to summarize dispersion around that location; compare each with the justified target.
3
Inspect the shape.
Use the histogram and skewness to look for asymmetry, a broad shift, or a small number of values that dominate the tail.
4
Investigate before concluding.
Check the underlying observations, records, and model context. Do not delete an extreme residual merely because it is inconvenient.

Worked Examples

Worked Example: A Small Set Centered Near Zero

Suppose a hypothetical model evaluation gives five CWRES values: \(-1.2,-0.6,0,0.6,1.2\). Assume the CWRES calculation and model conditions make a zero-centered, approximately unit-spread reference relevant. Calculate the mean and sample standard deviation, and describe what the histogram adds.

Mean. The residuals sum to zero, so

$$ \bar{r}=\frac{-1.2-0.6+0+0.6+1.2}{5}=0. $$

Sample standard deviation. The sum of squared deviations from the mean is

$$ (-1.2)^2+(-0.6)^2+0^2+0.6^2+1.2^2 =1.44+0.36+0+0.36+1.44=3.60. $$

Thus \(s_r=\sqrt{3.60/(5-1)}=\sqrt{0.900}=0.949\). The values are centered exactly at zero in this small set, and their sample spread is close to one. They are also symmetric about zero, so the moment skewness is zero. A histogram would show a roughly balanced set of values, but with only five observations it cannot establish that the underlying residual distribution is normal. The summary is consistent with the target, not proof of model adequacy.

Worked Example: A Broad Shift Rather Than One Extreme Value

In a hypothetical evaluation, five residuals are \(0.6,0.7,0.8,0.8,0.9\). Assume positive residuals mean observed concentrations exceed predictions, and that the residual definition supports comparison with a zero-centered target. Calculate the center and spread, then interpret the pattern.

The mean is

$$ \bar{r}=\frac{0.6+0.7+0.8+0.8+0.9}{5} =\frac{3.8}{5}=0.760. $$

The deviations from the mean are \(-0.16,-0.06,0.04,0.04,0.14\). Their squared values sum to

$$ 0.0256+0.0036+0.0016+0.0016+0.0196=0.0520, \qquad s_r=\sqrt{\frac{0.0520}{4}}=0.114. $$

All five residuals are positive and lie in a relatively narrow range. The histogram would therefore be concentrated to the positive side, rather than centered near zero with just one isolated tail value. This pattern is consistent with a broad positive shift and may indicate underprediction in the evaluated set. The very small spread describes how tightly these five values cluster around their positive mean; it does not make their location acceptable. With only five observations, however, this example is descriptive and does not quantify the strength of evidence about the model or its cause.

Worked Example: A Centered Bulk With One Extreme Residual

A hypothetical set of six residuals is \(-0.5,-0.3,-0.1,0.1,0.3,3.5\). Calculate its mean, sample standard deviation, and moment skewness. Then compare the numerical summaries with the histogram’s likely appearance.

The sum is \(3.0\), so \(\bar{r}=3.0/6=0.500\). The deviations from the mean are \(-1.0,-0.8,-0.6,-0.4,-0.2,3.0\). The sum of their squares is \(11.2\), giving

$$ s_r=\sqrt{\frac{11.2}{6-1}}=\sqrt{2.24}=1.497. $$

For moment skewness, the sum of cubed deviations is

$$ -1.000-0.512-0.216-0.064-0.008+27.000=25.200. $$

Therefore \(m_3=25.2/6=4.200\), \(m_2=11.2/6=1.867\), and

$$ g_1=\frac{4.200}{(1.867)^{3/2}}\approx 1.65. $$

The positive mean and large spread might initially suggest a general shift and dispersion problem. The histogram gives a more specific view: five values lie between \(-0.5\) and \(0.3\), while one value at \(3.5\) lies far to the right. The extreme value pulls the mean upward, increases the sample standard deviation, and produces positive skewness. The bulk is near zero, but one value is enough to make the overall summaries look less reassuring. Check the observation and its data, dosing, and model context; do not discard it without a defensible reason.

Why One Extreme Value Can Matter So Much

The effect of a single extreme value can be justified directly. Suppose \(n-1\) residuals \(a_1,\ldots,a_{n-1}\) are fixed and the last residual is \(c\). Write \(S=\sum_{j=1}^{n-1}a_j\). As \(c\) becomes large, the sample mean is \((S+c)/n\). The extreme residual’s deviation from that mean has leading term \((n-1)c/n\), while each fixed residual’s deviation has leading term \(-c/n\).

Consequently, the leading term in the sum of cubed deviations is

$$ \left(\frac{n-1}{n}\right)^3c^3 +(n-1)\left(-\frac{1}{n}\right)^3c^3 =\frac{(n-1)(n-2)}{n^2}c^3. $$

For \(n\geq 3\), this coefficient is nonzero, so the third central moment has a leading term proportional to \(c^3\). For \(n=2\), the coefficient is zero: the two deviations from their mean are opposites, and their cubes sum to zero. This distinction matters when reasoning about skewness in very small samples. More generally, an extreme point can have a large effect on the mean and spread, and can strongly affect the shape summary; it should prompt investigation rather than automatic deletion.

Histograms, Summaries, and Diagnostic Limits

A histogram and numerical summaries answer related but different questions. The mean and standard deviation are compact and easy to compare with a target, but they can hide whether a large spread comes from many moderately dispersed residuals or one extreme value. A histogram reveals that distinction, though its appearance depends on bin width and bin boundaries. With few observations, changing the bins can make a distribution appear more or less lumpy; a smooth-looking histogram is not evidence of normality by itself.

Skewness adds a numerical description of asymmetry but is also sensitive to extreme observations. It is not a replacement for checking the histogram or the records behind the most unusual values. Conversely, a histogram is not a substitute for reporting center and spread: a visibly asymmetric plot may still have a mean close to zero, and the plot alone does not provide a precise summary.

The main alternative is not a competing single statistic but a different diagnostic view: inspect residuals in relation to the data or model features relevant to the question. A pooled histogram can hide different patterns in distinct subsets, and a good-looking overall distribution cannot rule out systematic structure elsewhere. Distributional summaries should therefore complement, not replace, other goodness-of-fit diagnostics. They do not identify a mechanism, establish causation, or prove that the model is adequate.

Common Mistakes

  • Calling a mean near zero sufficient. A set can have a mean near zero while having excessive spread, asymmetry, or distinct positive and negative patterns. Check spread and shape as well.
  • Calling a large standard deviation proof of broad model failure. One extreme residual can inflate it substantially. Compare the histogram with the numerical summaries and investigate the tail.
  • Assuming skewness grows like the cube of an extreme value in every sample size. For two values the deviations are opposites and the sum of their cubes is zero. The nonzero leading cubic term above applies for \(n\geq 3\).
  • Treating the histogram as a formal test. Bin choices and sample size affect its appearance. A histogram is a descriptive diagnostic, not a decision rule on its own.
  • Deleting an unusual residual automatically. An extreme value may reflect a recording or dosing issue, but it may also be valid evidence about model performance. Establish the reason before changing the data or analysis.
Key takeaway: Read residual mean, sample standard deviation, skewness, and histogram together. A broad shift, general dispersion, and a centered bulk with one extreme value are different patterns, even when one summary statistic looks similar.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For residuals \(-1,0,1\), calculate the mean and sample standard deviation. What can these summaries establish, and what can they not establish?
  2. A residual set has a mean of \(0.4\), a standard deviation of \(0.5\), and a histogram with most values between \(0.3\) and \(0.6\). Is this more consistent with a broad shift or with one isolated extreme value? Explain.
  3. Why can a histogram that looks roughly symmetric still fail to demonstrate that residuals follow a normal distribution?
  4. With one extreme value and \(n=2\), what happens to the sum of cubed deviations from the mean? Why does the cubic leading-term argument differ for \(n\geq3\)?

Solutions. (1) The mean is \((-1+0+1)/3=0\). The squared deviations sum to \(2\), so \(s_r=\sqrt{2/(3-1)}=1\). These summaries describe the three values and are consistent with zero centering and unit spread; three observations cannot establish a normal underlying distribution or model adequacy. (2) The concentration of most values in a positive range is more consistent with a broad positive shift than with one isolated extreme value. The histogram and summaries are descriptive, so the residual definition and model context still matter. (3) A finite sample can look symmetric by chance, and histogram shape depends on binning; symmetry alone neither establishes normality nor checks other model diagnostics. (4) With two residuals, deviations from their mean are \(d\) and \(-d\), so their cubes sum to \(d^3+(-d)^3=0\). For \(n\geq3\), the leading coefficient \((n-1)(n-2)/n^2\) is nonzero, so the third central moment has a cubic leading term as the extreme value grows.

Clinical Biostats