Poisson Regression › Visualizing Poisson Regression
Machine Learning from ScratchAll chapters Poisson Regression › Visualizing Poisson RegressionOne section · Sections in this chapter3 / 8 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
In the following visualizations, the model captures the general exponential trend in the data: as the predictor increases, the expected count rises rapidly, consistent with the log-link function shown in the third plot below. Most observed points cluster around the fitted curve, indicating that the model describes the main pattern in the data well.
However, there is some scatter around the curve, especially at higher predictor values, where the observed counts show more variability than the model predicts. This is typical for count data, as real-world data often exhibit overdispersion (variance greater than the mean), which the standard Poisson model does not account for. Despite this, the overall fit is reasonable.the model successfully captures the non-linear, non-negative relationship between the predictor and the expected count, and the exponential shape of the fitted curve matches the theoretical expectation for Poisson regression.
The standard Poisson regression model assumes that the variance equals the mean (equidispersion). However, real-world count data often violates this assumption, showing overdispersion where the variance exceeds the mean. This can lead to underestimated standard errors and overly optimistic p-values. When overdispersion is detected through diagnostic tests, consider alternative models like negative binomial regression or zero-inflated Poisson models that can handle this common issue.






The final plot below demonstrates how to interpret Poisson regression coefficients in terms of rate ratios, which describe the multiplicative change in the expected count for a one-unit increase in a predictor. In Poisson regression, the model predicts the logarithm of the expected count as a linear function of the predictors:
where:
- is the expected count (the mean parameter of the Poisson distribution)
- is the intercept coefficient
- are the coefficients for each predictor
- are the predictor variables
To understand the effect of a predictor, we exponentiate its coefficient, , which gives the rate ratio.
For example, if a coefficient , then:
This means that for each one-unit increase in the predictor, the expected count is multiplied by 1.65, or increases by 65%:
This happens because the log link function in the model means that a one-unit increase in the predictor adds 0.5 to the log of the expected count, so the expected count itself is scaled by .
Similarly, if , then:
This means the expected count is multiplied by 0.61, or decreases by 39%:
In other words, the expected count is 39% lower than it would be if the predictor had not increased.
This rate ratio interpretation is a key feature of Poisson regression: it allows us to express the effect of predictors as simple multiplicative changes in the expected count, making the results easy to communicate and understand in practical terms.