Tutorials › Generalized Linear Models › Conditional Means Versus Future Counts

Count Effects and Predictions · Tutorial 482 of 981

Conditional Means Versus Future Counts

Learn why uncertainty in a fitted expected count and the variation of a future Poisson observation are different quantities, and how to calculate each at a specified profile.

Intermediate 10 min read

What You'll Learn

  • Define the conditional mean and conditional variance of a Poisson response at a fixed covariate profile
  • Distinguish repeated-sample uncertainty in an estimated mean from variation in a future count
  • Calculate the Poisson standard deviation and an approximate standard error for a fitted mean
  • Interpret a confidence interval for a conditional mean without treating it as an interval for an observation
  • Recognize when two different uncertainty calculations answer different questions

Two Different Questions at One Covariate Profile

Suppose a Poisson regression model is used to describe a count for a subject with covariate profile \(x_0\). There are two distinct questions. First, how uncertain are we about the model’s conditional expected count at \(x_0\), given that the coefficients have been estimated from data? Second, how much can a future count for a subject at that same profile vary around the true conditional mean? The first concerns estimation across repeated datasets; the second concerns the response distribution for a future observation.

These questions share the same mean but do not have the same answer. In particular, a confidence interval for a fitted mean is not a range containing 95% of future counts. Conversely, the Poisson standard deviation of a future count does not measure how precisely the regression coefficients, or the fitted mean, have been estimated.

We hold the covariate profile fixed throughout. Write the Poisson log-mean model as \(\log\{\mu(x)\}=x^\mathsf{T}\beta\), where \(\mu(x)=E[Y\mid x]\), and assume \(Y\mid x\sim\operatorname{Poisson}(\mu(x))\). Here \(\beta\) is the model parameter and \(x_0\) is the specified profile. The true \(\mu(x_0)\) is fixed under the model, though unknown to the analyst.

Definition: At a fixed profile \(x_0\), the conditional mean is \(\mu(x_0)=E[Y\mid x_0]\). Estimation uncertainty describes how an estimate \(\hat{\mu}(x_0)\) would vary across repeated datasets used to fit the model. Future-count variation describes how \(Y\mid x_0\) varies around \(\mu(x_0)\), under the specified response model.

What the Poisson Model Says About a Future Count

For a Poisson response with mean \(\mu>0\), the probability of count \(k\) is \(P(Y=k)=e^{-\mu}\mu^k/k!\), for \(k=0,1,2,\ldots\). The mean and variance are both \(\mu\). Thus, at a fixed profile, the model’s conditional standard deviation for a future count is \(\sqrt{\mu(x_0)}\).

Result: If \(Y\mid x_0\sim\operatorname{Poisson}(\mu(x_0))\), then $$ E[Y\mid x_0]=\mu(x_0), \qquad \operatorname{Var}(Y\mid x_0)=\mu(x_0). $$ The standard deviation of a future count, when the mean is known, is therefore \(\sqrt{\mu(x_0)}\).

For completeness, the moment calculation follows directly from the Poisson probability mass function. For the mean, use \(k/k!=1/(k-1)!\) for \(k\geq1\):

$$ E[Y\mid x_0] =\sum_{k=1}^{\infty}k e^{-\mu}\frac{\mu^k}{k!} =\mu e^{-\mu}\sum_{j=0}^{\infty}\frac{\mu^j}{j!} =\mu. $$

Similarly, since \(k(k-1)/k!=1/(k-2)!\) for \(k\geq2\),

$$ E[Y(Y-1)\mid x_0] =\mu^2 e^{-\mu}\sum_{j=0}^{\infty}\frac{\mu^j}{j!} =\mu^2. $$

Because \(Y^2=Y(Y-1)+Y\), it follows that \(E[Y^2\mid x_0]=\mu^2+\mu\), and hence

$$ \operatorname{Var}(Y\mid x_0) =E[Y^2\mid x_0]-\{E[Y\mid x_0]\}^2 =(\mu^2+\mu)-\mu^2 =\mu. $$

This result concerns the response distribution at a fixed value of the model parameter. If \(\mu(x_0)\) is not known, substituting \(\hat{\mu}(x_0)\) gives a plug-in estimate of the future-count variance, not a calculation of uncertainty in \(\hat{\mu}(x_0)\).

Worked Example: A Mean of Four Counts

At a specified profile, suppose the fitted conditional mean is \(\hat{\mu}(x_0)=4\). What plug-in estimate does the Poisson model give for the standard deviation of a future count at this profile?

Under the Poisson model, the variance equals the mean. Substituting the fitted mean gives an estimated variance of \(4\), and therefore an estimated standard deviation of \(\sqrt{4}=2\) counts.

This calculation says that the model’s response variation is on the count scale. It does not say that the mean estimate has standard error 2, and it does not construct a confidence interval for that mean. Those require information about estimation from the fitted model.

Uncertainty in the Estimated Conditional Mean

Let \(\hat{\beta}\) be an estimate of \(\beta\), and write \(\hat{\eta}(x_0)=x_0^\mathsf{T}\hat{\beta}\) and \(\hat{\mu}(x_0)=\exp\{\hat{\eta}(x_0)\}\). The estimated mean changes across repeated samples because \(\hat{\beta}\) changes. Its uncertainty is commonly summarized by a standard error or a confidence interval based on the coefficient estimate and its estimated covariance matrix.

For example, suppose the fitted linear predictor has estimated standard error \(s_{\hat{\eta}}\). A first-order Taylor expansion of the exponential function gives the familiar approximation

$$ \operatorname{SE}\{\hat{\mu}(x_0)\} \approx \hat{\mu}(x_0)s_{\hat{\eta}}. $$

This approximation is for repeated-sample variation in the estimated mean. To see why, suppose \(\hat{\eta}(x_0)\) is consistent for \(\eta(x_0)\), and is asymptotically normal with variance approximately \(s_{\hat{\eta}}^2\). For \(g(u)=e^u\), the derivative is \(g'(u)=e^u\). A first-order expansion around \(\eta(x_0)\) is

$$ e^{\hat{\eta}(x_0)} =e^{\eta(x_0)} +e^{\eta(x_0)}\{\hat{\eta}(x_0)-\eta(x_0)\} +r_n, $$

where the remainder \(r_n\) is of smaller order than \(\hat{\eta}(x_0)-\eta(x_0)\) under the usual conditions for the first-order delta-method approximation. Thus the leading random part of the fitted mean is approximately \(\mu(x_0)\{\hat{\eta}(x_0)-\eta(x_0)\}\). Its variance is approximately \(\mu(x_0)^2s_{\hat{\eta}}^2\); replacing the unknown mean by its estimate yields the stated standard-error approximation. This calculation concerns the estimator, not the distribution of a future \(Y\).

Worked Example: A Confidence Interval Is Not a Future-Count Range

At a fixed profile, suppose \(\hat{\mu}(x_0)=4\) and the estimated standard error of the fitted linear predictor is \(0.20\). Calculate a 95% Wald confidence interval for the conditional mean, and compare it with the plug-in Poisson standard deviation for a future count.

On the log-mean scale, the estimate is \(\hat{\eta}(x_0)=\log(4)\approx1.3863\). The Wald interval on this scale is

$$ 1.3863\pm1.96(0.20) =[0.9943,1.7783]. $$

Exponentiating both endpoints gives the interval for the conditional mean:

$$ [\exp(0.9943),\exp(1.7783)] \approx[2.70,5.92]. $$

This is an approximate 95% confidence interval for the model’s conditional mean at \(x_0\), under the usual large-sample Wald approximation. In contrast, the plug-in Poisson variance for one future count is \(4\), so its plug-in standard deviation is \(2\). The interval \([2.70,5.92]\) and the standard deviation \(2\) describe different sources of variation and are not competing estimates of the same quantity.

The exponential transformation in this example preserves the confidence level because it is strictly increasing: an interval containing \(\eta(x_0)\) contains its exponential after both endpoints are exponentiated, exactly when the original interval contains \(\eta(x_0)\). This gives an interval on the positive mean scale. It does not turn the interval into a range for future observations.

One Profile, Two Calculations

When the estimated coefficient covariance matrix is available, uncertainty in the fitted log mean at a profile can be calculated from that matrix. If \(\widehat{\operatorname{Var}}(\hat{\beta})=V\), then the estimated variance of \(x_0^\mathsf{T}\hat{\beta}\) is \(x_0^\mathsf{T}Vx_0\). The Poisson calculation is separate: it uses the conditional mean to estimate the response variance. The following example performs both calculations for the same profile.

Worked Example: Using the Coefficient Covariance at a Profile

Consider the model \(\log\{\mu(x)\}=\beta_0+\beta_1x\). At profile \(x_0=2\), suppose \(\hat{\beta}_0=0.20\), \(\hat{\beta}_1=0.30\), and

$$ V= \begin{pmatrix} 0.04 & -0.01\\ -0.01 & 0.01 \end{pmatrix}. $$

First calculate the fitted mean. The fitted linear predictor is \(0.20+0.30(2)=0.80\), so \(\hat{\mu}(2)=e^{0.80}\approx2.226\).

The profile vector is \(x_0=(1,2)^\mathsf{T}\). The estimated variance of the fitted linear predictor is

$$ x_0^\mathsf{T}Vx_0 =0.04+2(1)(2)(-0.01)+2^2(0.01) =0.04, $$

so its estimated standard error is \(0.20\). The approximate standard error of the fitted mean is therefore \(2.226(0.20)\approx0.445\). The plug-in Poisson standard deviation of a future count is instead \(\sqrt{2.226}\approx1.492\). The first value summarizes uncertainty in the estimated mean; the second summarizes modelled count variation around the true mean. Neither should be substituted for the other.

How to Read the Numbers Correctly

The distinction matters whenever a result is reported as a prediction. A statement such as “the expected count is about 2.2” identifies a conditional mean. A confidence interval for that mean describes uncertainty from fitting the regression model. A future observation is a count, and under the Poisson model it varies around the true mean according to its conditional response distribution. A mean estimate and its confidence interval do not, by themselves, describe that full response variation.

A quick check is to ask what would change if the data used to estimate the model were collected again, versus what would change if a different future subject were observed at the same profile. Changes in the fitted coefficients and fitted mean belong to estimation uncertainty. Changes in the realized count, with the profile and true model held fixed, belong to future-count variation.

Worked Example: Separating the Two Sources of Variation

A fitted model gives a conditional mean estimate of \(2.4\) at a specified profile, and the estimated standard error of the fitted linear predictor is \(0.15\). Give the approximate standard error of the fitted mean and the plug-in standard deviation of a future Poisson count.

For estimation uncertainty, the first-order approximation gives \(2.4(0.15)=0.36\) counts. For future-count variation, the Poisson model gives a plug-in variance of \(2.4\) and standard deviation \(\sqrt{2.4}\approx1.55\) counts.

The numbers differ because they answer different questions. The value \(0.36\) describes how precisely the mean is estimated, approximately. The value \(1.55\) describes the Poisson spread of a future count around the true mean, estimated by plugging in \(2.4\). The latter is not a confidence standard error for the fitted mean.

Common Mistake

A common error is to calculate \(\sqrt{\hat{\mu}(x_0)}\) and call it the standard error of the estimated mean. That quantity follows from the Poisson response variance and estimates the standard deviation of a future count at the profile. It does not account for how much \(\hat{\beta}\), and therefore \(\hat{\mu}(x_0)\), would change across repeated fitted datasets.

The reverse error is also possible: using the standard error of \(\hat{\mu}(x_0)\) as if it measured the spread of future counts. That omits the response variation specified by the Poisson model. Before interpreting any uncertainty number, identify its target: the unknown conditional mean, or a future response conditional on the profile.

Key takeaway: At a fixed profile, \(\mu(x_0)\) is the conditional expected count. Uncertainty in its estimate is an inferential quantity based on the fitted model; Poisson variation around the true mean has conditional variance \(\mu(x_0)\). A confidence interval for the mean is not a range for a future count.

Check Your Understanding

For each question, identify whether it concerns estimation uncertainty or future-count variation.

  1. At a fixed profile, a fitted mean is 9. What is the plug-in Poisson standard deviation of a future count?
  2. A Wald interval is reported for the conditional mean at a profile. What quantity does that interval describe?
  3. Why is \(\sqrt{\hat{\mu}(x_0)}\) not generally the standard error of \(\hat{\mu}(x_0)\)?
  4. If an estimated log mean has standard error \(0.10\) and the fitted mean is 5, what is the first-order approximate standard error of the fitted mean?
  5. In one sentence, distinguish what changes across repeated fitted datasets from what changes across future observations at the same profile.
Clinical Biostats