# How Does Probability Recursion Work?

I don't undstand how the textbook come up with recursive forumulas.

For example,

Consider the following gambling game for two players, Black and White. Black puts $b$ black balls and White puts $w$ white balls in a box. Black and White take turns at drawing at random from the box, with replacement between draws until either Black wins by drawing a black ball or White wins by drawing a white ball. Supposed black draws first.

Calculate $P($Black wins$)$

I'm not sure how they knew their equation encompasses all ways Black could win.

I going to assume this is their reasoning:

The first draw could only be be Black or White.

$P($Black wins$)$

$= P($Black wins$|B)P(B) + P($Black wins$|W)P(W)$, obviously this encompasses all ways Black could win.

$= P($Black wins$|B)P(B) + ( P($Black wins$|WW)P(WW) + P($Black wins$|WB)P(WB) )$

$= P($Black wins$|B)P(B)$ + ( 0 + $P($Black wins$|WB)P(WB) )$

$= P($Black wins$|B)P(B)$ + $P($Black wins$|WB)P(WB)$

?

And how to set-up recursive probability equations in general + when to use them?

Edit 1:

I used everyone's feedback and came up with an in-depth solution. I think the logic is sound. For anyone that need it:

• I guess it won't work for probability that are dependent on previous draws such as $P($Black Wins on the $9$th draw$)$. – A_for_ Abacus Mar 2 '18 at 0:10
• @A_for_Abacus It works a bit. For black to win on the ninth draw, there must first be four rounds of $WB$, then a $B$, so the probability is $P(WB)^4\cdot P(B)$. If you, for instance, take away replacement then you have ruined the possibility of thinking recursively here (you can still do a recursive argument, but it's much more work). – Arthur Mar 2 '18 at 6:28
Black wins or continues playing if either he picks a black ball ($p$) or he picks a white ball & then White picks a black ball ($qp$); at this stage he will be faced with exactly the same situation so \begin{eqnarray*} P(B)= p +pq P(B). \end{eqnarray*}