Counting rare events
Many counts have no fixed number of trials. Emails arriving in an hour, flaws in a metre of cable, goals in a football match: each can be 0, 1, 2 or more.
The Poisson distribution fits such counts when three things hold. Events come one at a time, independently of each other, at a steady average rate. The rate (lambda) is the average number of events per interval, a count per hour or per metre.
The Poisson pmf
Rule: Poisson distribution
The number of events in an interval where they occur at average rate . We write . Recall (lesson 5.1.2), so .
For , to four decimals:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
|---|---|---|---|---|---|---|---|---|
| 0.1353 | 0.2707 | 0.2707 | 0.1804 | 0.0902 | 0.0361 | 0.0120 | 0.0034 |
The distribution function of lesson 5.2.1 adds these up: , so . The values never reach 0, but they shrink fast: has probability 0.0009.
Why it adds up to 1
The events never overlap, and the list never ends. Together they cover every outcome. So by the third axiom for an endless list of disjoint events (lesson 5.1.1), their probabilities add up to .
By lesson 2.7.2, for every . Multiply by , and they do:
For , the partial sums of are 5, 7.2667 and 7.389 after the terms up to , 5 and 10. They settle on .
Try it
The cell computes the pmf from the formula, then checks it with poisson.pmf. poisson.cdf and poisson.sf give and .
The last lines add up 30 terms of the pmf, and the partial sums of the series for .
The shape
Each probability is the one before times :
While the ratio is above 1 and the bars rise; once they fall. So the most likely count is the whole-number part of . When is a whole number, and tie.
For the ratios are 2, 1, , …, so . For the peak is at 2, with 0.2565. For the first ratio is already , so the bars fall from the start: .
Try it
The first line prints the ratios for to 5. The loop prints, for each , the first five probabilities and the largest one.
For , argmax reports the first of the two tied values, 1.
is the long-run average count, and lesson 5.3.1 makes "average" precise; below, the dashed line sits at .
Set and the interval from 0 to 3, and read . Then move through 2.5, 3 and 3.5 and watch the tallest bar.
Explore
Each bar is the probability of one value. Change the parameters, then set an interval: the shaded bars add up to its probability.
The dashed line is the mean.
- Probability
- P(0 ≤ X ≤ 3) = 0.6472
- Mean
- 3
- Variance
- 3, so the standard deviation is 1.7321
Changing the interval
The rate belongs to an interval length. Events at rate per hour come at rate per hours, so the count over hours is Poisson with parameter .
Rule: Counts over a time t
is the number of events in a stretch of length , with per unit of length. The rate and the length must use the same unit. The second line is .
Emails arrive at 3 an hour on average. Over 20 minutes, hour and , so no email at all has probability . Over a whole hour that falls to ; over two hours, and exactly six emails has probability 0.1606.
is also the chance that the first event comes after . Lesson 5.4.2 turns it into the exponential distribution of waiting times, and case study 5.2.5 counts defaults with the Poisson.
Try it
One hour is the unit, so 20 minutes is t = 1/3. The cell prints the three probabilities above, then five or more emails in one hour: 0.1847.
The Poisson as a limit of the binomial
A Poisson count is like a binomial count with very many trials, each with a tiny chance. Split an hour into short slots, each holding an email with probability . The number of emails is , and the average count stays fixed as grows.
Here is for as the slots get shorter.
| 10 | 100 | 1,000 | 10,000 | Poisson | |
|---|---|---|---|---|---|
| 0.2 | 0.02 | 0.002 | 0.0002 | ||
| 0.3020 | 0.2734 | 0.2709 | 0.2707 | 0.2707 |
Algebra shows where comes from. Write the binomial pmf with and split it into four factors:
The first factor has terms on top, each close to when is large, so it tends to 1. The third tends to , the limit of case study 2.1.5 with the negative rate . The last tends to 1, since stays fixed.
| first factor | ||||
|---|---|---|---|---|
| 10 | 0.9 | 0.1074 | 1.5625 | 0.3020 |
| 100 | 0.99 | 0.1326 | 1.0412 | 0.2734 |
| 1,000 | 0.999 | 0.1351 | 1.004 | 0.2709 |
With and , the middle factor is . The third column approaches , and the last column approaches .
Try it
The loop computes the three factors that depend on , then their product with the middle factor, 2. The last column matches binom.pmf with .
Rule: Poisson approximation
For many trials with a small chance each. It replaces two numbers, and , by one, .
Binomial counts with against the Poisson with . With the two differ by up to 0.0313 at one value; with , by at most 0.0027.
When the approximation is good
What matters is that is small, not only that is large. With fixed, the largest gap between the two pmfs is 0.0313 for , 0.0027 for and 0.0003 for . Each tenfold drop in cuts it about ten times.
With and the approximation fails: the largest gap is 0.0511. The binomial gives , the Poisson with only 0.1251. The Poisson also puts probability 0.0016 on more than 20 events, which 20 trials cannot produce.
Try it
The first loop rebuilds the table of . The second prints the largest gap between the two pmfs, over every from 0 to . The next line shows the failure at , .
The last lines draw 200,000 binomial counts with and , with a fixed seed. In this run the shares of 0 to 4 are within 0.0012 of the Poisson pmf.
Common mistakes
- Match to the interval. Three an hour is one per 20 minutes: use , with in the rate's unit.
- Keep both and . Without them the values do not add up to 1.
- The Poisson has no upper limit; the binomial stops at . That is one reason the approximation fails when is not small.
- Check the conditions. Events that come in bursts, such as calls to a help desk during an outage, are not independent. The Poisson then understates large counts.
- A whole-number has two most likely counts. For , both 1 and 2.
poisson.sf(k, lam)is . For usesf(k - 1, lam).
The Poisson distribution
0 of 12 correct
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
How to type answers
- Powers with
^:x^7,2^(1/3),a^-2. - Multiply with
*or by writing side by side:3x^2,2(x+1). ln(x)is the natural log,log(x, 2)is log base 2,eis Euler's number,sqrt(x)is a square root.sin(x),cos(x)andtan(x)take radians; writepifor π andsin(x)^2for sin²x.- Your first answer to each question is saved: it counts towards your score and brings the question back for review.
- Exact answers like
ln(20)/ln(3)are best. Decimals need about 4 significant figures.
Summary card
- A Poisson count has for , with the average count per interval. It adds up to 1 because .
- Each value is the one before times , so the most likely count is the whole-number part of .
- Over a length , the count is , and .
- as , because . The approximation needs small.