A small twist on the classic probability puzzle:
You are given two boxes with a number inside each box, each of which ranges from [A, B]. 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?
While the regular variant has no restriction on the range of the random number, in this case you are given that it will fall within the range from [A, B].
If this is the case, then it is possible to have a uniform distribution.
Lets take 2 cases:
You are given the PDF from which the numbers were generated on the range [A, B].
You are not given any information about the distribution from which the numbers were generated.
In the first case, the solution is simple: since we are given the distribution, we can just compute the probability that the other box (z) has a number larger than the one we sampled (y)$P(z>y,z ≈ \text{Dist})$ where $≈$ stands for distributed.
In the second case however, we are not given the distribution. Is the best solution then to choose your own PDF and generate a random real from [A, B] as is the accepted solution for the puzzle when there is no range restriction?
Or can you use the information that the range of values is restricted to get to an even better solution?