Tutorials › Generalized Linear Models › Interpreting Pearson Residual Patterns and Scale

Residuals and Deviance · Tutorial 741 of 981

Interpreting Pearson Residual Patterns and Scale

Learn to interpret Pearson residual signs, magnitudes, and scale without mistaking variance standardization for a guarantee of normality or independence.

Intermediate 9 min read

What You'll Learn

  • Interpret positive and negative Pearson residuals relative to fitted means
  • Translate a Pearson residual magnitude back to the response scale
  • Compare discrepancies when variance-function values differ
  • Distinguish unit-dispersion Pearson residuals from dispersion-scaled residuals
  • Recognize how model fitting and discrete outcomes limit simple scale rules
  • Use residual patterns as diagnostic clues rather than automatic evidence of a specific failure

What a Pearson Residual Says

A response residual \(Y_i-\hat{\mu}_i\) records the difference between an observed response and its fitted mean. Its size is difficult to compare across observations when the model assigns those observations different variances: a discrepancy of 3 may be modest for one observation and unusually large for another. A Pearson residual puts the discrepancy on a scale determined by the model's variance function. That makes its sign and magnitude informative, but it does not by itself make the residuals normally distributed, independent after fitting, or equally precise in every setting.

Definition: For observation \(i\), with observed response \(y_i\), fitted mean \(\hat{\mu}_i\), and variance function \(V(\cdot)\), the Pearson residual is \(r_{Pi}=(y_i-\hat{\mu}_i)/\sqrt{V(\hat{\mu}_i)}\), provided \(V(\hat{\mu}_i)>0\). If the model specifies \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\), this conventional Pearson residual does not include \(\phi\). The dispersion-scaled Pearson residual is \(r_{Pi}/\sqrt{\phi}\) when \(\phi>0\) is specified or estimated.

The numerator determines the direction. A positive residual means \(y_i>\hat{\mu}_i\): the observed response is above its fitted mean. A negative residual means \(y_i<\hat{\mu}_i\). A zero residual means the observation equals its fitted mean. The denominator is the square root of the variance function evaluated at the fitted mean. It expresses the discrepancy in units of the model's conditional standard deviation when \(\phi=1\); with dispersion \(\phi\), that conditional standard deviation is \(\sqrt{\phi V(\mu_i)}\).

This interpretation separates two questions. The sign tells which side of the fitted mean the observation falls on. The magnitude tells how large its discrepancy is relative to the variance-function scale. It does not say, without additional assumptions, how surprising the observation is under the full fitted distribution.

Variance Standardization and Its Scale

The variance function depends on the response family and sometimes on known observation-specific quantities. For a Poisson response, \(V(\mu)=\mu\); for a Bernoulli response, \(V(\mu)=\mu(1-\mu)\); for a binomial count from \(m\) trials with success probability \(p\), the variance function for the count is \(V(\mu)=m p(1-p)\), with \(\mu=mp\). Consequently, the same raw difference \(y_i-\hat{\mu}_i\) need not yield the same Pearson residual for different observations.

Theorem: Suppose \(Y_i\) has mean \(\mu_i\), variance \(\phi V(\mu_i)\), with \(0<V(\mu_i)<\infty\) and \(0<\phi<\infty\). Define the residual using the true mean, \(R_{Pi}=(Y_i-\mu_i)/\sqrt{V(\mu_i)}\). Then \(E[R_{Pi}]=0\) and \(\operatorname{Var}(R_{Pi})=\phi\). Therefore, \(R_{Pi}/\sqrt{\phi}\) has mean zero and variance one.

Proof. Since the denominator is a positive constant for this observation,

$$ E[R_{Pi}] =\frac{E[Y_i-\mu_i]}{\sqrt{V(\mu_i)}} =\frac{E[Y_i]-\mu_i}{\sqrt{V(\mu_i)}}=0. $$

Similarly, subtracting the constant \(\mu_i\) does not change variance, and division by a constant divides variance by its square. Thus

$$ \operatorname{Var}(R_{Pi}) =\frac{\operatorname{Var}(Y_i)}{V(\mu_i)} =\frac{\phi V(\mu_i)}{V(\mu_i)} =\phi. $$

Because \(\phi>0\), dividing \(R_{Pi}\) by \(\sqrt{\phi}\) gives mean zero and variance \(\phi/\phi=1\). This establishes the claims. \(\square\)

The theorem is about residuals formed with the true mean, not automatically about residuals formed with an estimated mean. In practice, \(\hat{\mu}_i\) is fitted from the same data, and the fitted residuals are consequently affected by parameter estimation. Their means and variances need not equal the theorem's values exactly, and residuals can be dependent even when the responses are independent. The result explains the intended variance standardization; it is not a claim that every fitted Pearson residual behaves like an independent standard normal variable.

Worked Example: Same Pearson Magnitude, Different Raw Differences

Suppose two Poisson observations have fitted means 4 and 9. Their variance-function values are \(V(4)=4\) and \(V(9)=9\). For the first observation, let \(y_1=8\); for the second, let \(y_2=12\).

For the first observation, \(y_1-\hat{\mu}_1=8-4=4\), so \(r_{P1}=4/\sqrt{4}=4/2=2\). For the second, \(y_2-\hat{\mu}_2=12-9=3\), so \(r_{P2}=3/\sqrt{9}=3/3=1\). Both observations are above their fitted means, but the first has the larger variance-standardized discrepancy, even though its raw discrepancy is only one unit larger.

The relation can also be read in the other direction. If two residuals have the same magnitude \(c\), their raw discrepancy magnitudes are \(c\sqrt{V(\hat{\mu}_i)}\) and \(c\sqrt{V(\hat{\mu}_j)}\). If \(c=0\), both raw discrepancies are zero, regardless of whether the variance-function values are equal. If \(c>0\), the raw discrepancy magnitudes are equal if and only if the variance-function values are equal. In particular, equal nonzero Pearson magnitudes do not generally mean equal differences on the response scale.

Result: For any observation with \(V(\hat{\mu}_i)>0\), the response-scale discrepancy and Pearson residual satisfy \(|y_i-\hat{\mu}_i|=|r_{Pi}|\sqrt{V(\hat{\mu}_i)}\). Thus variance standardization preserves the sign of the discrepancy and rescales its magnitude by the fitted variance-function standard deviation.

Proof. By definition, \(r_{Pi}=(y_i-\hat{\mu}_i)/\sqrt{V(\hat{\mu}_i)}\). Multiplying both sides by the positive quantity \(\sqrt{V(\hat{\mu}_i)}\) gives \(y_i-\hat{\mu}_i=r_{Pi}\sqrt{V(\hat{\mu}_i)}\). Taking absolute values yields the stated identity. Since the multiplier is positive, the signed quantities \(y_i-\hat{\mu}_i\) and \(r_{Pi}\) have the same sign. \(\square\)

Reading Signs and Magnitudes in Context

A sequence or collection of residuals can suggest where a model systematically misses. Several positive residuals among observations with similar covariate values indicate that observed responses in that part of the data tend to exceed their fitted means; several negative ones indicate the reverse. A change from mostly negative to mostly positive residuals across a meaningful covariate range can suggest that the fitted mean does not capture some feature of the response pattern. Such descriptions are clues, not diagnoses: the pattern may reflect an omitted mean structure, an unsuitable variance assumption, dependence, influential observations, or random variation.

Magnitude is also conditional on the scale used. A Pearson residual of 2 means that the response is two variance-function standard deviations above its fitted mean when \(\phi=1\), or two such units below if its value is \(-2\). If \(\phi\ne1\), it is not two full conditional standard deviations: the dispersion-scaled residual is \(2/\sqrt{\phi}\). Rules such as flagging values beyond 2 are rough screening conventions, not universal significance cutoffs. Their calibration depends on the response distribution, dispersion, fitting, sample size, and the purpose of the diagnostic.

Worked Example: Grouped Binomial Residuals

Consider a binomial count \(Y\) from \(m=20\) trials, with fitted success probability \(\hat p=0.5\). The fitted count mean is \(\hat{\mu}=m\hat p=10\), and its variance function is \(V(\hat{\mu})=m\hat p(1-\hat p)=20(0.5)(0.5)=5\). If 14 successes are observed, the response discrepancy is \(14-10=4\), so \(r_P=4/\sqrt{5}\approx 4/2.236=1.789\).

Now consider another count with \(m=100\), also fitted at \(\hat p=0.5\), and 60 observed successes. Its mean is 50, its variance function is \(100(0.5)(0.5)=25\), and its discrepancy is 10. Thus \(r_P=10/\sqrt{25}=10/5=2\). The second observation is farther from its mean in raw count units (10 rather than 4), but its Pearson residual is only modestly larger (2 rather than about 1.789). The standardization accounts for the different trial counts and corresponding variances; it does not erase the fact that these are counts with discrete possible values.

Worked Example: Accounting for Dispersion

Suppose a count model has \(\hat{\mu}=12\), \(V(\hat{\mu})=12\), and dispersion \(\phi=2\). An observation \(y=18\) has discrepancy \(18-12=6\). Its conventional Pearson residual is \(r_P=6/\sqrt{12}\approx6/3.464=1.732\).

The conditional variance under this model is \(\phi V(\hat{\mu})=2(12)=24\), so the conditional standard deviation is \(\sqrt{24}\approx4.899\). The dispersion-scaled residual is \(r_P/\sqrt{\phi}=1.732/\sqrt{2}\approx1.225\), which also equals \(6/\sqrt{24}\approx1.225\). Therefore, saying that the observation is about 1.732 variance-function units above its mean is correct for the conventional residual, while calling it 1.732 full conditional standard deviations above its mean would be incorrect when \(\phi=2\).

When Standardization Can Mislead

Variance-function scaling makes comparisons more meaningful when model variances differ, but it does not guarantee comparability in every respect. A Pearson residual is still a transformation of the observed response, and different response families can have very different shapes and supports. A value of 2 from a continuous response model and a value of 2 from a sparse count model need not have the same tail probability. Even within one family, fitted means near a boundary can make the possible residual values highly asymmetric or discrete.

Also check whether the variance function is positive. At a boundary, such as a Bernoulli mean of 0 or 1, \(V(\hat{\mu})=0\), and the stated Pearson residual is undefined. A zero denominator is not resolved by calling the residual zero; the model or data situation requires separate treatment. For interior fitted means where the denominator is positive, a zero residual means exactly \(y_i=\hat{\mu}_i\).

Finally, do not treat residuals as if they were the original independent observations. Fitting estimates shared parameters, so changing one observation can affect multiple fitted means and residuals. An apparent run of signs or a large residual is a prompt to examine the model and data, not by itself proof of a particular error or a formal test result.

Common mistake: “A Pearson residual of 2 always means an observation is exactly two conditional standard deviations from its fitted mean, and it is therefore a universal outlier.” This confuses the conventional denominator \(\sqrt{V(\hat{\mu}_i)}\) with the full standard deviation \(\sqrt{\phi V(\hat{\mu}_i)}\), and treats a scale description as a universal probability statement. The correction is to identify whether dispersion has been included, then interpret the value in light of the response distribution and the fact that the mean was fitted.

Pearson residuals are useful because they put response discrepancies on a scale informed by the model's variance function. Their signs summarize direction, their magnitudes allow a more appropriate comparison than raw differences alone, and their patterns can expose systematic lack of fit. These uses are strongest when the variance specification and dispersion are understood and when residuals are read as diagnostics rather than as automatically standardized normal data.

Check Your Understanding

Use the definitions and scale distinctions above to answer the following.

  1. If an observation has \(y_i-\hat{\mu}_i=-6\) and \(V(\hat{\mu}_i)=9\), what is its Pearson residual, and what does its sign mean?
  2. Two residuals have equal magnitude \(c\). State the condition for equal raw discrepancy magnitudes when \(c>0\), and explain what happens when \(c=0\).
  3. A model has \(\phi=4\). How does the dispersion-scaled Pearson residual relate to the conventional Pearson residual?
  4. Why does a variance-standardized residual of 2 not have the same automatic interpretation as a universal outlier rule?
  5. What does a run of positive Pearson residuals in a meaningful part of the data suggest, and why is it not by itself proof of a specific model failure?
Clinical Biostats