Chapter 37 Notes — Broadcasting and Media Analytics

Chapter link: Chapter 37

Overview and learning objectives

Chapter 37 turns the book's analytics into things a fan actually sees: a win-probability worm, a par-score bar, a matchup card, a wagon wheel, auto-generated match notes, a commentary stat pack and social posts. Kavya Subramanian of The Long Room has fifteen minutes after Gujarat Titans 210/4 beat Delhi Capitals 209/8 by one run (Delhi, 8 April 2026). Her rule is that a number is not a story until you say what it is being compared with. "Rashid Khan 4–0–17–3" is data. "4.25 an over in a game that went at 11.17" is a story. "About 1 spell in 94 in the IPL data was that far below its match" is the version she can defend.

Every product in the chapter comes with an honesty rule:

  • Fix and name the win-probability model before the season. At the innings break the era table said 60% and the pooled table 86%.
  • Show a par range built on a shrunk venue effect (par 191.5).
  • Headline a matchup with the most evidence, not the most drama.
  • Label simulated wagon wheels as simulated.
  • Give every "rare" note its k of n and its pool.
  • Compute every stat pack as of the morning of the match.
  • Pre-register any engagement test and size it properly.

The module is storytelling.py (22 functions).

By the end of the chapter students should be able to:

  1. Apply the three questions (what happened, compared with what, how unusual) to turn a statistic into a defensible story graphic.
  2. Read and annotate a win-probability worm, compute per-ball swings, and explain why automatic labellers are pulled toward the last over.
  3. Explain why the on-screen model must be chosen and disclosed before the match, using the 60% v 86% innings-break disagreement.
  4. Build a par-score range with a shrunk venue effect, and a matchup card that leads with a shrunk type record rather than a small head-to-head.
  5. Compute a notability score (−log₁₀(k/n)) and explain how the comparison pool changes the verdict.
  6. Detect leakage in a stat pack (KL Rahul: 1 run in 2 innings as of that morning v 593 in 14 for the whole season).
  7. Plan an A/B test with a sample-size table and interpret "no difference" via the minimum detectable effect.

Where students struggle

  • Decimal precision on screen. Students like "44.4%". The pitfall says round to whole percentages, because no cricket model has one-tenth-point precision.
  • Model choice after the fact. On the era table Miller's six is a cliff (80.5% → 7.7%); on the pooled table it is a large step (77.0% → 17.4%). Students are tempted to pick the more dramatic curve. Make them commit to a model before seeing the curves.
  • The seductive head-to-head. "Rahul v Rashid: SR 96.7, out 3 times" rests on 61 balls. With k = 302 balls a 61-ball record gets a weight of about 0.17. The cherry-picking pitfall (hundreds of pairs searched) links back to Chapter 6.
  • Simulated wagon wheels. When the seed changes, the off-side share of Rahul's runs moves from 16.3% to 34.8% with nothing real changed. Students must never quote a simulated number as a fact about a real player.
  • Notability direction and pool. Scoring the outcome that did not happen is an easy slip (Exercise B8; the first draft of a case-study script did exactly that). Case Study 2 shows the pool (all women's T20Is v full members only) changing which facts qualify.
  • "No difference" in A/B tests. With 20,000 viewers per version at a 1% baseline, only lifts of about 30% or more are detectable. Students read a null result as proof of no effect.
  • Leakage feels pedantic. Show the KL Rahul as-of line next to the whole-season line. The honest line was "1 run in two innings", and he then made 92. Being honest is not the same as being predictive.

Pacing

50-minute session. - 0–8: The hook. Show the scorecard and ask for the story in one sentence before revealing Kavya's three questions. - 8–20: §37.2–37.3, the WP worm, the last-over swings, and which model goes on screen. - 20–30: §37.4–37.5, the par bar (191.5; Gujarat 18 above par) and the matchup card. - 30–42: §37.7, notability and the seven notes. - 42–50: §37.8 (the leak) and the pre-air checklist.

75-minute session. As above, plus 10 minutes on §37.6 (the simulated wagon wheel and what public data can't show), 10 minutes on §37.9 (type scales and A/B planning), and a short critique of a real broadcast graphic chosen by students. Lab time: 45–60 minutes. Each script has a saved *_output.txt alongside it, so students can compare their run with the expected output.

Lecture outline

  1. Data is not a story: the story-graphic definition (one claim, one comparison, one line of context; headline under 12 words); the everything chart; the three questions.
  2. The WP worm: swing per delivery; the last over ball by ball; de-clustered labelling (top_swings, min_sep_balls); WPA credit (Miller +0.639, Kuldeep −0.728; Rashid bowling +0.570 on the era table).
  3. Which model is on screen: era v pooled (innings break 60% v 86%); Chapter 9's 13.4-point underrating of IPL chasers; disclose and fix the model in advance.
  4. The par bar: era mean 188.4 + shrunk venue +3.1 (raw +4.9, k = 54.8, reliability 0.63) = 191.5; projections with 80% ranges.
  5. The matchup card: raw head-to-heads v shrunk type records (Rahul v leg-spin shrunk 128.6 v expected 138.2, 718 balls); "decide the matchups before looking".
  6. Wagon wheels: real outcomes, simulated locations; two seeds, two stories.
  7. Auto-generated notes: naive template v notability; the seven notes; the denominator pitfall; where the generator fails (the women's ninth-wicket stand it had no fact type for).
  8. Stat packs: SR+ by phase, Wilson intervals on venue records, milestone watch, and the as-of leak.
  9. Social-first design (type scale by canvas) and engagement testing (A/B table; minimum detectable effect).
  10. Building a content portfolio; Wendell's test ("does it match what it felt like?").

Live coding demo

Scripts: code/02_wp_worm.py, then code/06_match_notes.py.

  1. Run 02_wp_worm.py (the match id 1527687 is set at the top). Expected: the WP table (innings break POOL 0.863, ERA 0.600) and the last-over lines, e.g. "19.4 … DA Miller six … 80.5 -> 7.7 | 77.0 -> 17.4" and "19.6 … Kuldeep Yadav run out 44.4 -> 100.0 | 52.2 -> 100.0". The script also prints de-clustered picks at min_sep_balls=2.
  2. Live change 1: in st.top_swings(curves["ERA"], n=5, min_sep_balls=4), change 4 to 1. Ask whether the labels now crowd into the last over, and whether the run-out appears. Exercise B2 explains why a four-ball separation picked only one of the two biggest swings.
  3. Run 06_match_notes.py. Expected notes include "Rashid Khan took 3 for 17 … Only 111 of 10,408 earlier IPL spells …", "A 1-run margin: 15 of 523 earlier IPL wins by runs …" and "419 runs in the match; 64 of 1,151 …".
  4. Live change 2: change min_score=0.7 to 0.3 in st.match_notes(...). Ask which extra facts appear and whether any of them deserve air time. (Buttler's 52 off 27 is a candidate; the chapter notes it was about 1 in 5.)
  5. Live change 3 (if time): set MATCH to another IPL 2026 id the class chooses and run the notes generator. Read the output critically against the checklist before praising it.

In-class activity: "Fifteen minutes to air"

Teams of three play Kavya. Each team gets the GT v DC scorecard, the WP table, the par output and the seven notes. In 15 minutes they must produce:

  • (a) one story graphic headline (under 12 words) with its comparison and context line;
  • (b) a commentator's sentence about the venue's chase record that respects the Wilson interval (8 of 19, 23–64%);
  • (c) one matchup caption that leads with evidence, not drama.

Teams swap work and score each other against the chapter's six-point checklist ("Would this survive Wendell?"). If you have more time, give the women's World Cup match from Case Study 2 to half the room and compare which notes each pool produces.

Answers and teaching notes for key exercises

  • B1. Rest-of-match rate 11.17; relative economy 0.38; notability ≈ 1.97 (about 1 in 94). Use this to show how the three questions map onto numbers.
  • B2. Swings −23.2, +32.6, +17.2, −72.8, +36.7, +55.6. The two largest are the six and the run-out, and the four-ball separation suppressed the run-out. The algorithm proposes and the producer disposes.
  • B3. Reliability 0.63, shrunk +3.1; with 20 matches it would be +1.3. Good practice for the shrinkage formula.
  • B4. Shrunk SR 128.6; a 61-ball head-to-head gets weight ≈ 0.17. This is why the type record leads the card.
  • B7. The requirement falls steeply as the baseline rises because rarer events produce fewer successes per viewer. "No difference" at 20,000 per version and a 1% baseline means no lift of about 30% or more.
  • D2 (Wendell: "notability prefers weird things to important things"). He is partly right. Notability measures rarity, not importance. A good answer pairs notability with WP impact (Miller's six had both) and keeps an editor's judgement in the loop.

Assessment ideas

  • Portfolio piece (as §37.10 recommends): one story graphic, one honest matchup card and five match notes for a match of the student's choice. Grade against the checklist, with marks for stating k, n and the pool.
  • Critique assignment: find a real broadcast or social cricket graphic, identify which honesty rule it breaks (if any), and redesign it. Students must not invent numbers; any new number has to come from the data.
  • Short-answer item on leakage: explain why the stat pack must use as_of, with the KL Rahul example.
  • A/B planning item: given a baseline and lift, read the sample size from the table and judge whether a planned test is adequately powered.

Format, gender and region diversity notes

  • Women's cricket is central, not an add-on. Case Study 2 moves the notes generator to the women's T20 World Cup 2026 (Pakistan v South Africa at Edgbaston). Pakistan were 50/8; Fatima Sana and Tuba Hassan then added 71 off 54 balls for the ninth wicket, and no earlier women's T20I ninth-wicket stand in the data reached 71. The generator had no partnership fact type and missed the night's real headline. Exercise D3 asks whether women's notes should be compared with women's history only.
  • Tests: Case Study 1 builds notes and a lead tracker for a Sydney Test (January 2026). It is a good counterweight to the T20-heavy main text, and Exercise D4 asks what a defensible Test WP graphic would need.
  • Data gaps: every Rashid Khan number in the chapter comes from franchise leagues, because Afghanistan's men's internationals are not in the data. The chapter labels this on screen and so should students. Wagon wheels and fielders exist only in the simulated layer.
  • Region: the hook is an IPL match, but Kavya is Chennai-born, the second case study is a Pakistan women's story, and the type-scale section serves phone audiences everywhere. Encourage portfolio pieces from students' own leagues, such as the BPL or women's domestic cricket.

Connections