Page - 198 , execercise - 18

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

  1. Find the probability that a randomly picked cookie will have no raisins. Let X be the no. of raisins in cookie Expected value of X(600) λ = np p = 1 / 500 n = 600 \(\lambda\) = 600/500 For no raisins S(0)

P(X = k) ≈ \(λ^k/k!* e^{-\lambda}\)

P(X= 0) calculating using R

ppois(0,lambda = 1.2)
## [1] 0.3011942

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

λ = np p = 1 / 500 n = 400 \(\lambda\) = 400/500 For two choclatechips X(2)

P(X = k) ≈ \(λ^k/k!* e^{-\lambda}\)

P(X= 2) calculating using R

ppois(2,lambda = 0.8,lower.tail = FALSE)
## [1] 0.0474226
  1. Find the probability that a randomly chosen cookie will have at least two bits (raisins or chips) in it.

1000 bits in 500 cookies means an average of 2 bits per cookies

P (X >= 2) = 1 - P(X<=1) = 1 - Fx(1)

p=1/500 n=1000

1- ppois(1, lambda = 2)
## [1] 0.5939942