I encountered a difficult coin problem and I wasn't sure how to solve the problem.
A has 30 coins and B has 20 coins. Each coin is only flipped once, and the winner is the individual which received the most amount of heads. If both individuals receive the same amount of heads, A wins. What is the probability that B wins?
I tried searching online but was unable to find any questions of this type. Given my lack of mathematical background, I tried to rely on my intuition. Because both individuals have the same probability of flipping heads when it comes to the first 20 choices, we should only consider the possibility of flipping a head for coins 21-30 for A. However, I believe this to be incorrect, so I would love to hear what the community thinks on this question.
Thank you very much for your help!
For the job interview, one can probably approximate throwing $50$ coins as a normal (Gaussian) distribution. Let the score be
$$X = B - A = C_1 + C_2 + \dots + C_{50}$$
where $C_j$ is the $j$th coin. The first thirty coins are uniform $\{0, -1\}$ (since they help A) and the last twenty coins are uniform $\{0, +1\}$ (since they help B). The mean is $E[X] = -5$ and the variance is $Var(X) = 50/4$ so the standard deviation is $\sigma \approx 3.5$.
B wins if $X \ge 1$ and loses if $X \le 0$, so you want the threshold to be $X = 0.5$, which means you are looking at the one-sided tail at ${5.5 \over 3.5} \approx 1.5 \sigma$.
At this point, it depends on what you remember from the z-score tables... :) Perhaps you remember that the area within $\pm 1 \sigma$ is about $2/3$? That means the one-sided tail at $1 \sigma$ is about $1/6 = 16\%$. Then perhaps you remember that $\pm 2 \sigma$ is about $95\%$? Which means the one-sided tail at $2 \sigma$ is about $2.5\%$. This question calls for the one-sided tail at $\approx 1.5 \sigma$, which is a number between $16\%$ and $2.5\%$, and if you remember how the curve drops off dramatically (after $1 \sigma$) you might have guessed about $6$ or $7\%$.
Incidentally if you actually look up the z-score table for $5.5 / \sqrt{12.5} \approx 1.55563491861$ you get a probability of $0.059897$ which is very close to the combinatorially exact answer as calculated by @Tavish in the comments.
That would be vastly incorrect. First of all, A wins ties, so this wrong logic would say A wins all the time (since A wins even if A flips $0$ heads in coins 21-30). Even if A loses ties, the logic is still bad. E.g. imagine A is flipping $10000$ coins and B is flipping $9990$. Intuitively you would think B has less than half, but still pretty good chance, to win. Whereas with the wrong logic B wins iff A's $10$ extra coins all tails (probability $1/1024$).