Example

The number of people that show up at a bus stop is poisson with a mean of 2.5 per hour. If watching the bus stop for 4 hours, what is the probability that 3 or fewer people show up for the whole time?

ppois(3,lambda=2.5*4)
## [1] 0.01033605

Example 2

We flip a coin with success probablity 0.01 five hundred times. What’s the probability of 2 or fewer successes?

pbinom(2,size=500,prob=0.01)
## [1] 0.1233858
ppois(2,lambda=500*0.01)
## [1] 0.124652