Skip to content

Poisson regression

Model nonnegative event counts with a log-linked mean. Separate rate ratios from exposure offsets, calculate count probabilities and diagnose conditional dispersion.

Poisson regression models a nonnegative integer count using a Poisson distribution whose conditional mean depends on predictors. A quant might use it to estimate how operational-incident frequency changes with a desk's activity, while allowing desks observed for longer to accumulate more incidents. It models event frequency; monetary losses per incident require a separate severity model.
The usual specification is a generalised linear model with a log link. For count YiY_i, predictors xi\mathbf{x}_i and known exposure ei>0e_i>0,
Yi∣xi,ei∼Poisson(μi),log⁡μi=log⁡ei+β0+xi⊤β,μi=eiexp⁡(β0+xi⊤β).\begin{aligned} Y_i\mid\mathbf{x}_i,e_i&\sim\text{Poisson}(\mu_i),\\ \log\mu_i&=\log e_i+\beta_0+\mathbf{x}_i^\top\boldsymbol\beta,\\ \mu_i&=e_i\exp(\beta_0+\mathbf{x}_i^\top\boldsymbol\beta). \end{aligned}
The inverse link makes the expected count positive. The log is the canonical link, though Poisson models can use other links with suitable mean constraints. CMU's GLM notes, §§2.2 and 2.4, derive this connection.

A rate of three does not mean three observations

Consider a specified fictional incident model, with exposure measured in operating hours and one dimensionless predictor xx:
log⁡μ=log⁡e+log⁡2+(log⁡1.5)x.\log\mu=\log e+\log 2+(\log 1.5)x.
At x=0x=0, the expected rate is 2 incidents per hour. At x=1x=1, it is 2×1.5=32\times1.5=3 incidents per hour. A two-hour observation therefore has
μ=2×3=6 expected incidents.\mu=2\times3=6\text{ expected incidents}.

The predictor and exposure do different jobs:

ChangeHeld fixedConsequence
Increase xx from 0 to 1Exposure and other predictorsRate multiplied by 1.51.5
Increase exposure from 1 to 2 hoursPredictors and hourly rateExpected count doubled
The term log⁡e\log e is an offset with coefficient fixed at one. Estimating its coefficient instead would allow a different exposure scaling. Proportional scaling assumes the modelled rate remains applicable over the observation's exposure. statsmodels documents both exposure and offset conventions.

Units matter. Three incidents per hour is 0.050.05 per minute; using 120120 minutes still gives mean 66. A half-hour at the same predictors gives mean 1.51.5. Expected counts need not be integers; realised counts must be 0,1,2,…0,1,2,\ldots. Fitting the raw counts with their exposure preserves that distinction. A noninteger count-per-hour response is not itself a Poisson count.

Specified fictional model: a predictor multiplies a baseline rate of 2 events per hour by 1.5 to give 3 per hour; two hours gives expected count 6. The conditional Poisson distribution has variance 6 and probability 13.77 percent of seven events.
Specified fictional model: a predictor multiplies a baseline rate of 2 events per hour by 1.5 to give 3 per hour; two hours gives expected count 6. The conditional Poisson distribution has variance 6 and probability 13.77 percent of seven events.
Original specified model, not fitted observations. The upper panel separates a covariate rate multiplier from exposure; the lower panel shows that the resulting expected count is not a guaranteed outcome.

Under the conditional Poisson law, mean 66 also implies variance 66 in squared incident-count units. Seven incidents remain possible:

P(Y=7∣x=1,e=2)=e−6677!≈0.13768.\mathbb{P}(Y=7\mid x=1,e=2) =e^{-6}\frac{6^7}{7!}\approx0.13768.
The model assigns seven incidents a 13.77% probability. The expected count describes an average, while the probability distribution describes variation around it. R's Poisson documentation gives the count support, mass function and moments.

Interpret coefficients on the right scale

For a one-unit change in a predictor appearing as an additive linear term, exp⁡(βj)\exp(\beta_j) is the conditional rate ratio, holding other predictors fixed. At fixed exposure, it is also the expected-count ratio. Here β=log⁡1.5≈0.4055\beta=\log1.5\approx0.4055 means a 50% higher rate, not an extra 0.40550.4055 incidents or a 50-percentage-point probability increase. Interactions require evaluating the full predictor change. These are regression associations; the coefficient alone does not identify a causal effect.
For conditionally independent observations, maximum likelihood estimation fits the coefficients by maximising
ℓ(β)=∑i(yilog⁡μi−μi−log⁡(yi!)),\ell(\boldsymbol\beta)=\sum_i\left(y_i\log\mu_i-\mu_i-\log(y_i!)\right),
with an intercept included in the coefficient vector here. The log link transforms the conditional mean, not the observed count. Ordinary least squares on log⁡Yi\log Y_i targets a different quantity and cannot directly accommodate zeros. CMU's estimation section explains likelihood fitting for GLMs.
The owned lesson The Exponential Family and Generalized Linear Models includes a fitted Poisson trade-count example. Its public preview is open; the full lesson requires membership.

Equal mean and variance is a conditional assumption

Poisson regression imposes

Var(Yi∣xi,ei)=E[Yi∣xi,ei]=μi.\text{Var}(Y_i\mid\mathbf{x}_i,e_i)=\mathbb{E}[Y_i\mid\mathbf{x}_i,e_i]=\mu_i.
It does not require the pooled sample variance to match the pooled sample mean. If half a population has conditional Poisson mean 22 and half has mean 66, the pooled mean is 44 and variance is 88. By the law of total variance, the pooled variance contains both average within-group variance and variation between group means: 4+4=84+4=8. Raw heterogeneity can therefore look overdispersed even when each conditional model is Poisson.
Check residual variation after accounting for predictors and exposure. If substantial extra variation remains, negative binomial regression provides an alternative count distribution; quasi-Poisson relaxes the variance to ϕμ\phi\mu without specifying a full count likelihood. It is not enough to change a variance assumption if the mean, exposure or dependence structure is wrong. Zeileis, Kleiber and Jackman, §2.1, compare these approaches; R's family documentation explains the unfixed quasi-Poisson dispersion.
Many zeros are also not a diagnosis. Compare them with probabilities from an appropriate fitted model, including varying means and exposure. A zero-inflated distribution adds a separate point-mass component at zero; a hurdle model separates zero from positive outcomes. Both introduce mechanisms beyond ordinary Poisson variation. Overdispersion or excess zeros alone does not establish which mechanism generated the data. The count-model paper, §§2.2–2.3, sets out that distinction.

Sources

Last updated
  • count data
  • poisson regression
  • log link
  • exposure offset
  • conditional dispersion
← Back to the glossaryBack to top ↑