Tutorials › Generalized Linear Models › From A Fitted Mean To Count Probabilities

Poisson Regression Foundations · Tutorial 420 of 981

From A Fitted Mean To Count Probabilities

Use the fitted Poisson mean to calculate probabilities for individual counts and ranges, and interpret these as response predictions rather than predictions of a guaranteed outcome.

Intermediate 10 min read

What You'll Learn

  • Convert a fitted conditional mean into a plug-in Poisson probability.
  • Calculate probabilities for exact counts, intervals, and upper tails.
  • Use the Poisson recurrence to obtain successive count probabilities.
  • Compare response distributions at different covariate profiles.
  • Distinguish a fitted mean from an individual response prediction.
  • Recognize that plug-in probabilities do not include parameter-estimation uncertainty.

From an Average to a Distribution of Counts

A fitted Poisson mean answers an average-response question: for a specified covariate profile, what is the model’s estimated conditional mean count? It does not say that the next response will equal that mean. To describe possible individual outcomes, use the fitted mean to calculate probabilities for particular counts or ranges of counts.

For example, if the fitted mean is 2, the model assigns a probability to observing zero events, another probability to one event, and so on. The probabilities are determined by the Poisson response model; the fitted mean supplies its parameter. These are plug-in predicted probabilities: they use the estimated mean as though it were fixed, so they describe response variation under the fitted model without adding parameter-estimation uncertainty.

Definition: Suppose that, conditional on covariates \(x_i\), the response \(Y_i\) has a Poisson distribution with mean \(\mu_i>0\). Its conditional probability mass function is
$$ P(Y_i=k\mid x_i)=\frac{e^{-\mu_i}\mu_i^k}{k!},\qquad k=0,1,2,\ldots. $$
If the fitted conditional mean at that profile is \(\hat{\mu}_i\), the plug-in predicted probability of count \(k\) is
$$ \widehat P(Y_i=k\mid x_i) =\frac{e^{-\hat{\mu}_i}\hat{\mu}_i^k}{k!}. $$

In Poisson regression with the log link, the fitted mean is positive and has the form \(\hat{\mu}_i=\exp(x_i^T\hat{\beta})\). The probability calculation uses this fitted mean in place of \(\mu_i\). Once \(\hat{\mu}_i\) is known, probabilities for count events follow by adding the probabilities of the included integer counts. For integers \(0\leq a\leq b\),

$$ \widehat P(a\leq Y_i\leq b\mid x_i) =\sum_{k=a}^{b}\frac{e^{-\hat{\mu}_i}\hat{\mu}_i^k}{k!}. $$

An upper-tail probability can be calculated directly by summing from its lower endpoint or, when that is simpler, by subtracting the probability of the complementary counts from 1.

Calculating Exact-Count and Range Probabilities

Worked Example: Counts from a Fitted Mean of 2

For a covariate profile, suppose the fitted Poisson mean is \(\hat{\mu}=2\). Find the plug-in probabilities of exactly 0 and exactly 3 events, the probability of between 1 and 3 events inclusive, and the probability of at least 4 events.

For zero events, \(0!=1\), so

$$ \widehat P(Y=0)=\frac{e^{-2}2^0}{0!}=e^{-2}\approx0.135335. $$

For exactly 3 events,

$$ \widehat P(Y=3)=\frac{e^{-2}2^3}{3!} =\frac{4}{3}e^{-2}\approx0.180447. $$

For the inclusive range from 1 to 3, add the probabilities for 1, 2, and 3:

$$ \begin{aligned} \widehat P(1\leq Y\leq3) &=e^{-2}\left(\frac{2^1}{1!}+\frac{2^2}{2!}+\frac{2^3}{3!}\right)\\ &=e^{-2}\left(2+2+\frac{4}{3}\right) =\frac{16}{3}e^{-2}\approx0.721788. \end{aligned} $$

To get the probability of at least 4, use the complement \(Y\leq3\). The coefficient for the probabilities from 0 through 3 is \(1+2+2+4/3=19/3\), giving

$$ \widehat P(Y\geq4) =1-\frac{19}{3}e^{-2} \approx0.142877. $$

The range probability is not obtained by evaluating the Poisson mass function at a non-integer average or at a midpoint. It is the sum of the masses at the integer counts in the range.

Why the Count Probabilities Form a Distribution

The plug-in probabilities are not merely separate calculations. For any fixed fitted mean \(\hat{\mu}>0\), they form a valid probability distribution over the nonnegative integers.

Result: For \(\hat{\mu}>0\), the probabilities \(p_k=e^{-\hat{\mu}}\hat{\mu}^k/k!\), for \(k=0,1,2,\ldots\), are nonnegative and sum to 1.

Proof. Since \(e^{-\hat{\mu}}>0\), \(\hat{\mu}^k>0\), and \(k!>0\), each \(p_k\) is nonnegative. By the power-series expansion of the exponential function, which converges for every real argument,

$$ \sum_{k=0}^{\infty}p_k =e^{-\hat{\mu}}\sum_{k=0}^{\infty}\frac{\hat{\mu}^k}{k!} =e^{-\hat{\mu}}e^{\hat{\mu}}=1. $$

Thus the probabilities assigned to all possible counts exhaust the total probability. In particular, an upper-tail probability can be found by subtracting the sum over all excluded lower counts from 1. \(\square\)

Worked Example: A Fitted Mean of 4.5

Suppose a profile has fitted mean \(\hat{\mu}=4.5\). Calculate the probability of exactly 5 events and the probability of at most 2 events.

For exactly 5, substitute \(k=5\) in the mass function:

$$ \widehat P(Y=5) =e^{-4.5}\frac{4.5^5}{5!} =e^{-4.5}\frac{1845.28125}{120} \approx0.170827. $$

“At most 2” includes 0, 1, and 2. The corresponding powers divided by factorials are \(1\), \(4.5\), and \(4.5^2/2=10.125\). Therefore,

$$ \begin{aligned} \widehat P(Y\leq2) &=e^{-4.5}\left(1+4.5+\frac{4.5^2}{2!}\right)\\ &=15.625e^{-4.5} \approx0.173578. \end{aligned} $$

The event \(Y\leq2\) is relatively unlikely under this fitted distribution, but it is not impossible. A fitted mean of 4.5 does not rule out observing a count below the mean.

A Recurrence for Successive Count Probabilities

For hand calculations, it is often unnecessary to evaluate a factorial and power separately for every count. The ratio of successive Poisson probabilities gives a simpler calculation.

Result: If \(p_k=e^{-\mu}\mu^k/k!\) for a fixed \(\mu>0\), then, for every integer \(k\geq0\),
$$ p_{k+1}=\frac{\mu}{k+1}p_k. $$

Proof. Directly divide the probability at \(k+1\) by that at \(k\). Both probabilities are positive because \(\mu>0\), so this division is valid:

$$ \frac{p_{k+1}}{p_k} = \frac{e^{-\mu}\mu^{k+1}/(k+1)!} {e^{-\mu}\mu^k/k!} =\frac{\mu}{k+1}. $$

Multiplying by \(p_k\) gives the stated recurrence. The same calculation applies to plug-in probabilities by setting \(\mu=\hat{\mu}\). \(\square\)

Starting from \(p_0=e^{-\mu}\), the recurrence produces each next probability. It also shows how successive masses change: the probability rises from \(k\) to \(k+1\) when \(\mu>k+1\), is unchanged when \(\mu=k+1\), and falls when \(\mu<k+1\). This concerns the shape of the count distribution, not the probability that an individual response equals its mean.

Worked Example: Comparing Two Covariate Profiles

Consider a Poisson regression with fitted mean \(\hat{\mu}(x)=\exp((\log 3)x)\), where the predictor is \(x\). Compare the probability of zero events at \(x=0\) with the probability of at most 2 events at \(x=1\).

At \(x=0\), the fitted mean is

$$ \hat{\mu}(0)=\exp(0)=1. $$

Therefore the plug-in probability of zero events at that profile is

$$ \widehat P(Y=0\mid x=0)=e^{-1}\approx0.367879. $$

At \(x=1\), the fitted mean is \(\hat{\mu}(1)=\exp(\log 3)=3\). The event “at most 2” includes counts 0, 1, and 2, so

$$ \begin{aligned} \widehat P(Y\leq2\mid x=1) &=e^{-3}\left(1+3+\frac{3^2}{2!}\right)\\ &=8.5e^{-3}\approx0.423190. \end{aligned} $$

These are probabilities for different events at different covariate profiles; they should not be compared as if they were the same event. Each calculation first evaluates the fitted mean at its specified profile and then uses that mean in the Poisson probability formula.

Mean Prediction Is Not an Individual Outcome

The fitted mean \(\hat{\mu}_i\) summarizes the model’s estimated conditional average at a covariate profile. It need not be an integer, even though an observed count must be a nonnegative integer. For example, a fitted mean of 4.5 is a perfectly valid average and defines probabilities for every possible count. It does not predict that an individual will experience 4.5 events.

Likewise, the most probable single count need not equal the mean. The model gives a distribution across possible outcomes; a particular observed response can differ from its conditional mean. To report a predicted probability for an event such as \(Y=0\), \(Y=5\), or \(Y\leq2\), calculate that event’s probability from the fitted mean rather than treating the mean itself as an outcome.

Interpretation: A plug-in probability is the fitted model’s estimated conditional probability for a response event at a specified covariate profile. It describes response variability under the Poisson model. It does not, by itself, quantify uncertainty in the estimated regression coefficients or fitted mean.

That distinction matters when communicating results. “The fitted mean is 4.5 events” describes an estimated average. “The fitted probability of at most 2 events is about 0.174” describes the model’s estimated chance of a particular range for a response. Neither statement guarantees what will happen for a specific individual.

Common Mistake

A common error is to read a fitted mean of 2 as a prediction that the next response will be exactly 2, or to assign probability 1 to that count. This confuses the mean of a distribution with one realized response. Under the Poisson model with mean 2, for example, the probability of exactly 2 is

$$ P(Y=2)=e^{-2}\frac{2^2}{2!}=2e^{-2}\approx0.270671, $$

not 1. The correction is to identify the event of interest, substitute the fitted mean into the Poisson mass function, and sum over the included integer counts if the event is a range. Also keep the interpretation conditional on the specified covariates and remember that plug-in probabilities do not automatically include uncertainty from fitting the model.

Check Your Understanding

Use the Poisson probability mass function and the fitted mean at the stated profile.

  1. If \(\hat{\mu}=1.5\), write the expression for the plug-in probability of exactly 2 events. What event does this probability describe?
  2. For a fitted mean of 3, express the probability of between 1 and 4 events inclusive as a finite sum.
  3. Explain why a fitted mean of 2.7 is valid even though an individual count cannot be 2.7.
  4. State the recurrence relating the probability of count \(k+1\) to the probability of count \(k\), and give its condition on the mean.
  5. What uncertainty is not represented by a plug-in probability calculated using a fitted mean?
Clinical Biostats