Tutorials › Econometrics (Graduate) › Poisson Regression for Conditional Count Means

Count and Fractional Responses · Tutorial 503 of 952

Poisson Regression for Conditional Count Means

Learn to specify a log-linked conditional count mean, identify the assumptions of the full Poisson model, and calculate fitted means for concrete covariate profiles.

Intermediate 10 min read

What You'll Learn

  • Specify a log-linked conditional mean for a nonnegative integer outcome
  • Distinguish a Poisson conditional-mean model from a full Poisson distributional assumption
  • State the conditional mean, variance, support, and independence assumptions
  • Calculate fitted conditional means from estimated coefficients and covariate profiles
  • Recognize why a fitted mean can be fractional even when observed outcomes are counts
  • Avoid treating a modeled mean as an individual outcome or as evidence of causation

Why Model a Conditional Count Mean?

Count outcomes arise when the recorded quantity is the number of events in a defined unit: for example, clinic visits per patient during a month, defects per batch, or claims per policyholder during a year. A count is nonnegative and integer-valued, but its expected value may depend on observed characteristics. Poisson regression gives a structured way to describe that dependence while ensuring that the modeled conditional mean is positive.

The central object is not a single overall average. It is the expected count for observations with a specified covariate profile. The log link expresses that mean as the exponential of a linear predictor. This tutorial focuses on defining that model, stating what the Poisson distribution adds, and calculating fitted means. It does not require the fitted mean to equal any observed count for an individual.

Definition: Let \(Y_i\) be a count outcome for observation \(i\), and let \(\mathbf{x}_i\) be its vector of covariates, including a constant if the model has an intercept. A log-linked Poisson conditional-mean model specifies $$ \mu_i = E(Y_i\mid \mathbf{x}_i), \qquad \log(\mu_i)=\mathbf{x}_i^\top\boldsymbol{\beta}, \qquad \mu_i=\exp(\mathbf{x}_i^\top\boldsymbol{\beta}), $$ where \(\boldsymbol{\beta}\) is a vector of parameters. Since the exponential is positive, this specification implies \(\mu_i>0\) for every finite linear predictor.

The covariates may be continuous, categorical, or constructed from transformations and interactions. The vector \(\mathbf{x}_i\) and parameter vector \(\boldsymbol{\beta}\) must have matching dimensions, so their product \(\mathbf{x}_i^\top\boldsymbol{\beta}\) is a scalar. A categorical predictor is represented through indicator variables with an explicitly chosen reference category. Model form should be chosen to represent the conditional mean relation of interest; the log link by itself does not determine which covariates or interactions belong in the predictor.

The Mean Model and the Full Poisson Model

A conditional-mean specification and a complete probability model are related but not identical. The equation \(E(Y_i\mid\mathbf{x}_i)=\exp(\mathbf{x}_i^\top\boldsymbol{\beta})\) specifies the mean. To state that \(Y_i\) has a Poisson distribution conditional on its covariates is a stronger assumption: it determines the conditional probabilities of every possible count as well as the mean.

Full Poisson regression model: Conditional on \(\mathbf{x}_i\), the outcome has a Poisson distribution with parameter \(\mu_i=\exp(\mathbf{x}_i^\top\boldsymbol{\beta})\): $$ P(Y_i=y\mid\mathbf{x}_i) = \frac{\exp(-\mu_i)\mu_i^y}{y!}, \qquad y=0,1,2,\ldots. $$ Under this full distributional assumption, $$ E(Y_i\mid\mathbf{x}_i)=\mu_i, \qquad \operatorname{Var}(Y_i\mid\mathbf{x}_i)=\mu_i. $$ Thus, conditional variance equals conditional mean, a property called equidispersion.

The support condition \(Y_i\in\{0,1,2,\ldots\}\) is part of the count-data setup. The full Poisson model additionally imposes a particular conditional distribution and equidispersion. By contrast, a log-linked conditional-mean model alone does not imply that the conditional variance equals the mean, or that the conditional probabilities follow the Poisson formula. Keeping these claims distinct matters when describing assumptions and interpreting a fitted model.

For the usual likelihood formulation, observations are assumed to be conditionally independent given their covariates, and each conditional distribution is Poisson with its specified mean. Conditional independence means that, once the covariates are given, the joint probability of the outcomes factors into their separate conditional probabilities. This assumption can be questionable when observations are clustered or repeated on the same unit. The conditional-mean equation can still be stated in such settings, but the dependence structure must not be ignored when making inferential claims.

Why the Poisson Mean and Variance Match

The equality of the conditional mean and variance follows from the Poisson probability formula, rather than being a separate result to assume once that formula has been specified. For a Poisson random variable \(Y\) with parameter \(\mu\), its probability at \(y\) is \(\exp(-\mu)\mu^y/y!\). The first moment is \(\mu\), and the second factorial moment is \(\mu^2\).

$$ \begin{aligned} E(Y) &= \sum_{y=1}^{\infty} y\,\frac{\exp(-\mu)\mu^y}{y!} \\ &= \mu\exp(-\mu)\sum_{y=1}^{\infty}\frac{\mu^{y-1}}{(y-1)!} = \mu,\\[4pt] E\{Y(Y-1)\} &= \sum_{y=2}^{\infty} y(y-1)\frac{\exp(-\mu)\mu^y}{y!}\\ &= \mu^2\exp(-\mu)\sum_{y=2}^{\infty}\frac{\mu^{y-2}}{(y-2)!} = \mu^2. \end{aligned} $$

In both lines, re-indexing the sum gives the exponential series \(\sum_{k=0}^{\infty}\mu^k/k!=\exp(\mu)\). Since \(Y^2=Y(Y-1)+Y\), it follows that \(E(Y^2)=\mu^2+\mu\). Therefore,

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

Applying this result conditionally, with \(\mu=\mu_i\), gives the conditional mean and variance stated above. The derivation depends on the full Poisson distribution. It cannot be used to infer equal conditional mean and variance from the log-linked mean equation alone.

Calculating Fitted Conditional Means

Once a model has estimated coefficients, write them as \(\hat{\boldsymbol{\beta}}\). For a specified profile \(\mathbf{x}_*\), the fitted conditional mean is

$$ \hat{\mu}_* = \exp(\mathbf{x}_*^\top\hat{\boldsymbol{\beta}}). $$

The calculation has two parts: form the linear predictor by multiplying each covariate value by its corresponding estimated coefficient and adding the terms, then exponentiate the result. The result is a fitted expected count conditional on the profile, not a prediction that the observed count must equal that value.

Worked Example: Monthly Clinic Visits

Suppose a hypothetical analysis models the number of clinic visits per patient in one month. The covariates are age in years, an indicator for insurance coverage (1 if insured, 0 otherwise), and an indicator for a severe condition (1 if present, 0 otherwise). Suppose the estimated linear predictor is

$$ \widehat{\log(\mu_i)} =0.20+0.025(\text{age}_i)-0.30(\text{insured}_i) +0.40(\text{severe}_i). $$

For an insured 40-year-old without the severe condition, the profile has age \(40\), insured \(1\), and severe \(0\). Substitution gives

$$ \hat{\mu} =\exp\{0.20+0.025(40)-0.30(1)+0.40(0)\} =\exp(0.90) \approx 2.460. $$

The fitted conditional mean is about 2.460 visits per patient-month for this covariate profile. A count observed for one patient must be an integer, but an expected count across comparable patients need not be. This calculation gives a model-based mean; it does not establish that the covariates cause differences in visits.

Worked Example: Computing Means for Several Profiles

Consider a hypothetical model for the number of service requests received by a site in one week. Let \(s\) be a numerical workload score, and let \(E\) indicate that the site is in the East region, with the West region as the reference category. Suppose the fitted model is

$$ \widehat{\log(\mu_i)} =-0.40+0.10s_i+0.25E_i. $$

For a West-region site with score \(s=3\), \(E=0\), so

$$ \hat{\mu}_{\text{West},\,s=3} =\exp\{-0.40+0.10(3)+0.25(0)\} =\exp(-0.10) \approx 0.9048 $$

service requests per week. For a West-region site with score \(s=5\), the calculation is

$$ \hat{\mu}_{\text{West},\,s=5} =\exp\{-0.40+0.10(5)+0.25(0)\} =\exp(0.10) \approx 1.105 $$

service requests per week. For an East-region site with score \(s=5\), \(E=1\), and therefore

$$ \hat{\mu}_{\text{East},\,s=5} =\exp\{-0.40+0.10(5)+0.25(1)\} =\exp(0.35) \approx 1.419 $$

service requests per week. In each case the covariate profile is substituted into the same fitted equation before exponentiation. These values are conditional means under the stated model, not observed weekly counts.

Worked Example: A Model With an Interaction

Suppose a hypothetical model describes the number of equipment faults per machine-week using operating hours \(h\) and an indicator \(D\) for an upgraded component. An interaction allows the fitted linear predictor to include a product of operating hours and component status:

$$ \widehat{\log(\mu_i)} =-0.20+0.08h_i+0.30D_i-0.02(h_iD_i). $$

For a machine operating \(5\) hours per week without the upgraded component, \(D=0\), giving

$$ \hat{\mu}_{h=5,\,D=0} =\exp\{-0.20+0.08(5)+0.30(0)-0.02(5)(0)\} =\exp(0.20) \approx 1.221 $$

faults per machine-week. For a machine operating \(5\) hours per week with the upgraded component, \(D=1\), so

$$ \hat{\mu}_{h=5,\,D=1} =\exp\{-0.20+0.08(5)+0.30(1)-0.02(5)(1)\} =\exp(0.40) \approx 1.492 $$

faults per machine-week. At \(10\) operating hours with the upgraded component, the fitted mean is

$$ \hat{\mu}_{h=10,\,D=1} =\exp\{-0.20+0.08(10)+0.30(1)-0.02(10)(1)\} =\exp(0.70) \approx 2.014 $$

faults per machine-week. The interaction term is included in the multiplication for every profile; omitting it would calculate a mean from a different model. These fitted values do not by themselves provide a causal comparison between component types.

Assumptions, Scope, and a Common Pitfall

Before using a Poisson regression specification, identify which assumptions are intended. A sound statement should distinguish the outcome's support, the form of the conditional mean, and any additional distributional assumptions. Under the full Poisson model, the conditional variance equals the conditional mean and the conditional outcome follows the specified Poisson probabilities. Under only the log-linked mean restriction, the mean is specified but the variance and remaining distribution are not fixed by that equation.

The fitted mean is always positive for a finite linear predictor. The full Poisson distribution assigns probabilities to all nonnegative integer counts, including zero. However, the log link does not guarantee that every feature of observed data will be well represented by the full Poisson distribution. For example, conditional variation may differ from the mean, or observations may be dependent. Those are reasons to scrutinize model assumptions rather than to reinterpret the fitted mean as an observed count.

  • Pitfall: treating the fitted mean as an individual outcome. The reasoning “the model predicts 2.460 visits, so this patient will have 2.460 visits” confuses an expectation with a realized count. The correction is to describe 2.460 as the fitted conditional expected count for that covariate profile; an individual realized count remains an integer.
  • Pitfall: inferring equidispersion from the link. The reasoning “the model uses a log link, so its conditional variance must equal its mean” is incorrect. The log link specifies the conditional mean form. Equality of conditional variance and mean follows only when the full Poisson distribution is assumed.
  • Pitfall: treating a fitted association as causal. A model's conditional mean relation does not alone establish that changing a covariate would change the count. Causal interpretation requires an appropriate research design and additional assumptions.

The practical value of the specification is that it represents positive conditional means while allowing them to vary systematically across covariate profiles. Calculating a fitted mean is straightforward once the profile, coefficient estimates, and model terms are all stated. Careful reporting makes clear whether a claim concerns that mean alone or the stronger full Poisson distributional model.

Check Your Understanding

Answer each question using the distinction between the conditional-mean equation and the full Poisson model.

  1. Write the log-linked conditional-mean specification for a count outcome with covariate vector \(\mathbf{x}_i\).
  2. Under the full Poisson model, what are the conditional mean and variance of \(Y_i\)? Which distributional assumption gives this equality?
  3. A fitted linear predictor for a profile is \(0.50\). Calculate its fitted conditional mean and state what that number represents.
  4. Why can a fitted conditional mean be non-integer even though the observed outcome is a count?
  5. Does specifying a log link alone imply conditional independence or equality of conditional mean and variance? Explain.
Clinical Biostats