Outreach module (grades 9-12)

The Envelope Problem

Part 7: Random strategy lab

Problem Setup

Two envelopes contain X dollars and 2X dollars, where X is a positive integer. The envelopes are shuffled, and one is handed to you at random. You open it and observe A dollars. Before payment, you may decide to keep your envelope or switch to the other one. You are paid whatever is in your final envelope. In this module, we call it a win if your final envelope has the larger amount. Should you switch if your goal is to end with the larger amount?

In this lab, test a strategy that adds randomness to the decision. Compare it with always switch and always stay, and use the data to form a hypothesis.

Idea to test

The rule in this lab is simple: draw a random threshold \(T\). After you observe \(A\), switch if \(A < T\), otherwise keep your envelope.

Start in a mystery setup and compare this rule with always switch and always stay over many rounds. Then reveal the setup, or choose one yourself, and compare again.

When you have a hypothesis, go on to Part 8 for a mathematical walkthrough of the strategy.

How \(X\) is generated

In this lab, \(X\) is always a power of \(2\). This avoids giving away extra information from the parity of the number you observe.

In Mystery setup, the exact distribution is hidden. In Custom setup, you choose the highest power and the tilt. If the tilt is \(1\), the distribution is uniform. Larger tilt makes larger values more likely, and smaller tilt makes them less likely.

More on the setup family

\[ X\in\{2^0,2^1,\dots,2^K\}, \qquad \mathbb{P}(X=2^i)\propto r^i. \]

So the highest power controls which powers of \(2\) are possible, and the tilt controls whether larger values are more likely or less likely.

How to use this lab

Start with a mystery setup and compare the three strategies over many rounds. Then use single-round mode to inspect individual outcomes.

After that, reveal the hidden setup or choose your own. The goal is to decide whether adding randomness changes what is possible.

Simulation results

Win rate means the fraction of rounds where your final envelope had the larger amount.

Comparison by setup stage and strategy
Setup stage Strategy Rounds Win rate
MysteryRandom threshold0--
MysteryAlways switch0--
MysteryAlways stay0--
RevealedRandom threshold0--
RevealedAlways switch0--
RevealedAlways stay0--

Current round

Observed amount (\(A\)): \(A = \text{--}\)

Envelope pair
--
Threshold \(T\)
--
Action
--
Result
--

Open an envelope to see this round's summary.

Controls

Setup

Choose setup

Current setup

Mystery setup is active. Compare strategies first, then reveal the distribution.

Change the hidden setup or reveal its highest power and tilt.

Play

Choose play mode

Draw \(T\), then switch when \(A<T\) and stay when \(A\ge T\).

Uniform mode: \(T\sim\mathrm{Unif}[T_{\min},T_{\max}]\).

Strategy