Re: [R] Two envelopes problem

From: <davidr_at_rhotrading.com>
Date: Mon, 25 Aug 2008 16:44:55 -0500

There's a pretty thorough discussion on Wikipedia http://en.wikipedia.org/wiki/Two_envelopes_problem Suffice it to say that not everyone agrees. -- David

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Deepayan Sarkar Sent: Monday, August 25, 2008 4:35 PM
To: Mario
Cc: r-help_at_r-project.org; Greg Snow
Subject: Re: [R] Two envelopes problem

On Mon, Aug 25, 2008 at 1:51 PM, Mario <mdosrei_at_nimr.mrc.ac.uk> wrote:
> No, no, no. I have solved the Monty Hall problem and the Girl's problem and
> this is quite different. Imagine this, I get the envelope and I open it and
> it has £A (A=10 or any other amount it doesn't matter), a third friend gets
> the other envelope, he opens it, it has £B, now £B could be either £2A or
> £A/2. He doesn't know what I have, he doesn't have any additional
> information. According to your logic, he should switch, as he has a 50%
> chance of having £2B and 50% chance of having £B/2. But the same logic
> applies to me. In conclusion, its advantageous for both of us to switch. But
> this is a paradox, if I'm expected to make a profit, then surely he's
> expected to make a loss! This is why this problem is so famous. If you look
> at the last lines of my simulation, I get, conditional on the first envelope
> having had £10, that the second envelope has £5 approximatedly 62.6% of the
> time and 37.4% for the second envelope. In fact, it doesn't matter what the
> original distribution of money in the envelopes is, conditional on the first
> having £10, you should exactly see 2/3 of the second envelopes having £5 and
> 1/3 having £20. But I'm getting a slight deviation from this ratio, which is

> consistent, and I don't know why.

That has nothing to do with switching, and everything to do with properties of regression. Try:

> env <- generateenv(r=2, rintexp, n=1e6, rate=1/10)
> colMeans(env)
[1] 15.76573 15.75436
> mean(env[which(env[,1] == 10) , 2]) # greater than 10
[1] 10.64476
> mean(env[which(env[,1] == 20) , 2]) # less than 20
[1] 18.10053

And now with a distribution with mean less than 10

> env <- generateenv(r=.5, rintexp, n=1e6, rate=1/10)
> colMeans(env) # mean less than 10
[1] 7.881469 7.873117
> mean(env[which(env[,1] == 10) , 2])
[1] 8.966886

-Deepayan



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 25 Aug 2008 - 21:48:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 25 Aug 2008 - 22:33:57 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive