We have a box containing b black balls and r red balls which we will take out one at a time by placing them on the table in front of us. Before each extraction we write the color of the majority of the balls not yet extracted on a sheet of paper and only in the event of a tie between black and red can we write a random color (black or red). So, once the ball has been extracted, we can establish whether or not its color corresponds to the one written on the sheet. On average, how many times does the color written on the piece of paper coincide with the color of the ball drawn?
Driven by curiosity, I simulated this game 1000 times considering a box containing b=26 black balls and r=26 red balls, obtaining an expected value approximately equal to 30. I was wondering if a closed formula could be written. Thank you!
Thanks to Parcly Taxel's answer I was able to go back to the original problem whose solution is by John Henry Steelman, Indiana University of Pennsylvania, Indiana, PA (valid for $b \ge r$):
$$ \mathbb{E}(b,r) = b + \sum_{k=0}^{r-1}\binom{b+r}{k}/\binom{b+r}{r} $$
from which:
$$ \mathbb{E}(r,r) = r - \frac{1}{2} + \frac{2^{2r-1}}{\binom{2r}{r}}; \quad \mathbb{E}(26,26) = \frac{3724430600965475}{123979633237026} \approx 30.040664774713895\,. $$