From a Fitted Mean to a Future Count
A fitted conditional mean answers a question about the average count for a covariate profile. A future observation is different: even if its conditional mean is known, the realized count can fall below or above that mean. To predict a future count under a Poisson model, we use the fitted mean to specify a probability distribution over all nonnegative integers.
This tutorial uses the fitted mean as fixed when calculating the distribution. The resulting probabilities describe Poisson outcome variation conditional on the fitted model and the specified covariates. They do not yet incorporate uncertainty from estimating the model parameters; that is a separate source of uncertainty.
A fitted mean need not be an integer. For example, a fitted mean of \(4.2\) still defines probabilities for counts \(0,1,2,\ldots\); it does not predict that the count will equal \(4.2\). A single fitted mean also does not determine a single “most likely” count without examining the probabilities. The probability of any specified count, a range of counts, or a tail can be calculated from the distribution.
Calculating Poisson Probabilities
Write \(p_k=P(Y_{\mathrm{new}}=k\mid\hat{\mu})\), and let \(F(k)=P(Y_{\mathrm{new}}\leq k\mid\hat{\mu})\). The Poisson probability formula gives a convenient recurrence for computing the probabilities in order.
To derive the recurrence, divide the probability at \(k+1\) by the probability at \(k\):
Thus, once \(p_0\) is known, each successive probability is obtained by multiplication. Adding the probabilities from zero through \(k\) gives \(F(k)\). Since the event \(Y_{\mathrm{new}}\geq k\) is the complement of \(Y_{\mathrm{new}}\leq k-1\), its probability is \(1-F(k-1)\). These formulas are especially useful for checking that a requested event uses the correct endpoint: “at least \(k\)” starts at \(k\), whereas \(F(k)\) includes \(k\).
Worked Example: A Probability for a Fitted Mean of Three
Suppose a fitted log-mean model gives \(\hat{\mu}=3\) at a specified covariate profile. Find the probability that the future count is at least 3.
First calculate \(p_0=e^{-3}\approx0.0497871\). The recurrence gives \(p_1=3p_0\approx0.1493612\) and \(p_2=(3/2)p_1\approx0.2240418\). Therefore,
The probability is about \(57.7\%\). The calculation is not \(P(Y_{\mathrm{new}}>3)\): that different event excludes a count of exactly 3.
Prediction Quantiles and Discrete Intervals
A prediction quantile identifies a count threshold in the cumulative distribution. For \(0<u<1\), define the Poisson quantile by \(Q(u)=\min\{k\in\{0,1,2,\ldots\}:F(k)\geq u\}\). The minimum matters: the quantile is the first integer at which the cumulative probability reaches or passes \(u\). Because counts are discrete, it will generally not be possible to make \(F(Q(u))\) equal exactly to \(u\).
Proof. By the definition of \(Q(u)\), \(F(Q(u))\geq u\). Also, for \(Q(u)>0\), minimality implies \(F(Q(u)-1)<u\); if \(Q(u)=0\), the convention \(F(-1)=0\) gives the same strict inequality because \(u>0\). Applying these facts to \(L=Q(\alpha/2)\) and \(U=Q(1-\alpha/2)\) gives \(F(U)\geq1-\alpha/2\) and \(F(L-1)<\alpha/2\). Hence
In particular, the coverage is at least the nominal level. The strict inequality here follows from the quantile definition; discreteness explains why the coverage need not equal the nominal level. \(\square\)
Worked Example: A 95% Prediction Interval at Mean Four
Let \(\hat{\mu}=4\). Starting with \(p_0=e^{-4}\approx0.018315639\) and applying \(p_{k+1}=4p_k/(k+1)\) gives the cumulative probabilities \(F(0)\approx0.018316\), \(F(1)\approx0.091578\), \(F(2)\approx0.238103\), \(F(3)\approx0.433470\), \(F(4)\approx0.628837\), \(F(5)\approx0.785130\), \(F(6)\approx0.889326\), \(F(7)\approx0.948866\), and \(F(8)\approx0.978637\).
For a central 95% interval, the lower quantile is \(Q(0.025)=1\): \(F(0)<0.025\), while \(F(1)>0.025\). The upper quantile is \(Q(0.975)=8\): \(F(7)<0.975\), while \(F(8)>0.975\). Therefore, the equal-tail prediction interval is \([1,8]\).
Its actual coverage is
Thus this nominal 95% interval covers about \(96.0\%\) of the plug-in Poisson distribution. The excess over 95% is a consequence of choosing integer endpoints; it is not a calculation error.
Worked Example: A 95% Prediction Interval at Mean One
Let \(\hat{\mu}=1\). The probabilities begin with \(p_0=e^{-1}\approx0.3678794\), and the recurrence gives \(p_1\approx0.3678794\), \(p_2\approx0.1839397\), and \(p_3\approx0.0613132\). Consequently,
Since \(F(0)>0.025\), \(Q(0.025)=0\). Since \(F(2)<0.975\) but \(F(3)>0.975\), \(Q(0.975)=3\). The central 95% prediction interval is therefore \([0,3]\), with actual coverage \(F(3)-F(-1)\approx0.9810118\), or about \(98.1\%\). At a small mean, even the lower endpoint can be zero, and the discrete interval can be noticeably more conservative than its nominal level.
Prediction Intervals Are Not Confidence Intervals for Means
A confidence interval for the conditional mean at a covariate profile targets \(\mu(x)\), the model’s expected count at that profile. Its uncertainty concerns what the fitted data tell us about that mean. A prediction interval targets a future random count \(Y_{\mathrm{new}}\), which can vary even if \(\mu(x)\) were known exactly. The Poisson distribution used here describes that outcome variation after substituting the fitted mean.
The two intervals therefore answer different questions and need not have similar endpoints. A confidence interval for a mean can have non-integer endpoints because a mean is not restricted to integer values. A prediction interval for a count uses integer endpoints because the future count can only be a nonnegative integer. Also, the plug-in interval in this tutorial treats the fitted mean as fixed: it does not combine Poisson outcome variation with uncertainty in the estimated model parameters.
Common Mistakes and Practical Checks
- Reporting the fitted mean as the future count. A mean such as \(4\) is not a promise that the next count will be 4. Use the probability distribution to describe possible outcomes.
- Using the wrong tail endpoint. For \(P(Y_{\mathrm{new}}\geq k)\), subtract \(F(k-1)\) from 1. Subtracting \(F(k)\) instead calculates \(P(Y_{\mathrm{new}}>k)\).
- Expecting exact nominal coverage. Integer quantiles can make an equal-tail interval cover more than its nominal level. Report the endpoints and, when useful, the actual coverage.
- Calling a prediction interval a confidence interval for the mean. The former concerns a future outcome; the latter concerns a model mean. Naming the target prevents the two interpretations from being conflated.
For a numerical check, probabilities should be nonnegative and cumulative probabilities should not decrease as \(k\) increases. The recurrence and cumulative sums provide a transparent way to verify the quantile boundaries. In particular, check that \(F(L-1)<\alpha/2\leq F(L)\) and \(F(U-1)<1-\alpha/2\leq F(U)\), allowing the usual boundary convention \(F(-1)=0\).
Check Your Understanding
Use the plug-in Poisson distribution at the stated fitted mean for each question.
- At \(\hat{\mu}=2\), write the formula for \(P(Y_{\mathrm{new}}\geq4\mid\hat{\mu})\) in terms of a cumulative probability.
- Explain why a fitted conditional mean of \(3.6\) does not imply that the future count will equal 3.6.
- For a central interval based on Poisson quantiles, what inequalities should be checked to verify the lower endpoint \(L\) and upper endpoint \(U\)?
- Why can a nominal 90% equal-tail prediction interval have actual plug-in coverage above 90%?
- State the difference between the target of a confidence interval for a conditional mean and the target of a prediction interval for a future count.