Two envelope paradox, instead with amounts distributed uniformly. There are two envelopes, each of which has a check for a Unif(0, 1) amount of money, measured
in thousands of dollars. The amounts in the two envelopes are independent. You get to
choose an envelope and open it, and then you can either keep that amount or switch to the
other envelope and get whatever amount is in that envelope. Suppose that you use the following
strategy: choose an envelope and open it. If you observe U, then stick with that envelope with
probability U, and switch to the other envelope with probability 1 − U.
(a) Find the probability that you get the larger of the two amounts.
(b) Find the expected value of what you will receive.

Since the amounts in the envelopes are independent, the amount $U_2$ in the second envelope has distribution uniform(0,1).  This is less than $u \in [0,1]$ with $u$, and less with probability $1-u$.  Given that the amount in the first envelope is $u_1$,  you will get the larger amount if either


*

*you switch (which happens with probability $1 - u_1$) and $U_2 > u_1$, or

*you don't switch (which happens with probability $u_1$) and $U_2 < u_1$.


Thus the conditional probability that you get the larger amount, given $U_1 = u_1$, is
$$ P(L | U_1 = u_1) = (1-u_1)^2 + u_1^2 = 1 - 2 u_1 + 2 u_1^2$$
and the unconditional probability is
$$ P(L) = \mathbb E[P(L | U_1)] = 1 - 2 \mathbb E[U_1] + 2 \mathbb E[U_1^2] = 2/3$$
Similarly, the conditional expectation of the amount $Y$ you receive, given $U_1 = u_1$, is
$$ \mathbb E[V |U_1 = u_1] = (1-u_1)(1/2) + u_1 (u_1) = 1/2 - u_1/2 + u_1^2$$
and $$\mathbb E[V] = \mathbb E[\mathbb E[V|U_1]] = 1/2 - \mathbb E[U_1]/2 + \mathbb E[U_1^2] = 7/12 $$
