There are 25 red or green balls in a bag. Two are simultaneously selected at random. The probability of selecting two balls of the same color is the same as the probability of selecting two balls of different color. How many red balls are there in the bag?
I've tried:
$r + g = 25$
$P((r \cap r) \cup (g \cap g))=2P(r \cap g)$
$\therefore r^2+g^2=2rg \implies (r + g)^2 = 4rg\therefore 4rg=25^2=625\impliedby r+g=25$
$4rg=625$
$4r(25-r)=625\implies 4r^2-100r+625=0$
However, this gives me the answer $12.5$, which is clearly not correct.
What did I do wrong?
Let $r,g$ be the number of red and green balls respectively. The probability of drawing two red balls in a row is $$ \frac r{25}\frac {r-1}{24}, $$ and the probability of drawing a red ball followed by a green ball is $$ \frac r{25}\frac g{24}. $$ By the same computation for two green balls, and a green ball follows by a red ball, and by multiplying all terms by $25 \times 24$, you get the equation $$ r(r-1) + g(g-1) = 2rg, $$ not the equation $r^2 + g^2 = 2rg$, which you found. (Note that your equation is equivalent to $(r-g)^2 = 0$, so you could have seen even more quickly that that would not have worked.)