Conditional probability in a replacement scenario

80 Views Asked by At

Suppose we have $x$ balls of color red and $y$ balls of color green. Now, we pick a ball at random and then replace the ball with $k+1$ balls of same color as picked (thereby total number of balls is $x+y+k$). In the second picking instance, we pick yet another ball at random, and it turns out to be green. Now, what is the probability that the first ball picked was red?

The problem seems to be a perfect candidate for elementary bayes theorem and inverse probability, but I am getting quite confused because of the replacement of the first picked ball. Like it seems that the picking of second ball is dependent on two things, $k$ and the color of the first picked ball. How do we proceed? Thanks beforehand.

1

There are 1 best solutions below

1
On BEST ANSWER

I advocate keeping things as simple as possible. I avoid complicated Bayes Theorem analysis whenever possible. Here it is possible.

I will break the problem into two cases. Case 1, with probability $~\dfrac{x}{x+y},~$ the first ball picked was red. Case 2, with probability $~\dfrac{y}{x+y},~$ the first ball picked was green.


$\underline{\text{Case 1}}$

The first ball picked was red.
The probability of Case 1 occurring is $~\dfrac{x}{x+y}.$

So, at this point, there are $(x+k)$ red balls and $(y)$ green balls. Now, you are given that the 2nd ball picked was green. Within Case 1, the probability of this (now) happening is $\dfrac{y}{x+k+y}.$

So, the overall probability that Case 1 occurred (first ball picked was red) and then a green ball was the 2nd ball picked is

$$\frac{x}{x+y} \times \frac{y}{x+k+y}. \tag1 $$


$\underline{\text{Case 2}}$

The first ball picked was green.
The probability of Case 2 occurring is $~\dfrac{y}{x+y}.$

So, at this point, there are $(x)$ red balls and $(y+k)$ green balls. Now, you are given that the 2nd ball picked was green. Within Case 2, the probability of this (now) happening is $\dfrac{y+k}{x+k+y}.$

So, the overall probability that Case 2 occurred (first ball picked was green) and then a green ball was the 2nd ball picked is

$$\frac{y}{x+y} \times \frac{y+k}{x+k+y}. \tag2 $$


$\underline{\text{Final Computation}}$

Now that the heavy lifting has been done in Cases 1 and 2, it is less painful to apply Bayes Theorem.

Let $A$ denote the event that the first ball selected was red.

Let $B$ denote the event that the second ball selected was green.

Then, the problem requires you to compute

$$p(A|B) = \frac{p(A,B)}{p(B)}. \tag3 $$

In (3) above, the numerator represents the overall probability that Case 1 occurred. In (3) above, the denominator represents the combined overall probabilities that either Case 1 or Case 2 occurred.

Therefore,

$$p(A|B) = \frac{\frac{x}{x+y} \times \frac{y}{x+k+y}}{\left[ ~\frac{x}{x+y} \times \frac{y}{x+k+y} ~\right] ~+~ \left[ ~\frac{y}{x+y} \times \frac{y+k}{x+k+y} ~\right]}$$

$$= \frac{xy}{(xy) + [y(y+k)]} = \frac{x}{x+y+k}.$$