<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Probability Theory on kenji.blog</title><link>http://kenji.blog/en/categories/probability-theory/</link><description>Recent content in Probability Theory on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Thu, 10 Sep 2026 09:00:00 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/categories/probability-theory/index.xml" rel="self" type="application/rss+xml"/><item><title>Sleeping Beauty Paradox: Is the coin probability 1/2 or 1/3? A difficult problem dividing probability theory</title><link>http://kenji.blog/en/p/sleeping-beauty-paradox/</link><pubDate>Thu, 10 Sep 2026 09:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/sleeping-beauty-paradox/</guid><description>&lt;img src="http://kenji.blog/p/sleeping-beauty-paradox/img/sleeping_beauty.jpg" alt="Featured image of post Sleeping Beauty Paradox: Is the coin probability 1/2 or 1/3? A difficult problem dividing probability theory" />&lt;h2 id="1-the-rules-of-a-strange-experiment">1. The Rules of a Strange Experiment
&lt;/h2>&lt;p>You (Sleeping Beauty) have been selected as a subject for a certain scientific experiment.
The experiment runs from Sunday to Wednesday. On Sunday night, you are given a sleeping pill and fall asleep.&lt;/p>
&lt;p>After you fall asleep, the experimenter tosses a &lt;strong>single fair coin&lt;/strong> (a coin with an exactly 1/2 probability of landing heads or tails). And depending on the result, you will be awakened according to the following schedule.&lt;/p>
&lt;p>&lt;strong>[If the coin toss result is &amp;ldquo;Heads&amp;rdquo;]&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>You will be awakened once on Monday and asked a question. After that, you will be put back to sleep and will not awaken again until the experiment ends (Wednesday).&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>[If the coin toss result is &amp;ldquo;Tails&amp;rdquo;]&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>You will be awakened on Monday and asked a question. After that, you will be given a special drug (an amnesia drug) and put back to sleep.&lt;/li>
&lt;li>You will be awakened once more on Tuesday and asked the same question. After that, you will be put back to sleep again, and the experiment will end (Wednesday).&lt;/li>
&lt;/ul>
&lt;ul>
&lt;li>Due to the effects of the amnesia drug, when you awaken, you will not be able to remember &amp;ldquo;what day of the week it is today&amp;rdquo; or &amp;ldquo;whether you have been awakened in the past&amp;rdquo; at all.&lt;/li>
&lt;/ul>
&lt;div class="mermaid">graph TD
Sunday["Sunday: Beauty goes to sleep"] --> Toss{"Coin Toss"}
Toss -->|Heads (1/2)| Mon_Heads["Monday: Awaken + Question&lt;br>(Then experiment ends)"]
Toss -->|Tails (1/2)| Mon_Tails["Monday: Awaken + Question&lt;br>(Then amnesia)"]
Mon_Tails --> Tue_Tails["Tuesday: Awaken + Question&lt;br>(Then experiment ends)"]
style Toss fill:#ff9999,stroke:#333
style Mon_Heads fill:#aaffaa,stroke:#333
style Mon_Tails fill:#aaffaa,stroke:#333
style Tue_Tails fill:#aaffaa,stroke:#333&lt;/div>
&lt;p>Now, it is Monday (or Tuesday), and you have awakened.
There are no clocks or calendars in the room, so you do not know what day it is today.&lt;/p>
&lt;p>There, the experimenter comes in and asks you this question.
&lt;strong>&amp;ldquo;Given that you are currently awake, what do you think is the probability that the tossed coin was &amp;lsquo;Heads&amp;rsquo;?&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>You are a beauty well-versed in mathematics. Now, how do you answer?&lt;/p>
&lt;hr>
&lt;h2 id="2-two-clashing-factions-12-or-13">2. Two Clashing Factions: 1/2 or 1/3?
&lt;/h2>&lt;p>This problem was devised in the 1990s and published in an academic journal by philosopher Adam Elga in 2000.
The probability of the coin seems obvious, but actually, over this problem, mathematicians, statisticians, and philosophers around the world have split cleanly into two camps: the &lt;strong>&amp;ldquo;1/2 Faction (Halfers)&amp;rdquo;&lt;/strong> and the &lt;strong>&amp;ldquo;1/3 Faction (Thirders)&amp;rdquo;&lt;/strong>, engaging in fierce debate to this day.&lt;/p>
&lt;p>Let&amp;rsquo;s hear the &amp;ldquo;perfect logic&amp;rdquo; of each camp.&lt;/p>
&lt;h3 id="the-claim-of-the-12-faction-halfers">The Claim of the &amp;ldquo;1/2 Faction (Halfers)&amp;rdquo;
&lt;/h3>&lt;blockquote>
&lt;p>&amp;ldquo;Since the coin is a fair coin with no cheating, the probability of heads coming up is naturally 1/2.
No matter how many times the experimenter wakes me up or erases my memory after I fall asleep, it &lt;strong>does not affect the physical outcome of the coin at all&lt;/strong>.
The probability at the time the coin was tossed was 1/2, and my waking up gives me no new information (clues to guess whether it is heads or tails). Therefore, the probability remains 1/2.&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>This is a very sound opinion that emphasizes objective physical phenomena and the non-update of information.&lt;/p>
&lt;h3 id="the-claim-of-the-13-faction-thirders">The Claim of the &amp;ldquo;1/3 Faction (Thirders)&amp;rdquo;
&lt;/h3>&lt;blockquote>
&lt;p>&amp;ldquo;The very fact that you are &amp;lsquo;awake&amp;rsquo; is information that changes the probability.
Suppose we repeated this experiment 100 times (100 weeks).
The coin should be &amp;lsquo;Heads&amp;rsquo; 50 times and &amp;lsquo;Tails&amp;rsquo; 50 times.&lt;/p>
&lt;ul>
&lt;li>For the 50 weeks where Heads comes up, you awaken only once on Monday $\rightarrow$ &lt;strong>Number of awakenings for &amp;lsquo;Heads&amp;rsquo; is 50 times&lt;/strong>&lt;/li>
&lt;li>For the 50 weeks where Tails comes up, you awaken twice, on Monday and Tuesday $\rightarrow$ &lt;strong>Number of awakenings for &amp;lsquo;Tails&amp;rsquo; is 100 times&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>In other words, the situation of the moment you wake up has 150 times in total, out of which the &amp;lsquo;pattern of awakening on Heads&amp;rsquo; is 50 times, and the &amp;lsquo;pattern of awakening on Tails&amp;rsquo; is 100 times.
Therefore, the probability that the awakening you are currently experiencing is &amp;lsquo;Heads&amp;rsquo; is 50 / 150 = &lt;strong>1/3&lt;/strong>!&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>This is a powerful opinion based on &amp;ldquo;frequentism&amp;rdquo; or the &amp;ldquo;anthropic principle,&amp;rdquo; which incorporates the very situation that &amp;ldquo;you currently exist (are observing)&amp;rdquo; into the calculation as an element of the probability space.&lt;/p>
&lt;hr>
&lt;h2 id="3-calculating-with-bayes-theorem">3. Calculating with Bayes&amp;rsquo; Theorem
&lt;/h2>&lt;p>There is also an attempt to unravel this problem using &amp;ldquo;Bayes&amp;rsquo; Theorem,&amp;rdquo; a tool for mathematically updating probabilities.
Let&amp;rsquo;s organize the logic of the &amp;ldquo;1/3 faction&amp;rdquo; from the perspective of conditional probability.&lt;/p>
&lt;p>Your state when you awaken is one of the following three:&lt;/p>
&lt;ol>
&lt;li>$E_1$: The coin is &amp;ldquo;Heads&amp;rdquo;, and it is now &amp;ldquo;Monday&amp;rdquo;&lt;/li>
&lt;li>$E_2$: The coin is &amp;ldquo;Tails&amp;rdquo;, and it is now &amp;ldquo;Monday&amp;rdquo;&lt;/li>
&lt;li>$E_3$: The coin is &amp;ldquo;Tails&amp;rdquo;, and it is now &amp;ldquo;Tuesday&amp;rdquo;&lt;/li>
&lt;/ol>
&lt;p>The probability of &amp;ldquo;Heads&amp;rdquo; is $1/2$, and the probability of &amp;ldquo;Tails&amp;rdquo; is $1/2$.
However, in the case of Tails, &amp;ldquo;Monday&amp;rdquo; and &amp;ldquo;Tuesday&amp;rdquo; are perfectly symmetrical (you cannot distinguish them since you have no memory), so it is thought that $E_2$ and $E_3$ are equally likely to occur.&lt;/p>
&lt;p>Since the sum of the overall probabilities must be $1$, if we assign equal probability to each awakening as an independent &amp;ldquo;event (observation point)&amp;rdquo;:
$P(E_1) = 1/3$
$P(E_2) = 1/3$
$P(E_3) = 1/3$
Thus, the conclusion is that the &amp;ldquo;probability it was Heads ($P(E_1)$)&amp;rdquo; is $1/3$.&lt;/p>
&lt;p>On the other hand, the &amp;ldquo;1/2 faction&amp;rdquo; argues against this, stating, &amp;ldquo;Monday and Tuesday when the coin is Tails ($E_2$ and $E_3$) are merely dependent events derived from the single result of one coin toss, and it is wrong to count them as independent probabilities in the first place.&amp;rdquo;&lt;/p>
&lt;hr>
&lt;h2 id="4-why-does-this-problem-not-get-resolved">4. Why Does This Problem Not Get Resolved?
&lt;/h2>&lt;p>The reason why the &amp;ldquo;Sleeping Beauty problem&amp;rdquo; plagues scholars so much is not due to a mere calculation error or illusion.
It is because this problem touches upon the deepest and most fundamental question of probability theory: &lt;strong>&amp;ldquo;What exactly is probability?&amp;rdquo;&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>For the &lt;strong>1/2 faction&lt;/strong>, probability is a &amp;ldquo;physical property of the coin&amp;rdquo; or an &amp;ldquo;objective fact&amp;rdquo;.&lt;/li>
&lt;li>For the &lt;strong>1/3 faction&lt;/strong>, probability is the &amp;ldquo;degree of belief of the observer (Beauty)&amp;rdquo; or the &amp;ldquo;frequency of observation&amp;rdquo;.&lt;/li>
&lt;/ul>
&lt;p>Profound themes that connect to the &amp;ldquo;measurement problem&amp;rdquo; in quantum mechanics and the &amp;ldquo;anthropic principle&amp;rdquo; in cosmology (the idea of calculating the probability of the universe backward from the fact that we exist) are condensed into this simple coin toss experiment.&lt;/p>
&lt;h2 id="5-summary">5. Summary
&lt;/h2>&lt;p>If you were a subject in this experiment, would you answer &amp;ldquo;1/2&amp;rdquo; or &amp;ldquo;1/3&amp;rdquo; when you wake up?&lt;/p>
&lt;p>Whichever you answer, world-class mathematicians will stand behind you to defend you.
How a seemingly simple mathematical definition collapses the moment it is tied to troublesome concepts like human &amp;ldquo;subjectivity&amp;rdquo; and &amp;ldquo;existence.&amp;rdquo; The paradox continues to shake our common sense today.&lt;/p></description></item><item><title>St. Petersburg Paradox: How Much Would You Pay for a Gamble with "Infinite" Expected Value?</title><link>http://kenji.blog/en/p/st-petersburg-paradox/</link><pubDate>Thu, 10 Sep 2026 05:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/st-petersburg-paradox/</guid><description>&lt;img src="http://kenji.blog/p/st-petersburg-paradox/img/st_petersburg.jpg" alt="Featured image of post St. Petersburg Paradox: How Much Would You Pay for a Gamble with "Infinite" Expected Value?" />&lt;h2 id="1-the-dream-gamble-with-infinite-expected-value">1. The Dream Gamble with &amp;ldquo;Infinite&amp;rdquo; Expected Value
&lt;/h2>&lt;p>As you walk through a casino, a dealer invites you to play a new coin toss game.&lt;/p>
&lt;p>&lt;strong>[Game Rules]&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>You pay an entry fee to start the game.&lt;/li>
&lt;li>You toss a coin. If it lands on &lt;strong>Heads&lt;/strong>, your prize money doubles, and you get to toss again.&lt;/li>
&lt;li>The game ends as soon as it lands on &lt;strong>Tails&lt;/strong>. You receive the prize money accumulated up to that point.&lt;/li>
&lt;/ol>
&lt;p>The initial prize starts at $2.&lt;/p>
&lt;ul>
&lt;li>If it lands on Tails on the 1st toss, you get &lt;strong>$2&lt;/strong> and the game ends.&lt;/li>
&lt;li>If it&amp;rsquo;s Heads on the 1st and Tails on the 2nd, you get &lt;strong>$4&lt;/strong> and the game ends.&lt;/li>
&lt;li>If it&amp;rsquo;s Heads on the 1st and 2nd, and Tails on the 3rd, you get &lt;strong>$8&lt;/strong> and the game ends.&lt;/li>
&lt;li>&amp;hellip;From then on, as long as Heads keep appearing, the prize doubles to $16, $32, $64&amp;hellip; and so on.&lt;/li>
&lt;/ul>
&lt;div class="mermaid">graph TD
Start["Game Start"] --> Toss1{"1st Coin Toss"}
Toss1 -->|Tails (1/2)| End1["End: Win $2"]
Toss1 -->|Heads (1/2)| Toss2{"2nd Coin Toss"}
Toss2 -->|Tails (1/2)| End2["End: Win $4"]
Toss2 -->|Heads (1/2)| Toss3{"3rd Coin Toss"}
Toss3 -->|Tails (1/2)| End3["End: Win $8"]
Toss3 -->|Heads (1/2)| Toss4{"..."}
Toss4 -.->|The longer the streak| Infinite["Prize doubles infinitely!"]&lt;/div>
&lt;p>Now, here is a question for you.
&lt;strong>If the entry fee for this game were &amp;ldquo;$10,000 (about 1.5 million yen)&amp;rdquo;, would you participate?&lt;/strong>&lt;/p>
&lt;p>Most people would probably say &amp;ldquo;I won&amp;rsquo;t participate&amp;rdquo;. Because there is a 50% chance of getting Tails on the first toss, meaning you would only get $2 and suffer a massive loss.&lt;/p>
&lt;p>However, if you calculate this strictly according to mathematical probability theory (expected value), a surprising fact emerges. &lt;strong>Mathematically, whether the entry fee is $10,000 or $100 million, you should participate in this game even if you have to borrow your entire net worth.&lt;/strong>&lt;/p>
&lt;p>Why on earth is that?&lt;/p>
&lt;hr>
&lt;h2 id="2-lets-calculate-the-expected-value">2. Let&amp;rsquo;s Calculate the Expected Value
&lt;/h2>&lt;p>To determine whether a gamble is &amp;ldquo;profitable or not&amp;rdquo;, we use a mathematical metric called &lt;strong>&amp;ldquo;expected value&amp;rdquo;&lt;/strong>.
The expected value is a number that represents &amp;ldquo;how much you will make on average per game if you repeat the game many times&amp;rdquo;. The formula is &lt;strong>the sum of all &amp;ldquo;(prize money) × (probability of getting it)&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;p>Let&amp;rsquo;s calculate the expected value for this game.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Probability of getting Tails on the 1st toss:&lt;/strong> $\frac{1}{2}$
Prize is $2$.
Contribution to expected value = $2 \times \frac{1}{2} = 1$ dollar&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Probability of getting Tails on the 2nd toss:&lt;/strong> Getting Heads then Tails, so $\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}$
Prize is $4$.
Contribution to expected value = $4 \times \frac{1}{4} = 1$ dollar&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Probability of getting Tails on the 3rd toss:&lt;/strong> Getting Heads, Heads, then Tails, so $(\frac{1}{2})^3 = \frac{1}{8}$
Prize is $8$.
Contribution to expected value = $8 \times \frac{1}{8} = 1$ dollar&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Probability of getting Tails on the $n$-th toss:&lt;/strong> $(\frac{1}{2})^n$
Prize is $2^n$ dollars.
Contribution to expected value = $2^n \times (\frac{1}{2})^n = 1$ dollar&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>In other words, no matter what toss the game ends on, the expected value for that pattern is &lt;strong>always &amp;ldquo;$1&amp;rdquo;&lt;/strong>.
Since the game can potentially continue infinitely, adding all these expected values together results in the following:&lt;/p>
$$ \text{Total Expected Value} = 1 + 1 + 1 + 1 + \dots = \infty \text{ (Infinity)} $$
&lt;p>The answer derived by mathematics is &lt;strong>&amp;ldquo;the expected value of this game is infinite&amp;rdquo;&lt;/strong>.
Since the expected value is infinite, no matter how high the entry fee is, theoretically it is an absolutely &amp;ldquo;profitable gamble&amp;rdquo;.&lt;/p>
&lt;p>This is the &lt;strong>&amp;ldquo;St. Petersburg Paradox&amp;rdquo;&lt;/strong>, proposed by Nicolaus Bernoulli in 1713.
There is a fierce contradiction between the correct mathematical calculation result (having infinite value) and human realistic sensation (only wanting to pay a few dollars).&lt;/p>
&lt;hr>
&lt;h2 id="3-the-discovery-of-utility-that-resolves-the-gap-between-mathematics-and-humans">3. The Discovery of &amp;ldquo;Utility&amp;rdquo; that Resolves the Gap between Mathematics and Humans
&lt;/h2>&lt;p>The one who solved this paradox was Daniel Bernoulli, a genius mathematician and cousin of Nicolaus. (It got this name because he presented this paper at the Academy of Sciences in St. Petersburg.)&lt;/p>
&lt;p>Daniel delved into human psychology.
He thought, &lt;strong>&amp;ldquo;Humans do not judge things by the &amp;lsquo;absolute monetary amount&amp;rsquo;, but by the &amp;lsquo;satisfaction (utility)&amp;rsquo; that the money brings.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>This is called the &lt;strong>&amp;ldquo;Law of Diminishing Marginal Utility&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;h3 id="the-value-of-money-decreases-depending-on-the-amount-you-hold">The value of money decreases depending on the amount you hold
&lt;/h3>&lt;p>For example, when you are extremely thirsty in a desert, the first glass of water has enough value (satisfaction) that you would &amp;ldquo;want to drink it even if you had to pay 10,000 yen&amp;rdquo;. However, as you drink the second and third glasses, the value of a single glass of water rapidly drops. By the 10th glass, you would likely say &amp;ldquo;I wouldn&amp;rsquo;t want it even if it were free&amp;rdquo;.&lt;/p>
&lt;p>The same goes for money.&lt;/p>
&lt;ul>
&lt;li>&amp;ldquo;1 million yen&amp;rdquo; given to someone with zero savings has immense, life-saving value.&lt;/li>
&lt;li>However, &amp;ldquo;1 million yen&amp;rdquo; given to Elon Musk, who has a net worth of tens of billions, only holds about as much value (satisfaction) as a 1-yen coin found on the street.&lt;/li>
&lt;/ul>
&lt;p>In other words, even if the prize money doubles infinitely like $2 \rightarrow $4 \rightarrow $8 \rightarrow $16&amp;hellip;, &lt;strong>the &amp;ldquo;happiness (utility)&amp;rdquo; a human feels does not increase infinitely in proportion to the amount&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="4-recalculating-the-expected-value-using-utility">4. Recalculating the Expected Value using &amp;ldquo;Utility&amp;rdquo;
&lt;/h2>&lt;p>Daniel Bernoulli assumed that &amp;ldquo;the value (utility) of money felt by humans is proportional to the logarithm ($\log$) of the amount&amp;rdquo;.&lt;/p>
&lt;p>Let the amount be $x$, and let&amp;rsquo;s express the value (utility) felt by humans $u(x)$ as a logarithmic function (here we consider a simple model with a base of 2).&lt;/p>
&lt;ul>
&lt;li>Utility of $2 prize: $\log_2(2) = 1$&lt;/li>
&lt;li>Utility of $4 prize: $\log_2(4) = 2$&lt;/li>
&lt;li>Utility of $8 prize: $\log_2(8) = 3$&lt;/li>
&lt;li>Utility of $2^n$ prize: $\log_2(2^n) = n$&lt;/li>
&lt;/ul>
&lt;p>The amount doubles each time, but human &amp;ldquo;happiness&amp;rdquo; only increases little by little like 1, 2, 3&amp;hellip;
Using this &amp;ldquo;utility&amp;rdquo;, let&amp;rsquo;s calculate the expected value (&lt;strong>expected utility&lt;/strong>) again.&lt;/p>
$$ \text{Expected Utility} = \sum_{n=1}^{\infty} \left( n \times \left(\frac{1}{2}\right)^n \right) $$
$$ = 1 \cdot \frac{1}{2} + 2 \cdot \frac{1}{4} + 3 \cdot \frac{1}{8} + 4 \cdot \frac{1}{16} + \dots $$
&lt;p>When you calculate the sum of this infinite series, the result does not become &amp;ldquo;infinite&amp;rdquo;, but &lt;strong>converges to &amp;ldquo;2&amp;rdquo;.&lt;/strong>
If we reverse calculate the amount for which the utility is &amp;ldquo;2&amp;rdquo;, it becomes $2^2 = 4$ dollars.&lt;/p>
&lt;p>In other words, when recalculated by incorporating human psychology (utility), a very common-sense and realistic answer is derived: **&amp;ldquo;The value of this game is about &amp;lsquo;$4' according to human sensation."**
That is precisely why we do not feel like paying $10,000 for this game.&lt;/p>
&lt;hr>
&lt;h2 id="5-conclusion-the-paradox-that-opened-the-door-to-economics">5. Conclusion: The Paradox that Opened the Door to Economics
&lt;/h2>&lt;p>The St. Petersburg Paradox was a groundbreaking paradox that mathematically proved that the objective number of &amp;ldquo;monetary amount&amp;rdquo; and the subjective value of &amp;ldquo;human satisfaction&amp;rdquo; do not match.&lt;/p>
&lt;p>The concept of &amp;ldquo;Utility&amp;rdquo; proposed by Daniel Bernoulli, 200 years later, became the most important foundation of modern microeconomics and financial engineering (such as portfolio theory).
The behavior of us buying insurance or diversifying investments can all be explained by this human psychological mechanism of &amp;ldquo;diminishing marginal utility (the pain of a huge loss is far greater than the joy of a huge gain)&amp;rdquo;.&lt;/p>
&lt;p>A simple calculation problem of gambling ended up deciphering the human mind and triggering the birth of the massive academic discipline of economics.&lt;/p></description></item><item><title>Monty Hall Problem: The Trap of Probability Theory that Betrays Intuition and its Complete Resolution using Bayesian Inference</title><link>http://kenji.blog/en/p/monty-hall-problem/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/monty-hall-problem/</guid><description>&lt;img src="http://kenji.blog/p/monty-hall-problem/img/monty_hall.jpg" alt="Featured image of post Monty Hall Problem: The Trap of Probability Theory that Betrays Intuition and its Complete Resolution using Bayesian Inference" />&lt;h2 id="1-the-stage-is-a-tv-quiz-show-what-would-you-do">1. The Stage is a TV Quiz Show: What Would You Do?
&lt;/h2>&lt;p>In 1990, the following question was submitted by a reader to the column &amp;ldquo;Ask Marilyn&amp;rdquo; in the American news magazine &lt;em>Parade&lt;/em>.&lt;/p>
&lt;blockquote>
&lt;p>You are a contestant on a TV game show. In front of you are &lt;strong>3 doors (A, B, C)&lt;/strong>.
Behind one door is a &lt;strong>new car (the prize)&lt;/strong>, and behind the remaining two doors are &lt;strong>goats (the blanks)&lt;/strong>.&lt;/p>
&lt;ol>
&lt;li>First, you choose &lt;strong>Door A&lt;/strong>.&lt;/li>
&lt;li>Then, the host, Monty Hall, who knows what is behind each door, opens &lt;strong>Door B&lt;/strong>, which has a goat.&lt;/li>
&lt;li>Monty says to you, &lt;strong>&amp;ldquo;You may now change your choice to Door C if you like. What will you do?&amp;rdquo;&lt;/strong>&lt;/li>
&lt;/ol>
&lt;p>So, &lt;strong>should you change your door?&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;p>Intuitively, it seems: &amp;ldquo;The remaining doors are A and C. Since the new car is completely random between the two, the probability of winning is $\frac{1}{2}$ (50%) for each. So it doesn&amp;rsquo;t matter whether you change or not.&amp;rdquo;&lt;/p>
&lt;p>However, columnist Marilyn vos Savant (recognized by the Guinness Book of Records as having the highest IQ) replied, &lt;strong>&amp;ldquo;You should change. If you change, your probability of winning doubles.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>This answer caused a sensation across the United States, bringing in a storm of harsh criticism with about 10,000 letters of protest (about 1,000 of which were from scholars with PhDs in mathematics), saying things like &amp;ldquo;You do not understand the basics of probability&amp;rdquo; and &amp;ldquo;That&amp;rsquo;s female logic.&amp;rdquo;
However, to get straight to the conclusion, &lt;strong>Marilyn&amp;rsquo;s answer was mathematically entirely correct&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="2-the-gap-between-intuition-and-mathematics-branching-probabilities-in-mermaid">2. The Gap Between Intuition and Mathematics: Branching Probabilities in Mermaid
&lt;/h2>&lt;p>Why does our intuition create the illusion that it is &amp;ldquo;$\frac{1}{2}$&amp;rdquo;?
First, let&amp;rsquo;s visualize all the patterns of the game.&lt;/p>
&lt;div class="mermaid">graph TD
Start["Game Start"] --> CarA["Car is behind Door A (Prob. 1/3)"]
Start --> CarB["Car is behind Door B (Prob. 1/3)"]
Start --> CarC["Car is behind Door C (Prob. 1/3)"]
CarA --> PickA1["You pick Door A"]
CarB --> PickA2["You pick Door A"]
CarC --> PickA3["You pick Door A"]
PickA1 --> HostB_or_C["Host opens B or C"]
PickA2 --> HostC["Host must open C"]
PickA3 --> HostB["Host must open B"]
HostB_or_C --> Stay1["Stay: Lose..."]
HostB_or_C --> Switch1["Switch: Win!"]
HostC --> Stay2["Stay: Lose..."]
HostC --> Switch2["Switch: Win!"]
HostB --> Stay3["Stay: Lose..."]
HostB --> Switch3["Switch: Win!"]
style Switch2 fill:#bbf,stroke:#333,stroke-width:2px
style Switch3 fill:#bbf,stroke:#333,stroke-width:2px
style Stay1 fill:#f99,stroke:#333,stroke-width:2px&lt;/div>
&lt;p>Assuming you chose &amp;ldquo;Door A&amp;rdquo;, the following three scenarios occur with equal probability ($\frac{1}{3}$).&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Scenario 1 (Car is A):&lt;/strong> The host opens either B or C, both of which have goats. If you change your door, you &lt;strong>lose&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Scenario 2 (Car is B):&lt;/strong> The host can only open C, which has a goat. If you change your door, you &lt;strong>win&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Scenario 3 (Car is C):&lt;/strong> The host can only open B, which has a goat. If you change your door, you &lt;strong>win&lt;/strong>.&lt;/li>
&lt;/ol>
&lt;p>In other words, in 2 out of 3 times (Scenarios 2 and 3), you are in a state where &lt;strong>&amp;ldquo;you will definitely win if you change doors&amp;rdquo;&lt;/strong>.
Therefore, the win rate when you change doors is $\frac{2}{3}$, which is &lt;strong>double&lt;/strong> the win rate of $\frac{1}{3}$ when you do not change.&lt;/p>
&lt;hr>
&lt;h2 id="3-strict-proof-using-bayes-theorem">3. Strict Proof Using Bayes&amp;rsquo; Theorem
&lt;/h2>&lt;p>To strictly solve this problem mathematically, we use &amp;ldquo;Bayes&amp;rsquo; Theorem&amp;rdquo; to calculate conditional probabilities.&lt;/p>
$$ P(H|E) = \frac{P(E|H) P(H)}{P(E)} $$
&lt;p>Here, we define the events as follows:&lt;/p>
&lt;ul>
&lt;li>$C_A, C_B, C_C$ : The events that the new car is behind doors A, B, and C, respectively. The prior probabilities are $P(C_A) = P(C_B) = P(C_C) = \frac{1}{3}$&lt;/li>
&lt;li>Suppose you initially selected &lt;strong>Door A&lt;/strong>.&lt;/li>
&lt;li>$M_B$ : The event that the host opens &lt;strong>Door B&lt;/strong>, which has a goat.&lt;/li>
&lt;/ul>
&lt;p>What we want to find is &amp;ldquo;the probability that the new car is behind Door C given that the host opened Door B&amp;rdquo;, i.e., the posterior probability $P(C_C|M_B)$.&lt;/p>
&lt;p>First, let&amp;rsquo;s consider the probability $P(M_B|C_X)$ that the host opens Door B depending on where the new car is.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>When the new car is behind Door A ($C_A$)&lt;/strong>
The host can open either B or C randomly.
&lt;/p>
$$ P(M_B|C_A) = \frac{1}{2} $$
&lt;/li>
&lt;li>
&lt;p>&lt;strong>When the new car is behind Door B ($C_B$)&lt;/strong>
The host cannot open the door with the new car, so the probability of opening B is zero.
&lt;/p>
$$ P(M_B|C_B) = 0 $$
&lt;/li>
&lt;li>
&lt;p>&lt;strong>When the new car is behind Door C ($C_C$)&lt;/strong>
The host cannot open A (which you picked) or C (where the new car is), so they must inevitably open B.
&lt;/p>
$$ P(M_B|C_C) = 1 $$
&lt;/li>
&lt;/ol>
&lt;p>Next, we find the total probability $P(M_B)$ that the host opens Door B using the &amp;ldquo;Law of Total Probability&amp;rdquo;.&lt;/p>
$$ P(M_B) = P(M_B|C_A)P(C_A) + P(M_B|C_B)P(C_B) + P(M_B|C_C)P(C_C) $$
$$ P(M_B) = \left(\frac{1}{2} \times \frac{1}{3}\right) + \left(0 \times \frac{1}{3}\right) + \left(1 \times \frac{1}{3}\right) = \frac{1}{6} + 0 + \frac{1}{3} = \frac{1}{2} $$
&lt;p>Finally, we apply Bayes&amp;rsquo; Theorem to calculate the posterior probabilities for Door A and Door C.&lt;/p>
&lt;p>&lt;strong>Probability that the new car is behind Door A (if you stay):&lt;/strong>
&lt;/p>
$$ P(C_A|M_B) = \frac{P(M_B|C_A) P(C_A)}{P(M_B)} = \frac{\frac{1}{2} \times \frac{1}{3}}{\frac{1}{2}} = \frac{1}{3} $$
&lt;p>&lt;strong>Probability that the new car is behind Door C (if you switch):&lt;/strong>
&lt;/p>
$$ P(C_C|M_B) = \frac{P(M_B|C_C) P(C_C)}{P(M_B)} = \frac{1 \times \frac{1}{3}}{\frac{1}{2}} = \frac{2}{3} $$
&lt;p>The mathematical proof also clearly demonstrates that &lt;strong>&amp;ldquo;changing doors doubles your probability of winning (2/3)&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="4-cognitive-bias-the-value-of-information-as-conditioning">4. Cognitive Bias: The Value of Information as &amp;ldquo;Conditioning&amp;rdquo;
&lt;/h2>&lt;p>Why did even many genius mathematicians intuitively get this problem wrong?
The answer lies in the &amp;ldquo;equiprobability bias&amp;rdquo; and the &amp;ldquo;failure to update information&amp;rdquo; built into the human brain.&lt;/p>
&lt;h3 id="41-equiprobability-bias">4.1. Equiprobability Bias
&lt;/h3>&lt;p>When presented with unknown options, humans have a tendency to unconsciously assign that &amp;ldquo;the probabilities of the remaining options are always equal.&amp;rdquo;
The moment we see two doors remaining, our brain automatically labels them as &amp;ldquo;$50\%$ : $50\%$&amp;rdquo;.&lt;/p>
&lt;h3 id="42-the-information-of-the-hosts-intent">4.2. The Information of the Host&amp;rsquo;s &amp;ldquo;Intent&amp;rdquo;
&lt;/h3>&lt;p>The biggest reason intuition goes wrong is overlooking the fact that &lt;strong>the host&amp;rsquo;s actions are not random&lt;/strong>.
If the rule was &amp;ldquo;the host opens a door randomly without knowing where the car is, and it just happened to be a goat&amp;rdquo; (known as the Monty Fall problem), then the probabilities for Door A and Door C would both be $\frac{1}{2}$.&lt;/p>
&lt;p>However, in the actual Monty Hall problem, the host operates under the following strict constraints:&lt;/p>
&lt;ol>
&lt;li>They cannot open the door chosen by the contestant.&lt;/li>
&lt;li>They cannot open the door with the new car.&lt;/li>
&lt;/ol>
&lt;p>Because of these constraints, the very act of the host &amp;ldquo;opening Door B&amp;rdquo; gives us &lt;strong>massive information about Door C&lt;/strong>. It contains the unspoken message, &amp;ldquo;I couldn&amp;rsquo;t open Door C (because the new car is there).&amp;rdquo;&lt;/p>
&lt;hr>
&lt;h2 id="5-correcting-intuition-with-an-extreme-example">5. Correcting Intuition with an Extreme Example
&lt;/h2>&lt;p>If you&amp;rsquo;re still not convinced, try increasing the number of doors to &lt;strong>1,000,000&lt;/strong>.&lt;/p>
&lt;ol>
&lt;li>You pick &lt;strong>Door 1&lt;/strong> out of 1,000,000 doors. (Probability of winning is $\frac{1}{1,000,000}$)&lt;/li>
&lt;li>The host, who knows everything, opens &lt;strong>all 999,998 doors&lt;/strong> with goats behind them out of the remaining 999,999 doors.&lt;/li>
&lt;li>The only doors closed are &amp;ldquo;Door 1&amp;rdquo; which you picked, and &amp;ldquo;Door 777,777&amp;rdquo; which the host deliberately left closed.&lt;/li>
&lt;/ol>
&lt;p>Now, do you change?
In this case, unless you believe you pulled off a &amp;ldquo;one in a million&amp;rdquo; miracle right at the start, you should change. Realistically, it should be intuitively clear that the probability of the new car being behind &lt;strong>&amp;ldquo;the single door the host absolutely could not open&amp;rdquo;&lt;/strong> is $\frac{999,999}{1,000,000}$.&lt;/p>
&lt;p>The Monty Hall problem (with 3 doors) is simply a scaled-down phenomenon of this &amp;ldquo;1,000,000 doors&amp;rdquo; scenario.&lt;/p>
&lt;div class="mermaid">pie title "Effect of Switching Doors (100 Simulations)"
"Win by switching (approx. 66.7%)" : 67
"Win by staying (approx. 33.3%)" : 33&lt;/div>
&lt;h2 id="6-conclusion-life-and-business-lessons-from-probability-theory">6. Conclusion: Life and Business Lessons from Probability Theory
&lt;/h2>&lt;p>The Monty Hall problem goes beyond a mere quiz and teaches us important lessons.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Intuition is often wrong&lt;/strong>: The human brain has not evolved to intuitively process complex conditional probabilities. In important decision-making, relying solely on intuition is dangerous.&lt;/li>
&lt;li>&lt;strong>Update probabilities with new information (Bayesian updating)&lt;/strong>: When situations change and new information (such as which door the host opened) is provided, the key to success is whether you can flexibly update your probabilities and strategies without clinging to existing beliefs.&lt;/li>
&lt;/ol>
&lt;p>The small decision to &amp;ldquo;change your door&amp;rdquo; just might double the probability of getting a &amp;ldquo;new car&amp;rdquo; in your life.&lt;/p></description></item><item><title>The Birthday Paradox: Over 50% with just 23 people? The magic of "combinations" that deceives intuition</title><link>http://kenji.blog/en/p/birthday-paradox/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/birthday-paradox/</guid><description>&lt;img src="http://kenji.blog/p/birthday-paradox/img/birthday_paradox.jpg" alt="Featured image of post The Birthday Paradox: Over 50% with just 23 people? The magic of "combinations" that deceives intuition" />&lt;h2 id="1-a-test-of-intuition-how-many-people-does-it-take-for-the-probability-to-exceed-50">1. A Test of Intuition: How many people does it take for the probability to exceed 50%?
&lt;/h2>&lt;p>People are gathering at a party venue.
Here, &lt;strong>how many people do you think are needed at a minimum for the probability of having at least one pair with the exact same birthday (month and day) to exceed 50%?&lt;/strong> (*Excluding leap years, assuming a year has 365 days, and each birthday is equally probable).&lt;/p>
&lt;p>Human intuition tends to calculate like this:
&amp;ldquo;There are 365 days in a year. If we pop people into 365 slots and expect an overlap, we&amp;rsquo;d probably need at least about 180 people. Even with a conservative estimate, shouldn&amp;rsquo;t there be 50 to 60 people for the probability to be half?&amp;rdquo;&lt;/p>
&lt;p>However, the correct answer derived by mathematics is a mere &lt;strong>&amp;ldquo;23 people&amp;rdquo;&lt;/strong>.
In a typical school class (about 30 to 40 people), the probability of a pair sharing a birthday jumps to about 70% to 89%. With 50 people, the probability reaches 97%, making it &amp;ldquo;more unusual not to have people with the same birthday.&amp;rdquo;&lt;/p>
&lt;p>Why does our intuition deviate so much from actual probability?&lt;/p>
&lt;hr>
&lt;h2 id="2-why-intuition-fails-the-difference-between-me-and-someone-and-someone-and-someone">2. Why Intuition Fails: The Difference Between &amp;ldquo;Me and Someone&amp;rdquo; and &amp;ldquo;Someone and Someone&amp;rdquo;
&lt;/h2>&lt;p>The biggest reason intuition fails in this problem is that we unconsciously think about the &lt;strong>&amp;ldquo;probability that someone has the same birthday as a specific person (e.g., yourself).&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>If you enter the venue and look for &amp;ldquo;someone with the same birthday as me,&amp;rdquo; the probability that someone among the 23 people shares your birthday is only &lt;strong>about 6.1%&lt;/strong>. (For this probability to exceed 50%, you would actually need 253 people).&lt;/p>
&lt;p>However, what the Birthday Paradox asks is not a pair of &amp;ldquo;me and someone.&amp;rdquo; It only requires one match among &lt;strong>&amp;ldquo;all possible combinations between everyone present at the venue (Person A and Person B, Person B and Person C, Person C and Person A&amp;hellip;).&amp;rdquo;&lt;/strong>&lt;/p>
&lt;div class="mermaid">graph TD
subgraph "Illusion of Intuition: 'Self'-centered comparison"
You["You"] --- P1["Person A"]
You --- P2["Person B"]
You --- P3["Person C"]
You --- P4["Person D"]
style You fill:#ff9999,stroke:#333,stroke-width:4px
end
subgraph "Reality: Round-robin comparison of 'Everyone with Everyone'"
A["Person A"] --- B["Person B"]
A --- C["Person C"]
A --- D["Person D"]
B --- C
B --- D
C --- D
end&lt;/div>
&lt;p>Even in a group of just 4 people, a comparison centered around &amp;ldquo;yourself&amp;rdquo; yields 3 pairs, but a comparison among everyone yields 6 pairs (${}_4 C_2 = 6$).
When the number of people increases to 23, the combinations of pairs explosively increase to a whopping &lt;strong>253 pairs&lt;/strong> (${}_{23} C_2$).
With as many as 253 pairs, doesn&amp;rsquo;t it start to feel unsurprising that at least one of those pairs might hit the &amp;ldquo;1 in 365&amp;rdquo; chance?&lt;/p>
&lt;hr>
&lt;h2 id="3-mathematical-proof-a-brilliant-solution-using-the-complementary-event">3. Mathematical Proof: A Brilliant Solution Using the Complementary Event
&lt;/h2>&lt;p>Calculating the &amp;ldquo;probability of at least one pair sharing a birthday&amp;rdquo; head-on is difficult (because there are too many patterns, such as exactly one pair matching, two pairs matching, three people having the same birthday&amp;hellip;).
Therefore, we use a fundamental technique in probability theory: the &lt;strong>&amp;ldquo;complementary event.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>A complementary event refers to the &amp;ldquo;probability of something not happening.&amp;rdquo;
In other words, we calculate the &lt;strong>&amp;ldquo;probability that everyone&amp;rsquo;s birthday is different (not a single pair overlaps),&amp;rdquo;&lt;/strong> and subtract it from 100% (1) to get the probability we want.&lt;/p>
$$ P(\text{At least 2 people share a birthday}) = 1 - P(\text{Everyone has a different birthday}) $$
&lt;p>Now, let&amp;rsquo;s imagine people entering the venue one by one and calculate.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>1st person&lt;/strong>: There&amp;rsquo;s no worry of overlapping with anyone. The probability is $\frac{365}{365}$.&lt;/li>
&lt;li>&lt;strong>2nd person&lt;/strong>: Must have a different birthday from the 1st person. The remaining 364 days are safe. The probability is $\frac{364}{365}$.&lt;/li>
&lt;li>&lt;strong>3rd person&lt;/strong>: Must have a different birthday from the previous 2 people. The remaining 363 days are safe. The probability is $\frac{363}{365}$.&lt;/li>
&lt;/ol>
&lt;p>Multiplying this up to the $n$-th person gives the general formula for the probability $P(n)'$ that everyone has a different birthday.&lt;/p>
$$ P(n)' = \frac{365}{365} \times \frac{364}{365} \times \frac{363}{365} \times \dots \times \frac{365 - (n - 1)}{365} $$
$$ P(n)' = \prod_{k=1}^{n-1} \left(1 - \frac{k}{365}\right) $$
&lt;p>Therefore, the sought &amp;ldquo;probability $P(n)$ that at least 2 people share a birthday&amp;rdquo; is as follows:&lt;/p>
$$ P(n) = 1 - \prod_{k=1}^{n-1} \left(1 - \frac{k}{365}\right) $$
&lt;p>If we substitute the number of people $n$ into this formula, we can see the probability rises at an astonishing speed.&lt;/p>
&lt;ul>
&lt;li>When $n = 10$, the probability is about &lt;strong>11.7%&lt;/strong>&lt;/li>
&lt;li>When $n = 23$, the probability is about &lt;strong>50.7%&lt;/strong> (it crosses 50% here!)&lt;/li>
&lt;li>When $n = 40$, the probability is about &lt;strong>89.1%&lt;/strong>&lt;/li>
&lt;li>When $n = 70$, the probability is about &lt;strong>99.9%&lt;/strong>&lt;/li>
&lt;/ul>
&lt;div class="mermaid">pie title "Probability when 23 people gather"
"There is a pair with the same birthday (50.7%)" : 50.7
"Everyone is different (49.3%)" : 49.3&lt;/div>
&lt;hr>
&lt;h2 id="4-approximate-calculation-via-taylor-expansion">4. Approximate Calculation via Taylor Expansion
&lt;/h2>&lt;p>Calculating 23 multiplications by hand is tedious, so let&amp;rsquo;s use a mathematical approximation formula to understand it a bit more intuitively.&lt;/p>
&lt;p>Consider the Taylor expansion of the exponential function $e^{-x}$. When $x$ is sufficiently small, the following approximation holds:
&lt;/p>
$$ e^{-x} \approx 1 - x $$
&lt;p>Applying this to each term $\left(1 - \frac{k}{365}\right)$ from earlier:
&lt;/p>
$$ 1 - \frac{k}{365} \approx e^{-\frac{k}{365}} $$
&lt;p>Multiplying all of these together (which becomes addition by the laws of exponents):
&lt;/p>
$$ P(n)' \approx e^{-\frac{1}{365}} \times e^{-\frac{2}{365}} \times \dots \times e^{-\frac{n-1}{365}} $$
$$ P(n)' \approx \exp\left(-\sum_{k=1}^{n-1} \frac{k}{365}\right) $$
&lt;p>The sum from 1 to $n-1$ is $\frac{n(n-1)}{2}$ (that is, the number of combinations ${}_n C_2$), so:
&lt;/p>
$$ P(n)' \approx \exp\left(-\frac{n(n-1)}{2 \times 365}\right) $$
&lt;p>Using this formula, we find $n$ when the probability is 50% ($0.5$).
&lt;/p>
$$ 0.5 = e^{-\frac{n(n-1)}{730}} $$
&lt;p>
Taking the natural logarithm of both sides ($\ln 0.5 \approx -0.693$):
&lt;/p>
$$ -0.693 = -\frac{n(n-1)}{730} $$
$$ n(n-1) = 0.693 \times 730 \approx 505.89 $$
&lt;p>Approximating as $n^2 \approx 506$, we get $n = \sqrt{506} \approx 22.49$
The answer &lt;strong>$n \approx 23$&lt;/strong> is beautifully derived!&lt;/p>
&lt;hr>
&lt;h2 id="5-application-to-daily-life-and-hash-collisions">5. Application to Daily Life and &amp;ldquo;Hash Collisions&amp;rdquo;
&lt;/h2>&lt;p>This paradox is not just a party trick. It plays a critically important role in the &lt;strong>cryptography and information security&lt;/strong> that supports modern IT society.&lt;/p>
&lt;p>Computer systems use a mechanism called a &amp;ldquo;hash function&amp;rdquo; to quickly verify the identity of passwords or files. A hash function returns a random string of a fixed length (a hash value) no matter what data is put in.
However, the phenomenon where these hash values coincidentally turn out to be the same is called a &lt;strong>&amp;ldquo;Hash Collision.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>Hash collisions occur due to the exact same principle as the Birthday Paradox.
Contrary to human intuition, which assumes &amp;ldquo;since the number of possible hash values is astronomical, collisions would rarely happen,&amp;rdquo; it is surprisingly easy for an attacker to randomly generate a massive amount of data and find a &amp;ldquo;pair that matches (has the same birthday).&amp;rdquo;&lt;/p>
&lt;p>This is called a &lt;strong>&amp;ldquo;Birthday Attack.&amp;rdquo;&lt;/strong>
Engineers designing security systems assume this mathematical fact that &amp;ldquo;collisions happen far faster than intuition suggests,&amp;rdquo; and ensure safety by setting the hash length to be extremely long.&lt;/p>
&lt;h2 id="6-conclusion-the-limits-of-human-intuition">6. Conclusion: The Limits of Human Intuition
&lt;/h2>&lt;p>The Birthday Paradox is a perfect example of &lt;strong>how fragile human intuition is against &amp;ldquo;exponential growth&amp;rdquo; and &amp;ldquo;combinatorial explosions.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>We are strong at linear (additive) growth, but we cannot simulate in our brains a phenomenon where the number of pairs explodes at a pace of $n^2$.
Behind the intuition that &amp;ldquo;the number 23 is too small compared to the large number 365,&amp;rdquo; there are &lt;strong>&amp;ldquo;253 invisible threads (pairs)&amp;rdquo;&lt;/strong> woven by 23 people.&lt;/p>
&lt;p>Next time you go to a place where people gather, try to imagine not just the visible &amp;ldquo;number of people,&amp;rdquo; but the &amp;ldquo;threads of combinations&amp;rdquo; that exist innumerably among them. The way you view the world should change just a little bit mathematically.&lt;/p></description></item><item><title>The Two Envelopes Paradox: The Collapse of Logic and Decision-Making Traps Caused by Infinite Expected Values</title><link>http://kenji.blog/en/p/two-envelopes-paradox/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/two-envelopes-paradox/</guid><description>&lt;img src="http://kenji.blog/p/two-envelopes-paradox/img/two_envelopes.jpg" alt="Featured image of post The Two Envelopes Paradox: The Collapse of Logic and Decision-Making Traps Caused by Infinite Expected Values" />&lt;h2 id="1-the-ultimate-choice-to-switch-or-not-to-switch">1. The Ultimate Choice: To Switch or Not to Switch?
&lt;/h2>&lt;p>You are standing on the final stage of a game show. On the table in front of you are &lt;strong>two identical-looking envelopes (A and B)&lt;/strong>.
The host says to you:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;One envelope contains &lt;strong>twice as much money&lt;/strong> as the other. Please choose one.&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>After some hesitation, you choose &lt;strong>Envelope A&lt;/strong>.
Just as you are about to look inside, the host whispers the devil&amp;rsquo;s temptation:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;You can &lt;strong>exchange&lt;/strong> your Envelope A with the remaining Envelope B right now if you want. Would you like to switch?&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>Now, should you switch your envelope?&lt;/p>
&lt;hr>
&lt;h2 id="2-the-infinite-loop-derived-from-expected-value-calculations">2. The &amp;ldquo;Infinite Loop&amp;rdquo; Derived from Expected Value Calculations
&lt;/h2>&lt;p>Let&amp;rsquo;s exercise some mathematical thinking here.
Suppose the amount in your Envelope A is $X$ yen.
According to the rules, the amount in Envelope B is either &amp;ldquo;half of $X$ yen ($\frac{X}{2}$)&amp;rdquo; or &amp;ldquo;twice $X$ yen ($2X$)&amp;rdquo;. The probability for each is $\frac{1}{2}$ (50%).&lt;/p>
&lt;p>Now, let&amp;rsquo;s calculate the &lt;strong>expected value (the estimated average amount) if you switch envelopes&lt;/strong>.&lt;/p>
$$ E = \frac{1}{2} \times \left(\frac{X}{2}\right) + \frac{1}{2} \times (2X) $$
$$ E = \frac{X}{4} + X = \frac{5}{4}X = 1.25X $$
&lt;p>A surprising result emerges.
By simply switching envelopes, the expected value jumps to &lt;strong>$1.25$ times&lt;/strong> (a 25% increase) the original $X$ yen.
The conclusion becomes, &amp;ldquo;If you think mathematically, it&amp;rsquo;s definitely better to switch!&amp;rdquo;&lt;/p>
&lt;p>However, a &lt;strong>collapse of logic&lt;/strong> occurs here.
Suppose you switched to Envelope B. What happens if the host asks again right after, &amp;ldquo;Do you want to switch back to A after all?&amp;rdquo;
The exact same calculation formula applies, and this time it means &amp;ldquo;Switching from B to A will increase the expected value by 1.25 times.&amp;rdquo;&lt;/p>
&lt;p>In other words, &lt;strong>just by continuously switching &amp;ldquo;from A to B&amp;rdquo; and &amp;ldquo;from B to A&amp;rdquo;, the theoretical expected value will keep increasing infinitely&lt;/strong>. This clearly contradicts reality (the contents of the envelopes are fixed from the start and do not increase just because you switch them).&lt;/p>
&lt;div class="mermaid">graph TD
Start["You choose Envelope A (contains X yen)"] --> Think["Calculate if it's profitable to switch"]
Think --> Case1["Envelope B has half (X/2 yen) : 50% probability"]
Think --> Case2["Envelope B has double (2X yen) : 50% probability"]
Case1 --> Calc["Expected Value = (X/4) + X = 1.25X"]
Case2 --> Calc
Calc --> SwitchToB["Switch to Envelope B! (contains Y yen)"]
SwitchToB --> ThinkAgain["Calculate again"]
ThinkAgain --> Case3["Envelope A has half (Y/2 yen) : 50% probability"]
ThinkAgain --> Case4["Envelope A has double (2Y yen) : 50% probability"]
Case3 --> Calc2["Expected Value = 1.25Y"]
Case4 --> Calc2
Calc2 --> SwitchToA["Switch back to Envelope A!"]
SwitchToA --> Start
style Calc fill:#ff9999,stroke:#333,stroke-width:2px
style Calc2 fill:#ff9999,stroke:#333,stroke-width:2px
style SwitchToA fill:#ff4444,color:#fff,stroke:#333,stroke-width:4px&lt;/div>
&lt;p>Why did a seemingly perfect expected value calculation produce such a strange paradox?&lt;/p>
&lt;hr>
&lt;h2 id="3-demystifying-the-mathematical-trick-the-swap-of-variables">3. Demystifying the Mathematical Trick: The Swap of Variables
&lt;/h2>&lt;p>The trap of this paradox lies in &lt;strong>&amp;ldquo;how the random variable $X$ is used&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;p>In the previous calculation formula, we treated the amount $X$ in Envelope A as a &lt;strong>fixed constant&lt;/strong>, and assumed Envelope B is either &amp;ldquo;$\frac{X}{2}$ or $2X$&amp;rdquo;.
However, what is actually fixed is the &lt;strong>&amp;ldquo;total amount of money in the two envelopes&amp;rdquo;&lt;/strong>, or the &lt;strong>&amp;ldquo;smaller amount&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;p>Let $S$ be the amount in the envelope with less money. Then, the envelope with more money contains $2S$.
There are only two possible scenarios for the entire game (the probability of each is $\frac{1}{2}$).&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Pattern 1:&lt;/strong> Envelope A you chose has the smaller amount ($S$), and Envelope B has the larger amount ($2S$)&lt;/li>
&lt;li>&lt;strong>Pattern 2:&lt;/strong> Envelope A you chose has the larger amount ($2S$), and Envelope B has the smaller amount ($S$)&lt;/li>
&lt;/ul>
&lt;p>Now, let&amp;rsquo;s correctly calculate the expected values for &lt;strong>&amp;ldquo;not switching&amp;rdquo;&lt;/strong> and &lt;strong>&amp;ldquo;switching&amp;rdquo;&lt;/strong> the envelopes.&lt;/p>
&lt;p>&lt;strong>Expected value when not switching $E_{stay}$:&lt;/strong>
&lt;/p>
$$ E_{stay} = \frac{1}{2} \times S + \frac{1}{2} \times 2S = \frac{3}{2}S = 1.5S $$
&lt;p>&lt;strong>Expected value when switching $E_{switch}$:&lt;/strong>
You get $2S$ in Pattern 1, and $S$ in Pattern 2.
&lt;/p>
$$ E_{switch} = \frac{1}{2} \times 2S + \frac{1}{2} \times S = \frac{3}{2}S = 1.5S $$
$$ E_{stay} = E_{switch} $$
&lt;p>The expected values match perfectly!
In the first incorrect calculation, we treated the $X$ in Pattern 1 (which is actually $S$) and the $X$ in Pattern 2 (which is actually $2S$) as &lt;strong>different values using the same variable $X$&lt;/strong>, which created the illusion that &amp;ldquo;switching increases the expected value.&amp;rdquo;&lt;/p>
&lt;div class="mermaid">pie title "The Truth of Expected Values (assuming the smaller amount is S)"
"Expected value of not switching (1.5S)" : 50
"Expected value of switching (1.5S)" : 50&lt;/div>
&lt;hr>
&lt;h2 id="4-what-if-you-open-the-envelope">4. What If You Open the Envelope?
&lt;/h2>&lt;p>The paradox seems to be resolved. However, a deeper problem awaits.&lt;/p>
&lt;p>What if you &lt;strong>looked inside your Envelope A before exchanging envelopes&lt;/strong>?
When you open Envelope A, you find &lt;strong>&amp;ldquo;10,000 yen&amp;rdquo;&lt;/strong> inside.&lt;/p>
&lt;p>At this moment, $X = 10000$ becomes a fixed value.
Envelope B contains either &amp;ldquo;5,000 yen&amp;rdquo; or &amp;ldquo;20,000 yen&amp;rdquo;.
What happens if we apply the very first calculation formula here?&lt;/p>
$$ E_{switch} = \frac{1}{2} \times 5000 + \frac{1}{2} \times 20000 = 2500 + 10000 = 12500 $$
&lt;p>The expected value is 12,500 yen. It is certainly higher than the current 10,000 yen.
Moreover, since $X$ is now a &amp;ldquo;specific constant&amp;rdquo; of 10,000 yen, the previous counterargument of the &amp;ldquo;swap of variables&amp;rdquo; no longer applies.
In this case, is it &lt;strong>absolutely better to switch&lt;/strong>?&lt;/p>
&lt;h3 id="the-disproof-by-bayesian-inference-the-missing-prior-distribution">The Disproof by Bayesian Inference: The Missing &amp;ldquo;Prior Distribution&amp;rdquo;
&lt;/h3>&lt;p>In response to this, mathematicians introduced the concept of the &lt;strong>&amp;ldquo;prior distribution of amounts (prior probability)&amp;rdquo;&lt;/strong>.
The question is whether we can truly say that 5,000 yen and 20,000 yen are each inside with a $\frac{1}{2}$ probability.&lt;/p>
&lt;p>For example, suppose the maximum budget for the show is 100 million yen. If you open Envelope A and find &amp;ldquo;60 million yen&amp;rdquo;, the probability that Envelope B contains &amp;ldquo;120 million yen&amp;rdquo; is zero (because it&amp;rsquo;s over budget). In other words, as the amount in Envelope A gets larger, the probability that Envelope B is &amp;ldquo;double&amp;rdquo; must decrease, and the probability that it is &amp;ldquo;half&amp;rdquo; must increase.&lt;/p>
&lt;p>When calculating the expected value using Bayes&amp;rsquo; theorem assuming an arbitrary prior distribution $P(x)$, it has been mathematically proven that &lt;strong>under any realistic probability distribution (where the sum is 1), there is no magical distribution that makes it &amp;ldquo;better to switch&amp;rdquo; for all amounts of $X$&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="5-the-infinite-trap-connection-to-the-st-petersburg-paradox">5. The Infinite Trap: Connection to the St. Petersburg Paradox
&lt;/h2>&lt;p>There is only one case where it is &amp;ldquo;better to switch for all $X$&amp;rdquo;.
That is only if we assume the show&amp;rsquo;s budget is &lt;strong>infinite&lt;/strong> and all amounts (1 yen, 2 yen, 4 yen, 8 yen&amp;hellip; up to infinity) appear uniformly—an &amp;ldquo;improper prior distribution&amp;rdquo; (a distribution whose sum is infinity).&lt;/p>
&lt;p>However, in the real world, no television station has infinite assets.
The bug caused by this &amp;ldquo;infinite expected value&amp;rdquo; shares deep roots with the &lt;strong>St. Petersburg paradox&lt;/strong> (the problem of how much a person would be willing to pay for a gamble with an infinite expected value).&lt;/p>
&lt;h2 id="6-conclusion-the-terrors-of-probability-and-expected-value">6. Conclusion: The Terrors of Probability and Expected Value
&lt;/h2>&lt;p>Even though the &amp;ldquo;Two Envelopes Paradox&amp;rdquo; consists only of simple multiplication and addition, it teaches us the following lessons:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Errors caused by ambiguity in definitions&lt;/strong>: If you do not clarify what a variable refers to (whether $X$ always refers to the same amount), logic can easily collapse.&lt;/li>
&lt;li>&lt;strong>The illusion of &amp;ldquo;no information = 50% probability&amp;rdquo;&lt;/strong>: The assumption that &amp;ldquo;because we don&amp;rsquo;t know, it must be fifty-fifty&amp;rdquo; (the principle of insufficient reason) can sometimes lead to fatal miscalculations.&lt;/li>
&lt;li>&lt;strong>The difficulty of handling infinity&lt;/strong>: Introducing the concept of &amp;ldquo;infinity,&amp;rdquo; which cannot be applied to the real world, into calculation formulas produces results that defy common sense.&lt;/li>
&lt;/ol>
&lt;p>The next time in life you think, &amp;ldquo;The grass is greener on the other side, so it&amp;rsquo;s better to switch,&amp;rdquo; remember this paradox. In your calculation formula, the variables might just be getting swapped.&lt;/p></description></item></channel></rss>