Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Poisson Regression Analysis: Formula, Interpretation, Example and Code

Poisson regression analysis for count data: formula, worked example, IRR interpretation, overdispersion checks, APA reporting and R/Python code.

Written and maintained by CASRAI Editorial Board

Last updated

Poisson regression analysis models a count outcome (0, 1, 2, …) as a function of predictors by assuming the count follows a Poisson distribution whose mean depends on those predictors through a log link. Researchers use it for events such as clinic visits, infections, publications or days absent. After reading this page you should be able to fit the model, convert coefficients to incidence rate ratios, check overdispersion and report the result.

Definition in one paragraph

Poisson regression is a generalized linear model for count data. In the UCLA OARC description, it models “the log of the expected count as a function of the predictor variables” (UCLA OARC, Poisson Regression | Stata Annotated Output, read 2026-11-07). It is the default choice when the outcome is a non-negative integer count, and it belongs to the same family as generalized linear mixed models, of which it is the fixed-effects special case with a Poisson response. For the wider regression toolkit see regression analysis.

Poisson regression formula and symbols

For observation i with predictors xi1, …, xik:

Yi ~ Poisson(μi),   ln(μi) = β0 + β1xi1 + … + βkxik

  • Yi: the observed count for observation i.
  • μi: the expected count, E(Yi). In a Poisson distribution the variance also equals μi.
  • ln: the natural logarithm, the log link. It is the default link for the poisson family in R (R documentation for family, read 2026-11-07), and it keeps predicted counts positive.
  • β0: the intercept, the log expected count when all predictors are 0.
  • βj: the change in the log expected count for a one-unit increase in xj, other predictors held fixed.

Equivalently, μi = exp(β0 + β1xi1 + …). Exponentiating a coefficient gives the incidence rate ratio (IRR) (see incidence rate ratio), exp(βj). Parameters are estimated by maximum likelihood.

Poisson regression with exposure (offset)

When observations are followed for different lengths of time or cover different population sizes, model a rate instead of a raw count by adding ln(ti) to the right-hand side with its coefficient fixed at 1: ln(μi) = ln(ti) + β0 + β1xi1 + …. This term is called an offset or exposure. UCLA OARC notes that the plain model assumes the same follow-up time for everyone and that the estimates are biased otherwise, in which case the exposure (offset) option should carry the follow-up length.

Worked example with the arithmetic shown

Illustrative data constructed for this page, not from a real study. Suppose eight patients are observed for the same period, and the outcome is the number of clinic visits. Four patients are in group 0 (reference) and four in group 1 (x = 1).

Group Counts Sum Mean
0 (x = 0) 2, 3, 1, 4 10 2.5
1 (x = 1) 5, 6, 4, 7 22 5.5

With a single binary predictor, the maximum-likelihood fitted mean for each group equals its sample mean, so the coefficients can be done by hand:

  1. β0 = ln(2.5) = 0.9163 (log expected count in group 0).
  2. β1 = ln(5.5) − ln(2.5) = ln(2.2) = 0.7885.
  3. IRR = exp(0.7885) = 2.2, which is 5.5 / 2.5.
  4. Standard error of β1 = √(1/10 + 1/22) = √0.14545 = 0.3814 (the reciprocal of each group’s total count).
  5. Wald z = 0.7885 / 0.3814 = 2.07, two-sided p = 0.039.
  6. 95% CI for β1: 0.7885 ± 1.96 × 0.3814 = 0.041 to 1.536, so the CI for the IRR is exp(0.041) to exp(1.536) = 1.04 to 4.65.

The same fit in statsmodels (GLM, Poisson family) returns β0 = 0.9163, β1 = 0.7885, SE = 0.3814 and a likelihood-ratio χ²(1) = 4.61 against the intercept-only model (p = 0.032). The Wald and likelihood-ratio tests are close but not identical, which is normal in small samples.

Poisson regression interpretation

Read each exponentiated coefficient as a multiplicative change in the expected count (or rate). The percent change is (IRR − 1) × 100.

Quantity Reading Example
βj > 0, IRR > 1 Expected count rises as xj rises IRR 2.2 above: (2.2 − 1) × 100 = 120% higher expected count in group 1
βj = 0, IRR = 1 No association with the expected count A 95% CI that contains 1 is consistent with no effect
βj < 0, IRR < 1 Expected count falls as xj rises IRR 0.9965 per unit: about 0.35% lower per one-unit increase
Continuous predictor IRR applies per one-unit increase and compounds over larger changes IRRk for a k-unit increase

UCLA OARC’s annotated example (316 students, outcome days absent) reports an IRR of 1.4932 for female students and describes the rate as “1.493 times greater”; it also reports a McFadden pseudo R² of 0.0536 and advises caution when interpreting pseudo R². The odds-ratio analogue for binary outcomes is covered under odds ratio; an IRR compares rates, not odds.

Assumptions, overdispersion and common mistakes

  • Count outcome: non-negative integers. Do not use it for continuous or percentage outcomes.
  • Mean equals variance (equidispersion): the Poisson family fixes the dispersion at 1. UCLA OARC states the model assumes the outcome is not over-dispersed and does not have an excessive number of zeros, and names negative binomial and zero-inflated models as alternatives.
  • Independent observations: repeated measures or clustered counts need random effects or robust errors (see GLMM).
  • Log-linear form: predictors act multiplicatively on the expected count.
  • Same exposure, or an offset: forgetting the offset when follow-up differs is a frequent mistake.

Checking overdispersion

Compute the Pearson χ² statistic divided by the residual degrees of freedom. Values near 1 are consistent with the Poisson assumption; values well above 1 indicate overdispersion and standard errors that are too small. In the worked example, Pearson χ² = 2.91 on 6 residual degrees of freedom gives 0.48, so there is no sign of overdispersion (if anything, slight underdispersion in this tiny sample). The R documentation notes that quasipoisson does not fix the dispersion at one and so can model overdispersion. For the negative binomial option see negative binomial regression for overdispersion, and for software syntax Poisson and negative binomial regression in Stata. Choosing between quasi-Poisson and negative binomial is the subject of quasi-Poisson vs negative binomial regression.

How to report Poisson regression results (APA example)

Report the coefficient or IRR, its confidence interval, the test statistic and p, the overdispersion check and the model fit. Pattern, using the worked example:

A Poisson regression showed that group 1 had a higher expected number of clinic visits than group 0, IRR = 2.20, 95% CI [1.04, 4.65], Wald z = 2.07, p = .039. The Pearson χ²/df ratio was 0.48, indicating no evidence of overdispersion.

State the software, the link function and whether an offset was used.

Poisson regression in R, Python and Excel

R

y <- c(2,3,1,4,5,6,4,7)
x <- c(0,0,0,0,1,1,1,1)
fit <- glm(y ~ x, family = poisson(link = "log"))
summary(fit)
exp(coef(fit))                       # IRRs
exp(confint.default(fit))            # Wald CIs
sum(residuals(fit, "pearson")^2) / fit$df.residual   # dispersion
# with exposure: glm(y ~ x + offset(log(t)), family = poisson)

Python (statsmodels)

import numpy as np, statsmodels.api as sm
y = np.array([2,3,1,4,5,6,4,7]); x = np.array([0]*4 + [1]*4)
fit = sm.GLM(y, sm.add_constant(x), family=sm.families.Poisson()).fit()
print(fit.summary())
print(np.exp(fit.params))               # IRRs
print(fit.pearson_chi2 / fit.df_resid)  # dispersion
# with exposure: sm.GLM(y, X, family=..., offset=np.log(t))

Excel

For a single binary predictor you can reproduce the worked example with worksheet functions: =LN(SUM(group1)/SUM(group0)) gives β1, =EXP(that) gives the IRR, and =SQRT(1/SUM(group0)+1/SUM(group1)) gives its standard error. Models with several predictors need R, Python or another statistics package.

Frequently asked questions

What is Poisson regression analysis used for?

Modelling count outcomes, such as number of events, visits or absences, as a function of predictors, usually reporting incidence rate ratios.

How do I interpret a Poisson regression coefficient?

A coefficient is the change in the log expected count per one-unit increase in the predictor. Exponentiate it for the IRR; the percent change is (IRR − 1) × 100.

What if my data are overdispersed?

If Pearson χ²/df is well above 1, use quasi-Poisson or negative binomial regression instead; see the comparison linked above.

Is Poisson regression the same as logistic regression?

No. Logistic regression models a binary outcome with a logit link and yields odds ratios; Poisson regression models counts with a log link and yields rate ratios.

Sources

  • UCLA Advanced Research Computing, OARC Statistical Methods and Data Analytics. Poisson Regression | Stata Annotated Output. https://stats.oarc.ucla.edu/stata/output/poisson-regression/ (read 2026-11-07).
  • R Core Team. Family objects for models (stats::family), R documentation. https://stat.ethz.ch/R-manual/R-devel/library/stats/html/family.html (read 2026-11-07).
  • Worked-example numbers were computed for this page and cross-checked with statsmodels 0.15.0.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Poisson Regression Analysis: Formula, Interpretation, Example and Code

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →