# Urn Probability Question

An urn has 5 black balls and 4 white balls in it. We randomly sample a ball, and return it to the urn (sampling with replacement), until we get 2 balls with the same color. What is the probability that the first ball was white, if we know that the last one was white ? I tried building a tree, and realized that the experiment can have 2 or 3 stages, not more. Then I tried to fit conditional probability, but I got a fairly long fraction, which made no sense to me. Could you please help me to solve this problem ? Thanks !

• Since there can be no more than three stages, the tree would be particularly simple and small. What's the matter with that approach?
– whuber
Jun 6, 2016 at 20:11
• I am getting the wrong number Jun 7, 2016 at 2:52
• Then you might find it most productive to show us how you are getting the wrong number (and why you know it is wrong: sometimes the answer you think is correct actually is not).
– whuber
Jun 7, 2016 at 14:09

If my interpretation of "until we get $2$ balls with the same color" is correct then there are $6$ possibilities:
The corresponding probabilities are easy to find. E.g. $P(BWW)=\frac59\frac49\frac49$.
To be found is: $$\frac{P(WW)+P(WBW)}{P(WW)+P(WBW)+P(BWW)}$$