[Math] Better than random

probabilitypuzzle

I have been trying to solve this question, but in vain. Please help.

You are given two boxes with a number inside each box. The two numbers
are different but you have no idea what they are. You pick one box to
open; read the number inside; and then guess if the number in the
other box is larger or smaller. You win if you guess correctly, and
lose otherwise. Is there anyway that you can win the game with more
than 50% chances no matter what the two numbers are?

Best Answer

As it has been pointed out, the wikipedia page contains more than enough information. Here my answer anyway:

Let $X$ be a r.v. with a distribution of your choice. The only important thing is that it gives positive weight to each (nonempty) interval of the reals. For example, let $X$ be a standard normal variable.

Let the two numbers be $a$ and $b$, with $a < b$. Compare a realisation of $X$ (independent of your choice of $a$ or $b$) with the value of the first number you see. If $X$ is bigger, switch, otherwise keep the number.

The probability of winning can be computed as follows:

  • If you choose $a$ (with $\frac{1}{2}$ chance), then you win if you switch, ie if $X > a$. This has prob. $P(X>a)$.
  • Similarly if you choose $b$ (with $\frac{1}{2}$ chance), you win if you don't switch, ie if $X \leq b$. This has prob. $P(X\leq b)$.
  • So the overall probability of winning is $\frac{1}{2} + \frac{1}{2}P(a < X \leq b)$, which is slightly larger than 1/2 based on our assumptions on $X$.
Related Question