Maximize probability of White Ball — Puzzle for Interview rounds
There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them) into the bowls to maximize the chance of picking a white ball.
First, let us assume that we divided the balls into jars equally so each jar will contain 50 balls.
So the probability of selecting a white ball will be=probability of selecting the first jar*probability of white ball in the first jar + probability of selecting the second jar*probability of white ball in the second jar
Since we have to maximize the probability so we will increase the probability of white ball in the first jar and keep the second probability same mean equal to 1
so we add 49 white balls with 50 black balls in the first jar and only one white ball in the second jar
so the probability will be now = (1/2)*(49/99)+(1/2)*(1/1)=0.747
Therefore, probability of getting white ball becomes 1/2*1 + 1/2*49/99 which is approximately 3/4.