Outreach module (grades 9-12)

The Envelope Problem

Part 3: Envelope Problem 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?

Use this lab to test the questions from the previous pages. Start with a hidden setup and compare always switch with always stay. Then try making your own decisions one round at a time, and see what changes when the setup is revealed.

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

Each setup is determined by the highest power and the tilt. We write these as \(K\) and \(r\):

\[ 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 the lab

First compare always switch and always stay in a mystery setup. Then use single round mode to decide case-by-case from the observed value \(A\).

After that, reveal the hidden setup or choose your own. The goal is to see whether knowing how \(X\) is generated changes what you can do.

Simulation results

Record one setup at a time. Here, win rate means the fraction of rounds where your final envelope had the larger amount.

Comparison by setup stage and rule
Setup stage Rule Rounds Win rate
MysteryAlways switch0--
MysteryAlways stay0--
MysterySingle round decisions0--
RevealedAlways switch0--
RevealedAlways stay0--
RevealedSingle round decisions0--

Current round

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

Other envelope amount
--
Last action
--
Change from \(A\)
--

Open an envelope to see this round's summary.

Controls

Setup

Choose setup

Current setup

Mystery setup is active.

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

Play

Choose play mode
Rule