Exercise

# Poisson random variable

The `numpy.random`

module also has a number of useful probability distributions for both discrete and continuous random variables. In this exercise, you will learn how to draw samples from a probability distribution.

In particular, you will draw samples from a very important discrete probability distribution, the Poisson distribution, which is typically used for modeling the average rate at which events occur.

Following the exercise, you should be able to apply these steps to any of the probability distributions found in `numpy.random`

. In addition, you will also see how the sample mean changes as we draw more samples from a distribution.

Instructions

**100 XP**

- Using
`np.random.poisson()`

draw samples from a Poisson distribution using`lam`

(lambda) and`size_1`

. - Repeat the above step, but this time use
`size_2`

. - For each of the above samples, calculate the absolute difference between their mean and lambda using
`np.mean()`

and`abs()`

.