Question using Bayes' theorem with marbles and rolling a die

67 Views Asked by At

A urn contains 10 white marbles and 20 blue marbles. You roll a die and pick the amount of marbles without replacement out depending on the number you roll on the die. Find the probability you roll a 4 given you pick all white marbles.

For this question, I answered: P(4|white) = p(white|4)/p(white). p(white|4) = $\frac 1 6 \sum_{i=1}^4 \frac{ 10-i-1}{30-i-1} $

This is where I really had no idea what I was doing:
p(white) = $\frac 1 6 \sum_{k=0}^6 \sum_{i=0}^k \frac{ 10-i-1}{30-i-1}$

I never did multiple sums before but I ran out of room on the test but the concept I was trying to follow was that p(white) could be the same as p(white|X), X=1,2,3,4,5,6.
Wow, I did put 0 to 6 but maybe it should have been 1 to 6?

2

There are 2 best solutions below

0
On BEST ANSWER

Let $W$ denote the event that all picked marbles are white and let $D$ denote the rolled number.

Then $P(W)=\sum_{i=1}^6P(W\mid D=i)P(D=i)=\frac16\sum_{i=1}^6P(W\mid D=i)$.

Here e.g. $P(W\mid D=3)=\frac{10}{20}\frac{9}{19}\frac8{18}$ (do you see why?).

Further we have the equation:$$P(D=4\mid W)P(W)=P(W\mid D=4)P(D=4)=\frac16P(W\mid D=4)$$

so you are fully equipped now to calculate $P(D=4\mid W)$.

0
On

Let $P(i)$ denote the probability you roll $i$. (Of course, $P(i) = 1/6$ for all $i$ on a fair die.) Let $P(W|i)$ denote the probability that all marbles are white given you rolled an $i$, and likewise for the other relevant terms.

Bayes' rule here states:

$$P(4|W) = {P(4) P(W|4) \over P(W)}$$

where

$$P(W) = \sum\limits_{i=1}^6 P(i) P(W|i).$$

Because the marble removal is without replacement you use the hypergeometric distribution:

$$P(W|i) = {{10 \choose i}{20 \choose 0} \over {30 \choose i}}$$

Putting this all together:

$$P(4|W) = {{1 \over 6} {{10 \choose 4}{20 \choose 0} \over {30 \choose 4}} \over \sum\limits_{i=1}^6 {1 \over 6} {{10 \choose i}{20 \choose 0} \over {30 \choose i}}}$$

which for your case yields

$${455 \over 28271} \approx 0.0160942.$$