# Poisson Regression: The Robust Extension of Linear Regression

### Understanding the modeling limitations of linear regression.

Linear regression comes with its own set of challenges/assumptions.

For instance:

After modeling, the output can be negative for some inputs.

But this may not make sense at times — predicting the number of goals scored, number of calls received, etc.

Thus, it is clear that it cannot model count (or discrete) data.

Furthermore, in linear regression:

Residuals are expected to be normally distributed around the mean.

Hence, the outcomes on either side of the mean (m-x, m+x) are equally likely.

For instance:

if the expected number (mean) of calls received is 1...

...then, according to linear regression, receiving 3 calls (1+2) is just as likely as receiving -1 (1-2) calls. (This relates to the concept of prediction intervals which I discussed in one of my previous posts here: Prediction intervals.)

But in this case, a negative prediction does not make any sense.

Thus, if the above assumptions don't hold, linear regression won't help.

Instead, what you need is Poisson regression (Sklearn docs).

Poisson regression:

is more suitable if your response (or outcome) is count-based.

assumes that the response comes from a Poisson distribution.

It is a type of generalized linear model (GLM) that is used to model count data.

It works by estimating a Poisson distribution parameter (*λ*), which is directly linked to the expected number of events in a given interval.

Contrary to linear regression, in Poisson regression:

Residuals may follow an asymmetric distribution around the mean (λ).

Hence, outcomes on either side of the mean (λ-x, λ+x) are NOT equally likely.

For instance:

if the expected number (mean) of calls received is 1...

...then, according to Poisson regression, it is possible to receive 3 (1+2) calls, but it is impossible to receive -1 (1-2) calls.

This is because its outcome is also non-negative.

The regression fit is mathematically defined as follows:

The effectiveness of Poisson regression is evident from the image below:

👉 Can you tell some limitations of Poisson regression?

**👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.**

👉 Read what others are saying about this post on LinkedIn and Twitter.

**👉 Tell the world what makes this newsletter special for you by leaving a review here :)**

👉 If you love reading this newsletter, feel free to share it with friends!

👉 Sponsor the Daily Dose of Data Science Newsletter. More info here: **Sponsorship details**.

Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

Well done, mate! 👏

I would say the following are some limitations of poisson regression:

Nonlinearity: since it's a linear model, the model will not be able to apply to nonlinear relations or data.

Sensitivity: the model is so sensitive to the outliers that if the data set is overdispersed, poisson regression is not the perfect choice.

Difficulty of interpretation.