# Probability of red balls present in the urn

There are n total balls in the urn containing red and blue colors with unknown ratios. k red balls can be anywhere from 0 to n being equally likely and the remaining n-k will be blue balls. What is the probability of k red balls in the urn if the first ball drawn is red? What is the probability of k red balls in the urn if the first ball drawn is red without replacement and the second ball drawn is blue?

I know that Bayes's rule will be applied to find out the probability of red balls present in the given. I think P(k red balls) = 1/(n+1) and P(n-k blue balls) = n/n+1

Further, Bayes's formula will be applied so that

P(k red balls|ball drawn is red) = {P(ball drawn is red | k red balls)*P(k red balls)}/P (ball drawn is red)

But I am stuck as to how to use this to find the answer.

The probability of $$k$$ red balls and the first ball drawn being red is $$\frac1{n+1}$$ (for the equally likely initial distributions) times $$\frac kn$$. Total probability (a more intuitive form of the Price–Bayes formula) then gives the answer as $$\frac{(1/(n+1))(k/n)}{(1/(n+1))\sum_{k=0}^n(k/n)}=\frac{k}{\sum_{k=0}^nk}=\frac{2k}{n(n+1)}$$ Likewise the probability of $$k$$ red balls, the first draw red and the second draw blue is $$\frac1{n+1}\frac kn\frac{n-k}{n-1}$$, so the second part's answer is $$\frac{(1/(n+1))(k/n)((n-k)/(n-1))}{(1/(n+1))\sum_{k=0}^n(k/n)((n-k)/(n-1))}=\frac{k(n-k)}{\sum_{k=0}^nk(n-k)}=\frac{6k(n-k)}{(n-1)n(n+1)}$$

• I also derived a similar form. But for me, the denominator was different when applying the total probability law. I was getting sum(k/n) * 1/(n+1) + sum(k/n) * (n/n+1) for the red and green balls in the denominator. Can you explain yours? Commented Oct 10, 2022 at 5:15
• n/(n+1) denotes the probability of a green ball as 1 - P(k red balls). Oh, I believed that for the law of total probability I had to consider all the cases including drawing a red ball given there are n-k blue balls. But that doesn't make sense. Commented Oct 10, 2022 at 5:55
• @TimHenderson well the sample space is very simple. They are just the possible outcomes of one and two draws from a bag respectively, so (red), (blue), (red,blue), etc. Commented Oct 10, 2022 at 6:21