The coin flip conundrum PoShen Loh

When the Wright brothers
had to decide

who would be the first to
fly their new airplane

off a sand dune,
they flipped a coin.

That was fair:

we all know there’s an equal chance
of getting heads and tails.

But what if they had
a more complicated contest?

What if they flipped coins repeatedly,

so that Orville would win as soon as
two heads showed up in a row on his coin,

and Wilbur would win as soon as heads
was immediately followed by tails on his?

Would each brother still have had an equal
chance to be the first in flight?

At first, it may seem they’d still have
the same chance of winning.

There are four combinations
for two consecutive flips.

And if you do flip a coin just twice,

there’s an equal chance
of each one – 25%.

So your intuition might tell you
that in any string of coin flips,

each combination would have
the same shot at appearing first.

Unfortunately, you’d be wrong.

Wilbur actually has
a big advantage in this contest.

Imagine our sequence of coin flips
as a sort of board game,

where every flip determines which
path we take.

The goal is to get from start to finish.

The heads/tails board looks like this.

And this is the head/head board.

There’s one critical difference.

Heads/heads has a move that sends you
all the way back to the start

that heads/tails doesn’t have.

That’s why heads/heads
takes longer on average.

So we can demonstrate that this is true
using probability and algebra

to calculate the average number of flips
it would take to get each combination.

Let’s start with the heads/tails board,

and define x to be the average
number of flips to advance one step.

Focus only on the arrows.

It has two identical steps,

each with a 50/50 chance of staying
in place or moving forward.

Option 1: If we stay in place by getting
tails, we waste one flip.

Since we’re back in the same place,

on average we must flip x more times
to advance one step.

Together with that first flip,

this gives an average of x + 1
total flips to advance.

Option 2: If we get heads
and move forward,

then we have taken exactly one total flip
to advance one step.

We can now combine option 1
and option 2 with their probabilities

to get this expression.

Solving that for x gives us an average
of two moves to advance one step.

Since each step is identical,

we can multiply by two and arrive
at four flips to advance two steps.

For heads/heads,
the picture isn’t as simple.

This time, let y be the average number
of flips to move from start to finish.

There are two options for the first move,
each with 50/50 odds.

Option 1 is the same as before,

getting tails sends us back to the start,

giving an average
of y+1 total flips to finish.

In Option 2, there are two equally
likely cases for the next flip.

With heads we’d be done after two flips.

But tails would return us to the start.

Since we’d return after two flips,

we’d then need an average
of y+2 flips in total to finish.

So our full expression will be this.

And solving this equation
gives us six flips.

So the math calculates that it takes an
average of six flips to get heads/heads,

and an average of four
to get heads/tails.

And, in fact, that’s what you’d see if you
tested it for yourself enough times.

Of course, the Wright brothers didn’t
need to work all this out;

they only flipped the coin once,
and Wilbur won.

But it didn’t matter:
Wilbur’s flight failed,

and Orville made
aviation history, instead.

Tough luck, Wilbur.

当赖特兄弟
不得不决定

谁将第一个
驾驶他们的新飞机飞出

沙丘时,
他们掷硬币。

这是公平的:

我们都知道
正面和反面的机会均等。

但是如果他们有
一个更复杂的比赛呢?

如果他们反复掷硬币

,奥维尔会
在他的硬币上连续出现两个正面时获胜,而威伯则在他的硬币上立即出现正面和反面时

获胜

每个兄弟仍然有平等的
机会成为第一个飞行的人吗?

起初,他们似乎仍然
有同样的获胜机会。

两次连续翻转有四种组合。

如果你只掷硬币两次,

那么
每一次的机会都是平等的——25%。

所以你的直觉可能会告诉你
,在任何一串硬币翻转中,

每个组合
都有相同的机会首先出现。

不幸的是,你错了。

威尔伯
在这场比赛中实际上占据了很大的优势。

将我们的掷硬币序列想象
成一种棋盘游戏

,每次掷硬币都决定了
我们走哪条路。

目标是从头到尾。

头/尾板看起来像这样。

这是头/头板。

有一个关键的区别。

正面/正面有一个动作,可以让你
一直回到

正面/反面没有的起点。

这就是为什么正面/
正面平均需要更长的时间。

因此,我们可以证明这是正确的,
使用概率和代数

来计算获得每个组合所需的平均翻转次数

让我们从正面/反面板开始,

并将 x 定义为前进一步的平均
翻转次数。

只关注箭头。

它有两个相同的步骤,

每个步骤都有 50/50 的机会留
在原地或向前移动。

选项 1:如果我们通过获得尾巴留在原地
,我们浪费了一次翻转。

由于我们回到了同一个地方

,平均而言,我们必须翻转 x 次
才能前进一步。

与第一次翻转一起,

这给出了平均 x + 1
总翻转来推进。

选项 2:如果我们得到正面
并继续前进,

那么我们已经完全翻转
了一次以前进一步。

我们现在可以将选项 1
和选项 2 与它们的概率结合

起来得到这个表达式。

为 x 解决这个问题,我们
平均需要两步才能前进一步。

由于每一步都是相同的,

我们可以乘以 2 并
得到四次翻转以推进两步。

对于头部/头部
,情况并不那么简单。

这一次,让 y 是
从开始到结束的平均翻转次数。

第一步有两个选项,
每个选项都有 50/50 的赔率。

选项 1 和以前一样,

反面让我们回到起点,

平均 y+1 次翻转完成。

在选项 2 中,
下一次翻转有两种可能性相同的情况。

有了正面,我们将在两次翻转后完成。

但是尾巴会让我们回到起点。

由于我们会在两次翻转后返回,因此

我们平均需要
总共 y+2 次翻转才能完成。

所以我们的完整表达将是这个。

求解这个方程
给了我们六次翻转。

所以数学计算出
平均需要六次翻转才能获得正面/正面

,平均需要四次
才能获得正面/反面。

而且,事实上,如果你
为自己测试了足够多的时间,你就会看到这一点。

当然,赖特兄弟
不需要解决所有这些问题。

他们只掷硬币一次
,威尔伯赢了。

但没关系:
威尔伯的飞行失败

了,相反,奥维尔创造了
航空历史。

运气不好,威尔伯。