Introduction to Statistics in R
Maggie Matsui
Content Developer, DataCamp
If the average number of adoptions per week is 8, what is $P(\text{\# adoptions in a week} = 5)$?
dpois(5, lambda = 8)
0.09160366
If the average number of adoptions per week is 8, what is $P(\text{\# adoptions in a week} \le 5)$?
ppois(5, lambda = 8)
0.1912361
If the average number of adoptions per week is 8, what is $P(\text{\# adoptions in a week} \gt 5)$?
ppois(5, lambda = 8, lower.tail = FALSE)
0.8087639
If the average number of adoptions per week is 10, what is $P(\text{\# adoptions in a week} \gt 5)$?
ppois(5, lambda = 10, lower.tail = FALSE)
0.932914
rpois(10, lambda = 8)
13 6 11 7 10 8 7 3 7 6
Introduction to Statistics in R