Ex. 18, P.199
18 A baker blends 600 raisins and 400 chocolate chips into a dough mix and, from this, makes 500 cookies.
X - number of rasins in the cookie
p(rasin in a cookie) = 1/500
n = 600
lambda = n*p = 600/500
P(X=0) = e^-lambda
exp(-600/500)
## [1] 0.3011942
Y - number of chocolate chips in the cookie
p(rasin in a cookie)1/500
n = 400
lambda = 400/500
P(Y=2) = e^-lambda*lambda^2/2!
(exp(-400/500)*(400/500)^2)/factorial(2)
## [1] 0.1437853
p=1/500
n=1000
lambda = n*p = 1000/500 = 2
P (X >= 2) = 1 - P(X<=1) = 1 - Fx(1)
1- ppois(1, lambda = 2)
## [1] 0.5939942