Exercise

# Computing expected number of counts

In the previous exercises you have computed the mean and variance of the crab data and you determined they are not equal. In this exercise you will practice another analysis for overdispersion by using the already computed mean and calculating the **expected number of counts** per certain value of counts, for example zero counts. In other words, what count of zero satellites should we expect in the sample given the computed sample mean.

Recall figure from the `crab`

dataset where you can notice a large number of zero counts.

Recall that to compute the expected number of counts given the parameter you can use the defined Poisson distribution, given by

$$ P(y)=\frac{\lambda^ye^{-\lambda}}{y!} $$

The `crab`

dataset and the computed mean `sat_mean`

is preloaded in the workspace.

Instructions

**100 XP**

- Using computed mean
`sat_mean`

and the zero counts \(y = 0\) compute the expected number of zero counts. Use`math`

`factorial()`

. - Compute the number of observations with zero counts in the
`sat`

variable using the`sum()`

and the total number of observations in the sample using the`len()`

functions. - Print the ratio of actual zero count observations and total number of observations.