A baker blends 600 raisins and 400 chocolate chips into a dough mix and, from this, makes 500 cookies.

(a) Find the probability that a randomly picked cookie will have no raisins.

This problem uses the Poission Distribution because it involves counting events and if the dough is mixed well, the event is random and independent.

\[ λ=np=600×\frac {1}{500} =1.2 \]

\[ P(X=0)= \frac {λ^{x}e^{-λ}}{x!} = \frac {1.2^{0}e^{-1.2}}{0!}=e^{-1.2}= 0.3011942 \]

#What we need to find: P(x=0)

lambda <-1.2

dpois(0, lambda)
## [1] 0.3011942

(b) Find the probability that a randomly picked cookie will have exactly two chocolate chips.

\[ λ=np=400×\frac {1}{500} =0.8 \] \[ P(X=2)= \frac {λ^{x}e^{-λ}}{x!} = \frac {0.8^{2}e^{-0.8}}{2!}= \frac {(0.64)(0.449329)}{2} =0.143785 \]

lambda<-0.8
dpois(2,lambda)
## [1] 0.1437853

(c) Find the probability that a randomly chosen cookie will have at least two bits (raisins or chips) in it.

\[ λ=np=1000×\frac {1}{500} = 2 \]

\[ P(X>=2)= 1-P(X<=1)=1-(P(X=0)+P(X=1))=1-\frac {2^{0}e^{-2}}{0!} + \frac {2^{1}e^{-2}}{1!} =0.593994\]

#What we need to find: P(x>=2)

lambda <-2

(1-(dpois(1, lambda)+dpois(0,lambda)))
## [1] 0.5939942