# Python - Poisson Distribution

A Poisson distribution is a distribution which shows the likely number of times that an event will occur within a pre-determined period of time. It is used for independent events which occur at a constant rate within a given interval of time. The Poisson distribution is a discrete function, meaning that the event can only be measured as occurring or not as occurring, meaning the variable can only be measured in whole numbers.

We use the seaborn python library which has in-built functions to create such probability distribution graphs. Also the scipy package helps is creating the binomial distribution.

```from scipy.stats import poisson
import seaborn as sb

data_binom = poisson.rvs(mu=4, size=10000)
ax = sb.distplot(data_binom,
kde=True,
color='green',
hist_kws={"linewidth": 25,'alpha':1})
ax.set(xlabel='Poisson', ylabel='Frequency')
```

Its output is as follows −

## Useful Video Courses

Video

#### Python Online Training

187 Lectures 17.5 hours

Video

#### Python Essentials Online Training

55 Lectures 8 hours

Video

#### Learn Python Programming in 100 Easy Steps

136 Lectures 11 hours

Video

#### Python with Data Science

Best Seller

75 Lectures 13 hours

Video

#### Python 3 from scratch to become a developer in demand

Best Seller

70 Lectures 8.5 hours

Video

#### Python Data Science basics with Numpy, Pandas and Matplotlib

Most Popular

63 Lectures 6 hours