Why Unobserved Variation Changes the Variance
A binomial or Poisson GLM specifies a variance benchmark once its mean is given. That benchmark is conditional on the model’s predictors and assumptions. But observations that look alike on recorded predictors may still differ in unmeasured ways: patients may have different underlying risks, or sites may have different event rates. If a success probability or event rate varies across observational units, the variance after averaging over that unobserved variation can exceed the binomial or Poisson benchmark.
The key distinction is between a conditional model, given the latent probability or rate, and the marginal distribution after that latent quantity is averaged out. A conditional distribution can be exactly binomial or Poisson while its marginal mixture is more variable. The derivations below use the law of total expectation and the law of total variance.
For these variance calculations, assume the latent quantities have finite second moments. The binomial probability is automatically bounded, and the Poisson rate must have a finite second moment for the marginal count to have finite variance. The conditional models describe variation given the latent quantity; the marginal variance includes both that conditional variation and variation between latent quantities.
Random Success Probabilities and Binomial Counts
Suppose each unit contributes \(m\) trials, and its probability of success \(P\) is drawn from a population distribution with mean \(\bar p=E[P]\) and variance \(\tau^2=\operatorname{Var}(P)\). Given \(P\), the \(m\) trials are independent Bernoulli observations with success probability \(P\), so \(Y\mid P\sim\operatorname{Binomial}(m,P)\).
Derivation. The conditional mean and variance are \(E[Y\mid P]=mP\) and \(\operatorname{Var}(Y\mid P)=mP(1-P)\). Therefore,
By the law of total variance,
The first term is the binomial variance evaluated at the marginal success probability \(\bar p\). The second is the extra variance from differences in success probabilities across units. It is nonnegative, and is strictly positive when \(m>1\) and the latent probability is not constant. If \(m=1\), the second term is zero: mixing Bernoulli probabilities changes no marginal variance beyond the Bernoulli variance at the marginal mean.
Worked Example: A Beta-Mixed Binomial Count
Suppose each patient has 10 trials, such as 10 opportunities for a response, and the patient-specific success probability follows a \(\operatorname{Beta}(2,8)\) distribution. The beta distribution has mean \(a/(a+b)\) and variance \(ab/[(a+b)^2(a+b+1)]\). Here,
A binomial model using the marginal probability \(0.2\) would have mean \(10(0.2)=2\) and variance \(10(0.2)(0.8)=1.6\). The mixture has the same mean, but its variance is
Thus the marginal variance is about 1.82 times the binomial benchmark. The reason is not that trials are dependent after conditioning on the patient’s probability: they are conditionally independent. Rather, patients with higher probabilities tend to have more successes across all 10 trials, while patients with lower probabilities tend to have fewer.
The same mechanism can be seen at the trial level. Let \(X_j\) and \(X_k\) be two distinct Bernoulli outcomes from the same unit. Conditional independence gives \(\operatorname{Cov}(X_j,X_k\mid P)=0\), but marginally,
A shared latent probability therefore makes outcomes from the same unit positively associated marginally. This is another way to understand why the count becomes more variable.
Random Rates and Poisson Counts
For Poisson counts, let \(\Lambda\) be a unit-specific event rate over a fixed observation period, with \(E[\Lambda]=\mu\) and \(\operatorname{Var}(\Lambda)=\omega^2\). Conditional on that rate, suppose \(Y\mid\Lambda\sim\operatorname{Poisson}(\Lambda)\).
Derivation. A Poisson variable with mean \(\Lambda\) has conditional mean and variance both equal to \(\Lambda\). Hence
and, using the law of total variance,
If units have different known exposures \(e_i\) and a latent rate \(R_i\) per exposure unit, then \(Y_i\mid R_i\sim\operatorname{Poisson}(e_iR_i)\). For fixed \(e_i\), the same calculation gives \(E[Y_i]=e_iE[R_i]\) and \(\operatorname{Var}(Y_i)=e_iE[R_i]+e_i^2\operatorname{Var}(R_i)\). The added term is scaled by the square of exposure.
Worked Example: A Gamma-Mixed Poisson Count
Suppose the latent rate \(\Lambda\) follows a gamma distribution with shape 4 and rate \(4/3\). For a gamma distribution in shape-rate parameterization, the mean is shape divided by rate and the variance is shape divided by rate squared. Thus,
The marginal count has mean 3 and variance \(3+2.25=5.25\), whereas a Poisson model with mean 3 has variance 3. The gamma mixture also gives a concrete check on the distribution of small counts. Its probability of zero is
A Poisson variable with mean 3 has \(P(Y=0)=e^{-3}\approx0.050\). The larger zero probability is consistent with mixing: some units have low rates and contribute many zeros, while units with high rates contribute relatively large counts. The mixture also has a longer upper tail than the corresponding Poisson distribution.
What Residual Patterns Can Suggest
Latent heterogeneity is not directly visible in an ordinary GLM data set. It is inferred, if at all, from the distribution of observed responses relative to the fitted mean and variance. A recurring pattern is more squared residual variation than expected from the binomial or Poisson benchmark. In grouped binomial data, that can mean more groups near the extremes than the fitted binomial model predicts. In counts, it can mean both more zeros and a heavier upper tail than the fitted Poisson model predicts.
For example, consider eight groups with 10 trials each and a fitted success probability of \(0.2\). The fitted count mean is 2, and the binomial variance is 1.6. Suppose the observed counts are \(0,0,1,1,3,3,4,4\). Their sum is 16, so their average is exactly 2. The Pearson residual for group \(i\) is the observed-minus-fitted count divided by the square root of the fitted variance. The squared residuals are \(2.5\) for each count of 0 or 4 and \(0.625\) for each count of 1 or 3. Thus the Pearson sum of squares is
The mean is correctly matched, but this small illustration has many counts farther from 2 than the fitted binomial variance would lead one to expect. Such a pattern can motivate investigation of latent heterogeneity. With only eight groups, however, it is not decisive evidence: sampling variation alone can produce an unusually large residual sum of squares.
Residual plots can also be suggestive. If observations sharing a site, patient, household, or other grouping tend to have residuals of similar sign, a common unmeasured feature within those units may be relevant. If residual spread grows with fitted means beyond the model’s benchmark, that may also suggest extra variation. Neither pattern identifies its cause. A misspecified mean, dependence, influential observations, or other departures can produce similar signals. Residuals should therefore be read as evidence about model adequacy, not as a direct measurement of a latent variable.
Worked Example: Why One Bernoulli Observation Cannot Show Extra Variance
Suppose each person has a latent response probability \(P\), with \(E[P]=0.2\), but only one binary outcome \(Y\) is observed per person. Conditional on \(P\), \(Y\sim\operatorname{Bernoulli}(P)\). The marginal mean is \(E[Y]=E[P]=0.2\). Since \(Y\) is still binary, its marginal variance is
That is exactly the Bernoulli variance at the marginal mean, even if \(P\) varies substantially across people. Equivalently, the binomial-mixture formula has \(m=1\), so its extra term \(m(m-1)\tau^2\) is zero. With only one binary response per person, marginal variance alone cannot distinguish heterogeneous probabilities from a common probability of 0.2. Repeated trials, grouping information, predictors, or additional assumptions may provide information, but the single-response variance does not.
Common Mistake
Wrong reasoning: “The conditional response distribution is binomial or Poisson, so the marginal variance must equal the fitted binomial or Poisson variance.”
Correction: Those variance benchmarks apply conditional on the probability or rate. When that quantity varies across units, the law of total variance adds the variance of the conditional mean. For a binomial mixture the added term is \(m(m-1)\operatorname{Var}(P)\); for a Poisson mixture it is \(\operatorname{Var}(\Lambda)\). Conversely, an elevated residual measure does not by itself prove latent heterogeneity, because other model failures can also increase residual variation.
Check Your Understanding
Use the conditional-versus-marginal distinction to answer these questions.
- For \(Y\mid P\sim\operatorname{Binomial}(m,P)\), which part of the marginal variance formula represents variation between units?
- If \(m=1\), why does random variation in \(P\) not increase the marginal Bernoulli variance beyond the variance at the marginal mean?
- A Poisson mixture has mean 5 and latent-rate variance 3. What is its marginal variance, and what would a Poisson model with mean 5 use as its variance?
- In grouped binomial data, what kind of observed count pattern might suggest probability heterogeneity?
- Why does a large Pearson sum of squares not establish that latent heterogeneity is the cause of extra variation?