A Balanced Game of War and the Probability of Three Taxis

Sawyer introduces conditional probability through a card-game challenge, then solves an earlier six-car puzzle in two ways.

SaSawyerSpeaker · Jane Street
Channel
Jane Street
Published
Jun 6, 2020
Video
7:15
Read
4 min
Slides
3
Original
English
Open on YouTube
Scroll to read and the video shrinks to the bottom-right corner. Captions follow your reading language.
Reading languageAvailable in 2 languages
You're reading the original English.
SUMMARY

In 30 seconds

In this Real Numbers episode, Sawyer asks for the probability that Clara wins Damian’s ace of diamonds on the first move of a balanced game of War. He explains conditional probability with a die example, leaving the card-game problem for viewers to solve. He then solves the previous episode’s puzzle: assuming each car is independently a yellow taxi with probability one-half, the chance of at least three consecutive taxis among six cars is 5/16. He demonstrates both a state table and a case split on the middle two cars.

  1. 1The balanced War challengeClara and Damian each shuffle one complete suit. Sawyer asks for the probability Clara wins Damian’s ace on the first move.
  2. 2Conditional probabilityFor events A and B, the joint probability is P(A) multiplied by P(B given A), whether or not they are independent.
  3. 3A table of taxi runsTrack zero, one or two consecutive taxis, plus a state for having already seen three. After six cars, the desired probability is 5/16.
  4. 4Split on the middle carsEvery run of three among six includes the third or fourth car. Conditioning on those two positions gives a second route to 5/16.

Takeaways

  1. For any events A and B, P(A and B) = P(A) × P(B given A).
  2. Even and greater-than-three outcomes on a fair die have a joint probability of 1/3, not the 1/4 obtained by assuming independence.
  3. A state table can track the current run of taxis and an absorbing state for an already completed run of three.
  4. Splitting on the third and fourth cars yields the same 5/16 probability of a run of at least three taxis.
  5. The probability of winning the ace in the new War puzzle is left open in this episode.
FULL TEXT

Read the edited text by chapter

Transcript only
01

A balanced game of War

Sawyer explains the game’s battle and tie rules. He asks the probability of Clara winning Damian’s ace on the first move.

This week’s Real Numbers problem concerns the first move in War, a card game. Two players each shuffle their cards and flip the top card; the higher rank wins the battle and collects both cards.

When the ranks tie, the players declare war. Each deals three more cards and then flips another card for a second battle. The winner collects all ten cards; for this version, if the second battle also ties, a coin flip determines who gets them. A war is the only way a player can lose an ace from their deck.

Clara and Damian play a balanced version: Clara takes all 13 clubs, Damian takes all 13 diamonds, and they set the other 26 cards aside. Each shuffles their suit. What is the probability that Clara wins Damian’s ace of diamonds on the first move? I will leave that question for you to solve.

02

Conditional probability

The general multiplication rule works for dependent events. A fair-die example shows why independence cannot simply be assumed.

To approach it, we can use conditional probability. For independent events, the probability that both occur is the product of their individual probabilities. More generally, for any events A and B, P(A and B) equals P(A) multiplied by P(B given A). The latter asks how likely B is assuming A has occurred.

For example, roll a fair die. Let A be an even result and B a result greater than three. Each event has probability 1/2. Given that the result is even, the possibilities are 2, 4 and 6, and two of those are greater than three. Thus P(B given A) is 2/3 and P(A and B) is 1/2 × 2/3 = 1/3.

Conditional probability for a die roll
SLIDE 1 / 3Conditional probability for a die rollThe joint event is computed using the probability of greater than three given an even roll.

If we incorrectly assumed independence, we would get 1/2 × 1/2 = 1/4. The joint probability is greater than that product, so these events are correlated. Use the general formula as one tool for the War puzzle.

03

Solving the taxi puzzle

A state table tracks consecutive taxis in six positions, giving 5/16. A second solution splits cases according to the middle two cars.

Now for last week’s question: among six cars, what is the probability of seeing at least three yellow taxis consecutively when each car is a taxi with probability 1/2? One computational approach builds a table as we inspect the cars from front to back.

The columns represent positions one through six. The first three rows track whether the current run of consecutive taxis has length zero, one or two. A fourth row records that we have already seen a run of three; once probability enters that row, it stays there.

For the first car, the probabilities of a zero-length and a one-taxi run are each 1/2. At each later position, a non-taxi resets the current run to zero, while a taxi extends it by one. Each outcome has probability 1/2. The completed-run row is the exception: it is absorbing.

Taxi-run probability table
SLIDE 2 / 3Taxi-run probability tableThe bottom row tracks the probability that three consecutive taxis have appeared by each position.

Each column should sum to one, providing a check that no probability has been lost. The value in the completed-run row after the sixth car is 5/16. That is the probability that a run of at least three occurred somewhere in the line.

A second method starts in the middle. Every group of three consecutive cars among six contains the third car or the fourth. If neither middle car is a taxi, which occurs with probability 1/4, there cannot be a run of three.

Exactly one of the two middle cars is a taxi with probability 1/2. By symmetry, consider the third car being a taxi and the fourth not: a run of three then requires both the first and second cars to be taxis. That conditional probability is 1/4.

If both middle cars are taxis, which has probability 1/4, we need either the second or fifth car to be a taxi. Inclusion–exclusion gives 1/2 + 1/2 − 1/4 = 3/4 for that conditional probability.

The middle-cars case split
SLIDE 3 / 3The middle-cars case splitWhen both middle cars are taxis, inclusion–exclusion gives a 3/4 chance that the second or fifth is also a taxi.

Adding the cases gives (1/4 × 0) + (1/2 × 1/4) + (1/4 × 3/4) = 5/16, matching the table. The new challenge remains: work out the chance that Damian loses his ace of diamonds on the first move of the balanced game of War.

More from this channel

1:48:29EN
JSJane Street· Oct 16, 2026How AI Is Changing Programming: John Krazit and Ron MinskyRon Minsky, John Krazit · Jane StreetJane Street’s AI tooling lead and the Signals and Threads host examine agent infrastructure, security, code review and the changing experience of writing software.Coding agentsDeveloper productivityEvals+2
1:36:37EN
JSJane Street· Sep 23, 2026Aaron Bauer on Teaching Software Engineering in the Age of AIRon Minsky, Aaron Bauer · Jane StreetHow learning goals, active practice and editor design shape engineering education when models can generate the code.AI in EducationSoftware engineeringEducation+2
9 slides1:05:45EN
JSJane Street· Sep 11, 2026Cyrus Omar on Live Programming and a Computational Commons for Humans and AICyrus OmarA demonstration of Hazel shows how immediate feedback, structured collaboration and carefully scoped permissions could support people and AI agents working together.Programming LanguagesHuman-AI CollaborationDeveloper workflows & testing+2
1:25:00EN
JSJane Street· Sep 2, 2026Eric Mannes on Turning Messy External Data Into Trading ResearchRon, Eric Mannes · Jane StreetFrom commodity futures and an Excel risk system to point-in-time datasets and AI, Eric Mannes explains the domain knowledge behind data engineering at Jane Street.Data quality & curationDeveloper workflows & testingInvesting+2
7 slides1:16:29EN
JSJane Street· Aug 26, 2026Grant Sanderson and Alok Puranik: Positional Encodings Through Group TheoryGrant Sanderson, Alok Puranik · 3Blue1BrownStarting with assumptions about attention, they derive matrix exponentials and connect rotations, decay and Jordan blocks to RoPE and ALiBi.Transformers & attentionMathematicsML fundamentals+1
27:39EN
JSJane Street· Aug 21, 20263Blue1Brown and Jane Street on Trading, Machine Learning and CultureGrant Sanderson, Nitya, In Young, Craig, Alok · 3Blue1BrownGrant Sanderson talks with Jane Street colleagues about market making, shared compute, research and the paths that brought them to the firm.Machine LearningFintechCompany Culture+2