Real Numbers: A Marching Band Challenge, Expected Damage, and Bayes’ Rule

Sawyer introduces a marching-band expected-value puzzle and uses linearity and Bayesian updating to solve a monster-attack problem.

SaSawyer연사 · Jane Street
채널
Jane Street
게시일
2020년 7월 7일
영상
9:40
읽기
3분
슬라이드
4
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

In this episode, Sawyer asks how many rows of a randomly stepping marching band will be in step, leaving that challenge for viewers. He explains linearity of expectation and solves an earlier problem about monster damage, including an update after observing a first attack of four damage.

  1. 1A marching band puzzleForty musicians form ten rows of four and randomly choose a starting foot. The challenge asks for the expected number of rows in step.
  2. 2Linearity of expectationThe expected sum of random variables equals the sum of their expectations, and constants can be factored out.
  3. 3A mixed monsterThree equally likely monster types deal damage uniformly over ranges 1–6, 1–12, and 1–20; expected first-attack damage is 41/6.
  4. 4Update after four damageBayes’ rule changes the probabilities of timid, aggressive, and deadly monsters to 5/9, 5/18, and 1/6.
  5. 5Predict the second attackWeighting the type-specific mean damage by those updated probabilities yields 5.5.

핵심 정리

  1. Linearity of expectation lets us add expected values without computing the full distribution of a sum.
  2. Three standard dice have an expected sum of 10.5.
  3. The first monster attack has expected damage 41/6 under the specified mixture of monster types.
  4. A first attack of four damage changes the probabilities of the monster types through Bayes’ rule.
  5. After that observation, the expected damage of the second attack is 5.5.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
01

Marching bands and linearity

Sawyer poses a puzzle about rows of marching musicians. He introduces expected value and shows how linearity gives the mean sum of three dice.

Welcome back to Real Numbers. After introducing expected value last episode, we will use it to explore another problem involving a probabilistic average.

You are photographing a marching band with 40 members arranged in ten rows of four. Each musician independently chooses a left or right starting foot with equal probability. What is the expected number of rows whose four members march in step?

The marching-band photo
슬라이드 1 / 4The marching-band photoThe illustration shows rows of four and the desired synchronized step.

For the bonus, suppose exactly 20 students start on the left foot and 20 on the right, but all 40 are randomly arranged into the ten rows. What is the expected number of in-step rows? The episode leaves both questions for viewers.

Expected value is a probability-weighted average of the outcomes of a random process. Its useful linearity property says E[X + Y] = E[X] + E[Y], and E[aX] = aE[X] for a constant a.

A fair six-sided die has expected value 3.5. The distribution of the sum of three dice is more complicated, with middle values more likely than extreme values. But linearity gives E[X + Y + Z] = 3.5 + 3.5 + 3.5 = 10.5 without calculating that distribution.

Last week’s problem involved a video-game monster equally likely to be timid, aggressive, or deadly. Its damage is uniform from 1 to 6, 1 to 12, or 1 to 20 respectively. What is the expected damage of its first attack?

02

The first monster attack

Three equally likely monster types have different damage distributions. Direct calculation and linearity both give an expected first-attack damage of 41/6.

Calculate the unconditional probability of each damage value by summing over the possible monster types. For damage 1 through 6, all three types can produce each value, giving probability 1/10 per value.

Only aggressive or deadly monsters can deal damage 7 through 12, giving probability 2/45 per value. Damage 13 through 20 requires a deadly monster and has probability (1/3) × (1/20) = 1/60 per value.

Probability of 13 damage
슬라이드 2 / 4Probability of 13 damageOnly the deadly monster can deal 13 damage, giving probability 1/3 × 1/20.

Multiply each damage value by its probability and add: (1+…+6)/10 + (7+…+12)×2/45 + (13+…+20)/60 = 41/6, or about 6.833.

A shorter method separates damage into timid, aggressive, and deadly contributions, only one of which is nonzero for a given monster. Their expected contributions are (1/3)×(7/2) = 7/6, (1/3)×(13/2) = 13/6, and (1/3)×(21/2) = 7/2. Linearity again gives 41/6.

03

Updating after an observation

Seeing four damage makes a timid monster more likely. Bayes’ rule produces a second-attack expectation of 5.5.

The bonus asks for the expected damage of the second attack after the first deals four. Although all three types could deal four, that observation changes how likely each type is. We must update the prior probabilities rather than simply reuse 41/6.

The unconditional probability of four damage is 1/10. Bayes’ rule gives P(timid | 4) = [(1/6)×(1/3)]/(1/10) = 5/9; similarly P(aggressive | 4) = 5/18 and P(deadly | 4) = 1/6.

Bayesian update after four damage
슬라이드 3 / 4Bayesian update after four damageThe formulas calculate the posterior probabilities of all three monster types.

The probabilities sum to one, but now favor a timid monster. Four damage is possible for all types, yet it accounts for a larger share of the timid monster’s narrower range. In contrast, a first attack of 16 would identify the monster as deadly.

Assuming the second attack follows the same type-specific distribution, weight the means by the updated probabilities: (5/9)×(7/2) + (5/18)×(13/2) + (1/6)×(21/2) = 11/2 = 5.5.

Expected damage of the second attack
슬라이드 4 / 4Expected damage of the second attackThe calculation weights the type-specific means by the updated probabilities to obtain 5.5.

Now return to the marching band: find the expected number of in-step rows when each musician chooses a starting foot independently, and then when exactly 20 choose each foot and the members are randomly arranged. Submit your reasoning.

같은 채널의 다른 글

1:48:29EN
JSJane Street· 2026년 10월 16일How 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.코딩 에이전트Developer productivity평가(Evals)+2
1:36:37EN
JSJane Street· 2026년 9월 23일Aaron 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장1:05:45EN
JSJane Street· 2026년 9월 11일Cyrus 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 Collaboration개발 워크플로와 테스트+2
1:25:00EN
JSJane Street· 2026년 9월 2일Eric 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 & curation개발 워크플로와 테스트Investing+2
슬라이드 7장1:16:29EN
JSJane Street· 2026년 8월 26일Grant 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 & attentionMathematics머신러닝 기초+1
27:39EN
JSJane Street· 2026년 8월 21일3Blue1Brown 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