[R] Two envelopes problem

Jim Lemon jim at bitwrit.com.au
Wed Aug 27 13:35:16 CEST 2008


Duncan Murdoch wrote:
> On 26/08/2008 7:54 AM, Jim Lemon wrote:
>> Hi again,
>> Oops, I meant the expected value of the swap is:
>>
>> 5*0.5 + 20*0.5 = 12.5
>>
>> Too late, must get to bed.
>
> But that is still wrong.  You want a conditional expectation, 
> conditional on the observed value (10 in this case).  The answer 
> depends on the distribution of the amount X, where the envelopes 
> contain X and 2X.  For example, if you knew that X was at most 5, you 
> would know you had just observed 2X, and switching would be  a bad idea.
Yes, I used the example values. If you want an algebraic expression:

0.5x*0.5 + 2x*0.5 = 1.25x

where x is the value of the opened envelope.
>
> The paradox arises because people want to put a nonsensical Unif(0, 
> infinity) distribution on X.  The Wikipedia article points out that it 
> can also arise in cases where the distribution on X has infinite mean: 
> a mathematically valid but still nonsensical possibility.
Okay, I read the Wikipedia article, and now realize that the envelope 
isn't opened in the first version _and_ that it looks like a one trial 
problem. If the envelope isn't opened, let's call the two envelopes on 
offer A and B as in the explanation given. If we simultaneously perform 
the calculation on the two envelopes without knowledge of their 
contents, we find that the swaps for both have the same expected value:

0.5xB*0.5 + 2xB*0.5 = 1.25xA (if A is chosen)

BUT

0.5xA*0.5 + 2xA*0.5 = 1.25xB (if B is chosen)

By reductio ad absurdum (two things cannot both be larger than the 
other) we can say that it makes no sense to swap. It is only when the 
operations are applied to each envelope in sequence that the apparent 
paradox arises in this case. In the single trial, no data case, it 
doesn't make sense to swap in the first place. In a multiple trial 
situation, if A and B are constant, the optimal solution is known after 
the first trial. If A and B can vary on each trial, applying the above 
reasoning, it still doesn't make sense to swap.

In the second version of the problem, the value of A is known. The twin 
isn't really necessary, for if the person making the choice performs the 
above operation with constants rather than unknowns, the same outcome 
emerges.

I think (but I don't really have the time right now to follow it 
through) that the third version can be shown to have the same solution.

This seems logically equivalent to the solution at the bottom proposed 
by James Chase, except that I have used the rather pedestrian method of 
formal logic.

Jim



More information about the R-help mailing list