I have an intuitive answer here, but I struggle setting up probability questions, so any pointers would be great.
There are 2 urns of 50 balls: one with 50 red balls and another with 49 red and one green. What is the probability of drawing a red conditional on drawing 49 reds from a randomly-sampled urn.
Here's how I set it up:
Call the urns $U_{1}$ and ${U_{2}}$, where $P(U_{1}) = P(U_{2}) = \frac{1}{2}$. Label drawing $n = 49$ consecutive red balls first event $A$, not drawing 49 red balls $\neg A$, and drawing a ball event $B = \{r, g\}$.
We are interested in $P(B = r \mid A)$, the probability of drawing a red ball after the event of drawing 49 consecutive reds from a randomly sampled urn. Using Baye's rule:
$$ P(B = r \mid A) = \frac{P(A \mid B = r) P(B = r)}{P(A)} $$
The probability of drawing 49 reds given we've drawn a red ball is equal to the probability of drawing the all-red urn.
$$ P(A \mid B = r) = P(A \mid B = r, U_{1}) P(U_{1}) + P(A \mid B = r) P(U_{2}) = 1 \frac{1}{2} + 0 \frac{1}{2} = \frac{1}{2} $$
The probability of a red ball overall requires summing over the possible ways of getting a red ball, i.e. a red ball from urn 1 or urn 2 and a red ball after sampling 49 red balls or not:
$$ \begin{align} P(R) &= P(B = r, A, U_{1}) + P(B = r, \neg A, U_{1}) + P(B = r, A, U_{2}) + P(B = r, \neg A, U_{2})\\ &= \frac{1}{2} + 0 + 0 + \frac{49}{50} (1 - \frac{49!}{50!}) \frac{1}{2}\\ &= 0.9802\\ \end{align} $$
Finally, the probability of 49 reds also requires us to marginalize over the possible ways of getting 49 reds:
$$ \begin{align} P(A) & = P(A, B = r, U_1) + P(A, B = g, U_1) + P(A, B = r, U_2) + P(A, B = g, U_2)\\ &= \frac{1}{2} + 0 + 0 + \frac{1}{50} \times \frac{1}{2}\\ &= 0.51 \end{align} $$
Plugging these values into Bayes' rule gives me $0.961$.
Can anyone help with whether that is correct, and whether there are any better ways to set it up?