The average number of bacteria per ml water is six. What is the probability of finding less than four bacteria in 1 ml of water?
This is an example of a problem that can be solved using the Poisson probability model. It involves a random variable, X, and it takes positive values. All we know is an expected value (average value), lambda. The probability is expressed as:
In the bacteria problem, s is the total of all numbers less than four, i.e., 0+1+2+3 (P(X=0) + P(X=1) + P(X=2) + P(X=3). In R, it can be estimated as:
exp(-6)*6^0 / factorial(0) + exp(-6)*6^1 / factorial(1) + exp(-6)*6^2 / factorial(2) + exp(-6)*6^3 / factorial(3)
0.1512039
Even better: use the in-built function for the cumulative density function, ppois().
ppois(3,6, lower.tail = TRUE)
Recovery vehicle
There is a stretch of road in the city where, on average, five accidents happen during rush hour. The city council will purchase a recovery vehicle if the probability of having more than five accidents in the rush hour is more than 30%. Should the council go for a recovery vehicle?
Let’s use the R function:
ppois(5, 5, lower.tail = FALSE)
0.38
38% is above the cut-off value, so go for it!
Note that ppois(5, 5, lower.tail = FALSE) = 1 – ppois(5, 5, lower.tail = TRUE)
Birthday on Jan 1st
In a group of 30,000 married couples, what is the probability that at least one couple share their birthday on January 1?
Lambda, or the expected value, is the total number of couples x probability of a pair having the same given birthday. i.e., 30000 x (1/365) x (1/365) = 0.225.
At least 1 = 1 – P(X=0)
1 - dpois(0,0.225)
0.20
or
ppois(0, 0.225, lower.tail = FALSE)