This problem is from Sheldon Ross's book, a first course in probability:

Problem Body:

A philanthropist writes a positive number $x$ on a piece of red paper, shows the paper to an impartial observer, and then turns it face down on the table. The observer then flips a fair coin. If it shows heads, she writes the value $2x$ and, if tails, the value $x/2$, on a piece of blue paper, which she then turns face down on the table. Without knowing either the value $x$ or the result of the coin flip, you have the option of turning over either the red or the blue piece of paper. After doing so and observing the number written on that paper, you may elect to receive as a reward either that amount or the (unknown) amount written on the other piece of paper. For instance, if you elect to turn over the blue paper and observe the value $100$, then you can elect either to accept $100$ as your reward or to take the amount (either $200$ or $50$) on the red paper. Suppose that you would like your expected reward to be large.

Let $y$ be a fixed nonnegative value, and consider the following strategy: Turn over the blue paper, and if its value is at least $y$, then accept that amount. If it is less than $y$, then switch to the red paper. Let $R_y(x)$ denote the reward obtained if the philanthropist writes the amount $x$ and you employ this strategy. Find $E[R_y(x)]$. Note that $E[R_0(x)]$ is the expected reward if the philanthropist writes the amount $x$ when you employ the strategy of always choosing the blue paper.

My doubts:

Now this is different from the usual envelope problem because we know which paper "envelop" has the original i.e. $x$ amount; so it's always beneficial to pick the blue paper.

Concerning the $E[R_y(x)]$; I don't know how to calculate it for any $y, x$; that's because $x$ can be any positive number for example let's call the amount on the blue paper $b$, if we have $y=1$; then for any $b$ if $b \geq y$ then we stay with the blue paper and if $b < y$ then we switch to the red paper; for each of those cases we can easily calculate the expected gain, the issue arises when I want to calculate the overall expected gain; that's because $0 < b \leq +\infty$; so it doesn't make sense to calculate the probability for $b \geq y$ and $b < y$.

I'm very confused so any help will be much appreciated.

Thanks in advance!

  • 1
    $\begingroup$ How can we answer questions about expectation when we aren't told what distribution $x$ was taken from? $\endgroup$ Nov 28, 2023 at 7:39
  • $\begingroup$ Can someone please re-phrase all the start conditions? My first doubt is what, exactly, is meant at the coin flip stage, when 'If it shows heads, she writes the value 2𝑥 and, if tails, the value 𝑥/2, on blue paper. I guess I that means the flipped value is to be written on blue but given how often such riddles resort to technicalities of description, but I doubt that's clear in English, less so in maths and the more mysterious if even here, it's necessary to note the flip is 'fair'. If 'fair' isn't superfluous, isn't it a 'clue' that everything else might be 'unfair.' $\endgroup$ Nov 29, 2023 at 20:19

3 Answers 3


The only randomness is in the coin flip: you have a random variable $Z$ such that $$P(Z=\frac x2) = P(Z= 2x)=\frac 12.$$

Your payoff for the strategy is $$R_y(x) = Z1_{Z\geq y} + x 1_{Z<y},$$ which has expectation $E[Z1_{Z\geq y}] + x P(Z<y)$. Note that $E[Z1_{Z\geq y}] = \frac 12(\frac x2 1_{\frac x2 \geq y} + 2x1_{2x\geq y}),$ hence $$E[Z1_{Z\geq y}] + x P(Z<y)=\begin{cases} \frac 12 (\frac x2 + 2x) + 0 &\text{if } y\leq\frac x2 \\ \frac 12 (2x) + x\frac 12 &\text{if } y\in (\frac x2,2x] \\ \frac 12 0 + x &\text{if } y>2x, \end{cases}$$ thus

$$E[R_y(x)] =\begin{cases} \frac{5x}4 &\text{if } y\leq\frac x2 \\ \frac{3x}2 &\text{if } y\in (\frac x2,2x] \\ x &\text{if } y>2x. \end{cases}$$

  • $\begingroup$ What are those $1's$ beside the variables supposed to mean? like in your definition for $R_y(x)$ $\endgroup$ Nov 28, 2023 at 7:54
  • $\begingroup$ Those are indicators whose value are either $0$ or $1$ according to whether the subscript holds. $\endgroup$ Nov 28, 2023 at 7:56
  • $\begingroup$ I see; I will read your answer thoroughly after a bit and get back to you, thanks for the answer! $\endgroup$ Nov 28, 2023 at 8:18
  • $\begingroup$ Amazing answer; I have a question though; given that we now can calculate $E[R_y(x)]$ if we know $y$ and $x$ as they are not random; if $x$ is random, i.e. the experiment is repeated infinitely many times and we want to compute $E[R_y(x)]$ for a specific $y=y_{max}$ such that this $y$ will give us the maximum $E$ in the long run, we will need to know the distribtuion of $x$, is this correct? $\endgroup$ Nov 28, 2023 at 17:34
  • $\begingroup$ @AbdoIsmail Yes, you need to know the distribution of $x$ for the purpose you're describing. $\endgroup$ Nov 28, 2023 at 17:56

The original amount is x, the blue envelope shows y. We don’t know x, but x is either y/2 or 2y. We should usually not go back to the red envelope, because this would double the money if y is small, gaining x/2, but halve the money if y is large, losing x.

If we knew for some reason that 1000 <= x <= 2000 then either y = 2x >= 2000 or y = x/2 <= 1000, so we definitely know whether the money was doubled or halved, sand would pick the red envelope if y <= 1000.

Now assume we found say 1500 on the blue envelope. The donor gave 750 or 3000. We could make a guess how generous the donor is. If we knew for some reason that x = y/2 with probability p, and x = 2y with probability 1-p then swapping loses y/2 with probability p and gains y with probability 1-p; this is beneficial if 2p < 1-p or p < 1/3. Obviously this means we need to estimate the generosity of the donor well. This might be possible since the two numbers y/2 and 2y are a factor 4 apart.


First, the fallacy in "the original problem" is that Pr(Mine=High)=Pr(Mine=Low)=0.5 is not the same as Pr(Mine=High|Mine=\$100) or Pr(Mine=Low|Mine=\$100). Contrary to what Gabriel Romon said, the value of X is a random variable, and is another source of randomness.

The easiest way to handle it, in the original problem, is to let the random variable T represent all possible totals in the two envelopes. This simplifies the need to convolve the distribution of a money choice with the distribution of a coin flip. Then:

  • Pr(Mine=High|Mine=\$100) = Pr(T=\$150)/[Pr(T=\$150)+Pr(T=\$300)]
  • Pr(Mine=Low|Mine=\$100) = Pr(T=\$300)/[Pr(T=\$150)+Pr(T=\$300)]

These are both 1/2 if, and only if, Pr(T=\$150)=Pr(T=\$300). But for this relationship to hold in general, as implied by the problem, every possible value of T from an infinite set of possible values must have the same probability.

Second, if in your version, you start with the red envelope? Then regardless of what you see when you open it, the expected value in the blue envelope is 5X/4. Unless you view X as having just as much utility, to you, as 2X, you should switch.

Finally, your version absolutely is the same as the original. The blue envelope has some amount, chosen from an unknown distribution. And before looking at it, it has a 50% chance to be the high or the low value.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .