Following problem was presented on lectures with only a draft of solution, and I'd like to check if reasoning behind my complete solution is correct.
"There are 5 balls in an urn, each of which may be either black or white. Two white balls have been drawn respectively (without replacement). What is the probability that the next ball to be drawn will also be white?"
Events:
$A_i$ - There are "i" white balls in urn, i $\in$(0,1,2,3,4,5), P($A_i$) = $\frac{1}{6}$;
B - Two white balls drawn respectively (without replacement);
C - Third ball to be drawn is also white.
Before the event B takes place we suppose that all combinations of white balls are possible. In order to find probability of each combination adjusted to our new knowledge we have to find proability of B for given number of white balls in urn.
$$P(A_i | B) = \frac{P(B | A_i)P(A_i)}{P(B)}$$
Conditional probability: P(B | $A_i$) - "Two white balls drawn given that there are i white balls in urn"
P(B | $A_0$) = 0
P(B | $A_1$) = 0
P(B | $A_2$) = $\frac{2}{5} \cdot \frac{1}{4} $ = $\frac{2}{20}$
P(B | $A_3$) = $\frac{3}{5} \cdot \frac{2}{4}$ = $\frac{6}{20}$
P(B | $A_4$) =$\frac{4}{5} \cdot \frac{3}{4}$ = $\frac{12}{20}$
P(B | $A_5$) = 1
P(B) = $\sum_{i=0}^5 P(B | A_i) \cdot P(A_i)$ = = $\frac{1}{6} \cdot$ [0+0+$\frac{2}{20}$+$\frac{6}{20}$+$\frac{12}{20}$+1] = $\frac{1}{3}$
Posterior probabilities of combinations of balls in urn (after two white balls have been drawn):
P($A_0$ | B) = 0
P($A_1$ | B) = 0
(Both are 0 because we get new information that they are not possible after B happened)
P($A_2$ | B) = $\frac{P(B | A_2) \cdot P(A_2)}{\frac{1}{3}}$=$\frac{\frac{2}{20}\cdot \frac{1}{6}}{\frac{1}{3}}$ = $\frac{1}{20}$
P($A_3$ | B) = $\frac{P(B | A_3) \cdot P(A_3)}{\frac{1}{3}}$=$\frac{\frac{6}{20}\cdot \frac{1}{6}}{\frac{1}{3}}$ = $\frac{3}{20}$
P($A_4$ | B) = $\frac{P(B | A_4) \cdot P(A_4)}{\frac{1}{3}}$=$\frac{\frac{12}{20}\cdot \frac{1}{6}}{\frac{1}{3}}$ = $\frac{6}{20}$
P($A_5$ | B) = $\frac{P(B | A_5) \cdot P(A_5)}{\frac{1}{3}}$=$\frac{1 \cdot \frac{1}{6}}{\frac{1}{3}}$ = $\frac{3}{6}$ = $\frac{10}{20}$
(All of which sum up to 1)
P(B | $A_i$) => we ask ourselves what is the probability of drawing two white balls respectively for given arrangement of balls ;
P($A_i$ | B) => we have aldready drawn two balls and want to know what was the arrangement.
We can find probability of event C ("third ball also white") by using our new knowledge about probabilities of balls' arrangement - I will denote it by P($A^*_i$).
P(C) = $\sum_{i=2}^5 P(C | A^*_i) \cdot P(A^*_i)$
P(C | $A^*_2$) = 0 ("There where 2 white balls in urn, 2 white balls drawn, so the probability of drawing another one is zero")
P(C | $A^*_3$) = $\frac{1}{3}$
P(C | $A^*_4$) = $\frac{2}{3}$
P(C | $A^*_5$) = 1
P(C) = $0 \cdot \frac{1}{20}$+$\frac{1}{3} \cdot \frac{3}{20}$ + $\frac{2}{3} \cdot \frac{6}{20}$ + $1 \cdot \frac{10}{20}$ = $\frac{3}{4}$