You have a white ball in your hand and there is a ball in a black box that has a probability of 50% of being white. You put the white ball you are holding in the box and shake up the box.
a. What is the chance of pulling out a white ball from the box?
b. You take out the white ball. What is the probability of the remaining ball being white?
PROPOSED SOLUTION:
Let white ball in hand is Ball-1 and other ball in box is Ball-2
A - Ball-1 is pulled out
B - Ball-2 is pulled out
W - First draw is white
X - Second draw is white.
(a) Now,
P(W) = P(W|A)P(A) + P(W|B)P(B) = 1/2*1 + 1/2*1/2 = 3/4
(b) P(X|W) = P(X)P(W|X)/P(W) Not sure how to proceed from here. Any ideas?
(a) $\mathsf P(W) = \mathsf P(W\mid A)\,\mathsf P(A)+\mathsf P(W\mid B)\,\mathsf P(B)$ is okay. $\color{blue}\checkmark$
( Note use a vertical slash rather than diagonal to avoid confusion with division. )
(b) Second verse should be the same as the first; just a slight adjustment for the conditional.
$\qquad\mathsf P(X\mid W) = \mathsf P(X\mid W, A)\,\mathsf P(A\mid W)+\mathsf P(X\mid W, B)\,\mathsf P(B \mid W)$
And of course, $\mathsf P(A\mid W) = \mathsf P(W\mid A)\,\mathsf P(A)\Big/\mathsf P(W)$ etc., so:
$\qquad\mathsf P(X\mid W) = \tfrac 2 3 \mathsf P(X\mid W, A)+\frac 1 3 \mathsf P(X\mid W, B)$
So what is the probability that the second ball is white given that ball-1 was pulled out first and was white? $\mathsf P(X\mid W, A)=?$
So what is the probability that the second ball is white given that ball-2 was pulled out first and was white? $\mathsf P(X\mid W, B)=?$
Exactly (assuming that second $A$ was a cut-and-paste-error).
Certainly. We use Bayes' Rule. $$\begin{align} \mathsf P(X\mid W) & = \dfrac{\mathsf P(X, W)}{\mathsf P(W)} \\[1ex] & = \dfrac{\mathsf P(X, W, A)+\mathsf P(X, W, B)}{\mathsf P(W)} \\[1ex] & = \dfrac{\mathsf P(X\mid W, A)\,\mathsf P(W,A)+\mathsf P(X\mid W, B)\,\mathsf P(W, B)}{\mathsf P(W)} \\[1ex] & = \mathsf P(X\mid W, A)\,\mathsf P(A\mid W)+\mathsf P(X\mid W, B)\,\mathsf P(B\mid W) \\[4ex] & = \mathsf P(X\mid W, A)\,\mathsf P(A)\,\frac{\mathsf P(W\mid A)}{\mathsf P(W)}+\mathsf P(X\mid W, B)\,\mathsf P(B)\,\frac{\mathsf P(W \mid B)}{\mathsf P(W)} \end{align}$$