# standard deviation probability of a poission distribution

Just looking for a bit of help on the topic. The question is basically this:

Number of drivers who travel between a particular origin and destination during a designated time period has a Poisson distribution with parameter µ = 20.

What is the probability that the number of drivers will be within two standard deviations of the mean value?

Because it's a Poisson distribution, the expected value and the variance are the same, so mean value = µ = 20.

Because the variance is 20, the standard deviation is the squareroot of 20 = 4.47. Two standard deviations is then 4.47*2 = 8.9

Two standard deviations from the mean is (20-8.9 <= x <= 20+8.9) So we're looking for P(11 <= x <= 29).

I put it in matlab like so poisscdf(29,20) - poisscdf(11,20) and I get 0.9568.... the answer however is .945. I'm just wondering where I went wrong!

$P(11.1\le X\le28.9)=P(12\le X\le28)$ since $X$ is discrete. So what you calculated is not correct.

Also, they might use normal approximation of a Poisson random variable.

$$\frac{X-\lambda}{\sqrt\lambda}\sim N(0,1)$$

• So they way I have computed it is more or less correct though? That's really what i'm wondering... – Podo Nov 16 '16 at 4:23
• wait... it seems you got the ends wrong... – Momo Nov 16 '16 at 4:25
• I tried computing it using 10 instead of 11, but the answer only increased. Which ends should I be using? – Podo Nov 16 '16 at 4:25
• I updated my answer. The idea is that if $X$ is integer and $X\ge11.1$ then $X\ge 12$ – Momo Nov 16 '16 at 4:28
• Ah, obvious! Thank you very much, a well deserved "correct"... in two minutes – Podo Nov 16 '16 at 4:30

If $X \sim Pois(\lambda=20),$ then $$P(12 \le X \le 28) = P(X \le 28) - P(X \le 11) = \sum_{i=12}^{28} e^{-20}20^i/i!.$$

In R statistical software this can be evaluated exactly as follows:

diff(ppois(c(11,28), 20))
## 0.9442797
sum(dpois(12:28, 20))
## 0.9442797


The normal approximation (with continuity correction) gives:

diff(pnorm(c(11.5,28.5), 20, sqrt(20)))
## 0.9426531


Perhaps they used the normal approximation directly, without regard to the fact that the Poisson distribution takes only integer values:

diff(pnorm(c(11.1,28.9), 20, sqrt(20)))
## 0.9534201


I think the purpose of this exercise may be to illustrate that the Empirical Rule works pretty well for the Poisson distribution, putting approximately 95% of its probability within two standard deviations of the mean.

I guess they intended for you to use a normal approximation, unless some kind of software was explicitly mentioned. Below is a plot that compares $Pois(\lambda=20)$ with $Norm(\mu=20, \sigma=\sqrt{20}).$ For the Poisson probability, you want the sum of the heights of the bars between the vertical red dotted lines. For the normal approximation, you want the area under the normal curve between these lines. Your general reasoning is correct, but the details in the calculations are not. I am not sure what inputs Matlab's poisscdf takes. If it accepts real numbers then pass it the exact result of your addition/subtraction. Do not truncate/round.

If you want to use the cdf formula yourself (and I recommend you do, if you are learning) then you need to truncate, but be careful: the formula for the cdf uses the floor function, not the rounding function.

$$P(X \le k) = \frac{\Gamma(\lfloor(k+1)!\rfloor,\lambda)}{\lfloor k! \rfloor}$$

For your example this means: $$P(11.1\le X\le28.9) = \frac{\Gamma(\lfloor(28.9+1)!\rfloor,20)}{\lfloor 28.9! \rfloor} - \frac{\Gamma(\lfloor(11.1+1)!\rfloor,20)}{\lfloor 11.1! \rfloor} = \frac{\Gamma(29!,20)}{28!} - \frac{\Gamma(12!,20)}{11!}$$

Wolfram Alpha gives me a result of $0.94428$. I am not sure if there is a rouding discrepancy between Wolfram and Matlab, or you have rounded Matlab's result incorrectly in the description of the question.