A Probability Puzzle

Puzzle. You got two envelopes with two distinct real numbers. You chose one of them and open it. After you see the number you are allowed to swap envelopes. You win if at the end you pick the larger number. Find a strategy that gives you a probability more than 1/2 of winning.

Share:Facebooktwitterredditpinterestlinkedinmail

13 Comments

  1. Anthony:

    Guess a number x. If the number in the first envelope is greater than x, keep it, otherwise pick the second envelope.

  2. Andrew:

    Choose a real number “randomly” from some distribution with infinite support (e.g. the standard normal distribution) before opening either envelope. Open one, and swap if the number in the first envelope is smaller than the number you chose.

    If the numbers in the envelopes are both higher than your chosen number, or both lower, then you gain nothing and your probability of winning is 0.5.

    If the number you chose is *between* the numbers in the two envelopes, then you will choose the higher using this procedure, and your probability of winning is 1.

    We don’t know anything at all about where the numbers in the envelopes came from, but we do know that they’re two distinct reals and our distribution has infinite support, therefore the probability that we chose a number in the interval between them is some p > 0, and the probability of winning the game is 0.5(1-p) + 1*p = 0.5 + 0.5p, > 0.5.

  3. Misha:

    Open any of them. Always open another one. Probability 1/2.

  4. Berkan Dülek:

    (edit: mathematical symbols did not appear in the previous comment)

    Suppose that you open the envelope and see the real number x. Let f(x) ∈ [0,1] denote the probability that you swap envelopes for the observed value x. Any monotonically decreasing function f(x) will do the job.

    Antony’s answer is a special case. To see this, let a be the guessed number. In this case, f(x) = 1 – u(x-a) where u(x) is the unit-step function.

  5. Guido Bombi:

    Estimate x = number of penguins in the Antarctic, toss a coin to decide the sign of x, look at the number in the first envelope and keep it if it is greater than x or exchange the envelope otherwise.
    Well, it sounds much less dignified than “choose a random number from some distribution” but it bears the same relevance to the question at hand, so…

    More seriously, let’s a be the number in the first envelope and b the number in the second one. When both a and b are unknown we do only know that a ≠ b thus p > 0. When we learn the value of a, if a x: we have only changed our question from “is b > a” to “is b > x” and I can’t see how this can affect the probability. If a > x holds then we exchange the question “is b < a” with “is b < x” to the same effect.

    In general we should'nt combine directly probabilities conditional to diffent informations.

  6. Julien:

    The st petersburg paradox:
    The EV of this game is infinite. Thus it is always +EV to switch, regardless of what we open. This appears to break symmetry, but that’s what we get when working with infinite EVs.

  7. Guido Bombi:

    Let’s consider to numbers a and b, with a,b in [-L,L]: when we learn a we can assign the probability that b > a

    p(b > a|a & L) = (L – a)/2L

    Then we take the limit for L -> infinity

    lim (L – a)/2L = 1/2 – lim a/2L = 1/2

    This is how come that the knowledge of a (or x, for that) tells us nothing about b when a and b are taken from the whole R.

  8. Dan:

    Guido, agree; rand(rand()) = rand() – true. This, even more, proves that one will not find any method to obtain P different than 1/2 ; totally follow you.

    I’ve initially had the same conclusion of 1/2, with a variation of the same demonstration: since this is a particular case of an N envelops problem, after you opened N-1 envelops; swap (or not) the highest so far with the last one? By reductio ad absurdum, probability of winning goes to 1 as the number of envelops goes to infinity, starting from different than 1/2.

    BUT: But where exactly is Andrew wrong then? I really can’t get it. Should be something related with the openness of R?!

    Maybe the claim that “the probability that we chose a number in the interval between them is some p > 0” is not true. why? I think that the probability of ending up between 2 random numbers is not defined; this is not the same as 0, or unknown but positive; we would need the entire distribution (the all infinity of tries of random distributions just for having a P defined)

    Oh, what if we open the envelope first, and then we generate a random number by an (recurrent maybe) f(x) which converge to a random number, when x->infinity? in this way we will avoid an infinity of tries, and compare the already envelope number with the random one after a finite number of x steps. Well, then Anthony and Andrew are right.

    However, it works only for positive numbers. this +/ “diverge” all my examples if an f(x)… 😀

    I keep 1/2, for now. c.u.

    —–

    other random thoughts:

    If it is to search an “absolute” point:I wouldn’t have a random choice myself, but I would chose 0; once a positive or negative number is reviled, there is omega-1 left on that side (a bit less than an infinite). so I would switch when the number is <=0.

    However this classification is arbitrary. We can have an infinite number of classifications (speculation — probably not). I only need to evaluate the number of classifications depending on a distance/norm … too complicated…

    What about odd / even numbers … oh, we are on R – not enough Zs; then an (mod 2) variant . … even worst than positive/negative…

  9. Bradley C Kuszmaul:

    I’d like to know where this puzzle came from. It’s been one of my standard favorites for something like 15 or 20 years.

  10. Guido Bombi:

    Fourth and last attempt

    Dan, I’ll start with Andrew’s statement

    “We don’t know anything at all about where the numbers in the envelopes came from, but we do know that they’re two distinct reals and our distribution has infinite support, therefore the probability that we chose a number in the interval between them is some p > 0, and the probability of winning the game is 0.5(1-p) + 1*p = 0.5 + 0.5p, > 0.5.”

    For clarity’s sake let a be the number in the first envelope and b the number in the second one: the probability that p lies in the interval between them is

    p = integrate f(x)dx for x=min(a,b) to max(a,b)

    Whith the prescription to swap the envelope if a 0

    which implies b > a.

    Obviously, the proposition “If x > a then b > a” is far less appealing…

  11. Guido Bombi:

    Unfortunately the sequence “” is interpreted as a formatting command

    My previous statement was

    With the prescription to swap the envelope if a is less than x, which is good if and only if a is less than x and x is less than b, what Andrew’s really claiming is that

    p = integrate f(x)dx for x=a to b is greater than 0

    which implies b is greater than a…

  12. Guido Bombi:

    The puzzle depicts an experiment. We have two ways of interpreting it: either as a metaphor or as a real process.
    The first one is the instinctive choice that most Mathematicians will do: the true meaning is that to distinct real numbers, a and b, are given and we don’t know which one is greater. We find out the value of a but this cannot give us any new information about b so that we are at loss for the question of interest.
    Obviously enough, any information which is clearly not relevant cannot enlight us: so please don’t draw random numbers for there is no randomness involved here.
    The second one faces immediately a first difficulty: a real number cannot be enclosed in an envelope! Most certainly the envelopes contain some representation of real numbers: my claim is that, given the finite space allowed for the representations, there must be a maximum and a minimum number which can be represented by them.
    If this is true then we have got it: the value of a is now relevant and we can assign the ratio (max – a)/(max – min) as the probability that b is greater and choose to swap the envelopes accordingly.
    Nota bene: the person who has set up the experiment must have avoided the symbol for plus or minus infinity because it will answer at our question directly.

  13. Michael Allen:

    I take this approach…

    I would look at the number on the piece of paper I took out of the first envelope. Does it fill up the page with the number nine (ie. 999999999999999…. you get the idea)? If so, then this seems to be the max limit for the greatest possible number and I would therefore keep it. However, if the first paper has any number that’s less than half the greatest possible number that could fit on the page (ie. 499999999999999…), then I would pick the second envelope because there is logically a greater than 50 percent chance the second envelope will contain a greater number.

    This assumes that both envelopes contain within it the same size paper with the same font, font size, character spacing, and line spacing.

Leave a comment