Chapter 37 Exercises — Broadcasting and Media Analytics

Difficulty: ⭐ conceptual · ⭐⭐ calculation and interpretation · ⭐⭐⭐ code or judgement · ⭐⭐⭐⭐ open research

All real numbers below come from the chapter's script outputs (code/*_output.txt) or the book's data snapshot. Where an exercise asks you to run code, start from the chapter's scripts and keep the house rules: as_of for anything pre-match, add_tracking on a whole competition, and a 🧪 label on every simulated number. Selected answers are in Appendix I.


Part A — Conceptual ⭐

A1. State the three questions Kavya's newsroom asks before any graphic. For each, give the answer for Rashid Khan's spell in GT v DC (8 April 2026).

A2. The chapter calls the Manhattan in Figure 1 "the right chart for a different audience". Who is that audience, and what do they need that the one-comparison chart leaves out?

A3. Explain the difference between a WP swing and WPA. Which belongs to a delivery and which to a player? Why does showing Kuldeep Yadav's WPA (−0.728) on screen risk telling a false story?

A4. Give two reasons why a broadcaster should fix its win-probability model before a season rather than choose between models match by match.

A5. In your own words, why is a raw head-to-head ("61 balls, 3 dismissals") a weak headline, and why is the batter's record against the bowler's type stronger?

A6. What is as-of filtering? Name three pre-match products where forgetting it causes harm, and rank them by how much harm.

A7. Why must every simulated wagon wheel carry a "simulated" label even when it is only a teaching example? What could go wrong if a viewer screenshots it without the caption?

A8. Notability uses a logarithm. Explain, without formulas, why "1 in 100" should rank as far above "1 in 10" as "1 in 10" ranks above "1 in 1".

A9. The chapter says the phrase "in the data" is "not decoration". What does it protect against? Give an example of a claim where it matters.

A10. Why will this chapter not tell you which cricket chart style earns the most shares? What would you need, and what method would you use, to find out for your own audience?


Part B — Calculation & Interpretation ⭐⭐

B1. In GT v DC, the match produced 419 runs off 240 legal balls. Rashid Khan conceded 17 off 24. (a) Compute the run rate of the rest of the match. (b) Compute his relative economy (spell economy ÷ rest-of-match rate). (c) The generator found 111 of 10,408 earlier IPL spells (18+ legal balls) at least this far below their match. Compute the notability.

Answer

(a) (419 − 17) / (240 − 24) × 6 = 402 / 216 × 6 = 11.17. (b) 4.25 / 11.17 = 0.38. (c) −log₁₀(111/10,408) = −log₁₀(0.01066) ≈ 1.97, about 1 in 94.

B2. WP before and after each ball of the last over (era table, Gujarat's WP): 53.9 → 30.7 → 63.3 → 80.5 → 7.7 → 44.4 → 100.0. (a) Compute each ball's swing in points. (b) Which two balls are the largest? (c) Why did a de-clustered labeller with a four-ball separation pick only one of them?

Answer

(a) −23.2, +32.6, +17.2, −72.8, +36.7, +55.6. (b) Miller's six (−72.8) and the run-out (+55.6). (c) After choosing the six, any ball within four legal balls (the rest of the over) was skipped, including the run-out.

B3. The par for the match was 191.5: the IPL 2023–26 mean so far (188.4) plus a shrunk venue effect. The venue's raw season-adjusted effect was +4.9 runs over 94 matches, with prior weight k = 54.8 matches. (a) Compute the reliability and the shrunk effect. (b) If the ground had only 20 matches with the same raw effect, what would the shrunk effect be?

Answer

(a) Reliability = 94 / (94 + 54.8) = 0.63; shrunk = 4.9 × 0.63 ≈ +3.1. (b) 20 / (20 + 54.8) = 0.27; 4.9 × 0.27 ≈ +1.3.

B4. KL Rahul against leg-spin (as of 7 April 2026): 718 balls, observed SR 124.5, league-expected SR 138.2, fitted k = 302 balls. (a) Compute the shrunk SR. (b) Compute the weight a 61-ball head-to-head would get at the same k.

Answer

(a) Weight = 718 / (718 + 302) = 0.704; shrunk = 138.2 + 0.704 × (124.5 − 138.2) = 138.2 − 9.6 ≈ 128.6 (matches the output). (b) 61 / 363 ≈ 0.17.

B5. At the Arun Jaitley Stadium (IPL 2023 to 7 April 2026), chasing sides won 8 of 19. Across all grounds, 112 of 223. The chapter's Wilson intervals are 23–64% and 44–57%. Write the commentator's sentence, and explain why "a batting-first ground" is not supported.

Answer

"Chasing sides have won 8 of the last 19 here, a little under half, but that's too few games to call it a batting-first ground." The venue interval (23–64%) contains the league's 50%, so the data cannot distinguish this ground from average.

B6. David Miller's IPL death-overs strike rate (2023 to 7 April 2026) was 153.9 and his SR+ 91.8. Shubman Gill's middle-overs strike rate was 158.2 with SR+ 113.6. (a) Roughly what par strike rate does each SR+ imply? (b) Why are the two pars different?

Answer

(a) Par ≈ SR × 100 / SR+: Miller ≈ 153.9 / 0.918 ≈ 168; Gill ≈ 158.2 / 1.136 ≈ 139. (b) Different phases, and a different mix of seasons weighting each batter's balls. Death-overs par is higher than middle-overs par (IPL 2024–26 league SR: death 171.61, middle 144.50, from Chapter 7).

B7. A/B planning (baselines are hypothetical inputs). From the chapter's table, detecting a 20% lift needs 85,862 viewers per version at a 0.5% baseline and 3,841 at 10%. (a) Why does the requirement fall so steeply as the baseline rises? (b) With 20,000 viewers per version at a 1% baseline, the minimum detectable lift is about 30%. What does that mean for a test that finds "no difference"?

Answer

(a) Rarer events produce fewer successes per viewer, so the absolute difference between versions is tiny relative to the noise. You need many more viewers to see it. (b) The test could only have detected lifts of about 30% or more. "No difference" means "no difference of 30% or more", not "no difference".

B8. In Case Study 1 (Sydney, January 2026), Australia chased 160. Of 36 earlier Tests with fourth-innings targets of 140–180, the chasing side won 28 (2 were drawn or had no result). Compute the notability of the observed outcome, "the chasing side won", and of the hypothetical opposite, "the target was defended or the match drawn". Which one makes the notes at a 0.7 cut-off?

Answer

Observed: −log₁₀(28/36) ≈ 0.11. Opposite: −log₁₀(8/36) ≈ 0.65. Neither clears 0.7, but the observed outcome is nowhere near it: chasing 160 is what usually happens. Scoring the outcome that happened, not its opposite, is an easy thing to get backwards. The first draft of case_study_01.py did exactly that.


Part C — Code It ⭐⭐–⭐⭐⭐

C1. Analyze this match ⭐⭐. Run 02_wp_worm.py on the Raipur match (MI v RCB, 10 May 2026, id 1529297). Produce the annotated worm with four de-clustered labels plus the final ball, using both the pooled and the era table. Expected output: a table of WP at the end of each over under both models, the five labels, and a sentence on the largest disagreement between the models.

Hint

Change MATCH and the moments list; the rest of the script is match-agnostic. The project checkpoint already ran the era table on this match. Its four de-clustered swings were Padikkal's dismissal (2.6), Patidar's (5.1), Krunal Pandya's six (17.3) and Bhuvneshwar Kumar's six (19.4), plus the forced final ball. Before running, predict whether the pooled table gives Mumbai (batting first) a higher WP at the break than the era table, using the reasoning in §37.3. Then check. Report the over where the two models differ most, and say whether a viewer would have seen a different "favourite" at that moment.

C2. Build this metric ⭐⭐⭐ — the haul fact. Add the "haul" fact family from §37.7's Try-it to match_facts. For the bowler with most wickets in the match, count earlier spells (18+ legal balls) with at least as many wickets and economy no worse. Expected output: on the Raipur match, a note for Bhuvneshwar Kumar's 4 for 23 with its k of n; on GT v DC, Rashid Khan's 3 for 17. Report both notabilities.

Hint

Reuse _spells (it already has wkts, econ and rel_econ). Two design decisions to write into the pool string: (1) economy or relative economy as the second condition. Relative economy is fairer across eras and pitches, and is consistent with the spell fact. (2) Whether ties in wickets count as "at least as good". They should, or a 4-wicket haul is compared only with 5-wicket hauls. Check that the new fact does not simply duplicate the spell fact on GT v DC, where both would describe Rashid Khan. Decide which one the notes keep, and why.

C3. Build this metric ⭐⭐⭐ — the partnership fact. Generalise Case Study 2's rescue-partnership fact into a function partnership_fact(match_balls, history_balls, wicket) that returns a Fact for the highest stand for any wicket, against all earlier stands for the same wicket. Expected output: run it for the 9th wicket of Pakistan v South Africa (2026 World Cup) and reproduce "0 of 372" for the full-member pool. Then run it for every wicket of GT v DC and report the most notable stand.

Hint

charts.partnership_table(match_balls(...), innings) returns one row per stand, with wicket (the wicket that ended it, or the unbroken stand's number). Loop over history matches once and build a {wicket: array of stand runs} dictionary, so each query is a vectorised comparison rather than a fresh loop. Case Study 2's loop takes about a minute over all women's T20Is; caching the dictionary makes repeated queries instant. Remember that stands in a chase end when the target is reached, so unbroken stands are right-censored. Decide whether to include them, and say so.

C4. Evaluate this player ⭐⭐. Use milestone_watch with as_of to produce pre-match milestone lists for every 2026 IPL playoff match (Qualifier 1, Eliminator, Qualifier 2, Final). Expected output: one small table per match. Then check after each match which milestones were actually reached, using career_milestones.

Hint

Pass st.as_of(ipl_balls, match_date) as history and the match's own players (batters, non-strikers and bowlers) as players. The playoff ids are in the matches table (stage is "Qualifier 1", "Eliminator", "Qualifier 2", "Final"). A milestone watch that never converts is still useful context, but count how often it converts. If a "within 100 runs" watch converts rarely in a single match, the range is too wide for a commentary pack, and a "within 50" range might serve better.

C5. Predict this match ⭐⭐⭐. Build the par-score bar for both innings of the IPL 2026 final (id 1535465, 31 May 2026). Use as_of the final's date for the ParTable and the venue effect. Expected output: projections at 6, 10 and 15 overs for Gujarat Titans' first innings, the par line, and one caption sentence. (Hint: the final finished early in RCB's chase, 161/5 in 18 overs. What does a par bar say about a second innings?)

Hint

A par bar is a first-innings graphic. In a chase the target is the par, and the right graphic is the WP worm or a "required v projected" bar. Use ParTable only for Gujarat's innings. Build par from IPL 2023 onwards as of 31 May 2026 plus the shrunk effect for the Narendra Modi Stadium. For the caption, compare Gujarat's final 155/8 with the par and with the 80% band at 15 overs, then say in one sentence what the chase graphic should show instead.

C6. Optimize this strategy ⭐⭐. Write ab_plan(p_base, lifts, n_available) that returns, for each lift, whether the test is adequately powered and the minimum detectable lift at n_available. Expected output: a table for p_base = 0.02, lifts = 10%, 20%, 50% and n_available = 15,000, with a one-line recommendation. Use hypothetical inputs and label them so.

Hint

st.ab_sample_size(0.02, 0.20) returns 21,109, so a 20% lift is under-powered at 15,000 per version, and a 10% lift (80,682 needed) far more so. A 50% lift (3,826 needed) is comfortably powered. st.ab_mde(0.02, 15_000) gives the smallest lift you could detect. The recommendation should say either "test a bolder change" or "pool the test over more posts". Print a line at the top of the table that the baseline is an assumed input, not a measurement.

C7. Settle this debate ⭐⭐⭐ — the direction test. Every outcome-based fact (the T20 last_over fact, the Test chase fact) must score the rarity of the outcome that happened. Write a small test function, check_direction(fact_builder), that runs a fact builder on two real matches with opposite outcomes from similar states (for example, one IPL chase of 11–15 off the last over that succeeded and one that failed). It should assert that the rarer outcome gets the higher notability. Expected output: the two matches you chose, both notabilities, and "pass" or "fail" for match_facts's last_over family and case_study_01.py's chase fact.


Part D — Judgment & Format Transfer ⭐⭐⭐

D1. Would the T20 notability facts work for ODIs? Go through each family (margin, aggregate, spell relative economy, losing side's top score, fastest fifty-plus, last-over equation, WP facts) and say whether it transfers as is, needs a new threshold (e.g., spells of 7+ overs), or should be dropped. Which new ODI families would you add?

Hint

Margin, aggregate and losing-side top score transfer with ODI pools. Spell relative economy transfers, but the threshold should rise to something like 7+ overs (42 legal balls), or a 3-over burst will be compared with full spells. "Fastest fifty-plus" works but is less interesting in ODIs than "fastest hundred-plus". The last-over equation should become something like "the last five overs" or "needing N off the last 10", because ODI chases are decided over longer stretches. WP facts need an ODI model, and the book has none at this point. New families worth adding: centuries and their pace, ten-over spells relative to the match, middle-overs (11–40) collapses, and DLS-affected results flagged rather than scored (Chapter 23).

D2. Wendell argues: "Your notability score will always prefer weird things to important things. A dull 1-run win and a dull hat-trick both score high; the innings that actually won the game might not." Is he right? Use GT v DC and the Raipur match as evidence, and propose a combined score (rarity and importance) that you would defend to an editor.

Hint

Wendell is half right. Notability alone rewarded Rashid Khan's spell, which was rare and important (+0.570 bowling WPA, the largest in the match). It missed Bhuvneshwar Kumar's 4 for 23 at Raipur, which was important, because no family covered it. One defensible combination: rank by notability, but guarantee a place in the notes for the largest |WPA| batter and bowler (importance), each with its own evidence line. Another: multiply notability by a leverage weight. Either way, the editor must be able to see why each fact is there.

D3. Women's cricket and the pool problem. For a women's World Cup, should notes compare against women's history only, or also against men's? Argue both sides using Case Study 2's numbers, and state the rule you would adopt for The Long Room.

Hint

For women's history only: the audience's comparison is the women's game, the records are women's records, and Case Study 2's 71-run stand is "the highest in women's T20Is in the data". That is a clean claim. For adding men's: it can show scale. But it invites a hierarchy (women's numbers as a footnote to men's) and mixes very different scoring environments; recall from Chapter 9 that the same chase state carries very different WP in the two games. A defensible rule: compare within the women's game by default, and use a men's comparison only when the claim is the comparison, labelled as such.

D4. A producer wants to show live WP for a Test using the lead tracker plus "a feel for the pitch". What would you tell them? What are the minimum inputs a defensible Test WP graphic needs, and what should go on screen until such a model exists?

Hint

A "feel" is not a model, and a WP number on screen claims to be one. Minimum inputs: innings number, lead or target, wickets in hand, overs bowled in the match (as a proxy for time left), and ideally overs remaining in the scheduled match, which needs day and session information this data lacks. Validate it out of time before it airs. Until then, show the lead tracker and a plain-language state ("England lead by 159 with two wickets left") and let the commentators supply the judgement.

D5. Eye test against data. Choose one claim from the chapter's GT v DC notes and describe what a coach watching the match would know that would strengthen, weaken or reframe it. Write the commentator's line that combines both.


Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐

M1 (with Chapter 6) ⭐⭐. Chapter 6 introduced shrinkage and regression to the mean. Identify every place in Chapter 37 where a small sample was shrunk, smoothed or shown with an interval. For each, say what the unshrunk number would have been (or would have looked like) on screen and why it would mislead.

M2 (with Chapter 9) ⭐⭐⭐. Recompute the batting and bowling WPA for GT v DC under both the pooled and the era tables. Which players' WPA changes sign? Write a paragraph on what that means for "player of the match by WPA" graphics.

M3 (with Chapter 7) ⭐⭐. Take three Chapter 7 charts (Manhattan, worm, partnership bars) for GT v DC and convert each into a story graphic for a 1:1 feed post using storytelling.canvas and type_scale. Each must have a headline under twelve words with a comparison. Keep the Chapter 7 colour conventions.

M4 (with Chapter 11) ⭐⭐⭐. Build matchup cards as of 8 April 2026 for every Delhi Capitals top-six batter against Gujarat's main spinner, Rashid Khan (leg-spin type), and for every Gujarat top-six batter against Kuldeep Yadav (left-arm wrist-spin type). Decide before looking which two you would put on air, then look. Did the pre-commitment rule stop you showing a cherry-picked card?

M5 (with Chapter 22) ⭐⭐. The par used Chapter 22's shrunk venue effects. Produce a par-score table (era mean + shrunk effect) for every IPL ground with 20+ matches as of 1 March 2026. Which grounds' "par" differs most from their raw 2023–26 average, and why?

M6 (with Chapter 35 and Chapter 36) ⭐⭐⭐. The leakage test in §37.8 compared "2026 so far" on the morning of 8 April with the whole-season line. Build the same comparison for every player in the GT v DC XIs and both teams' bowlers. Then answer: if a fantasy projection (Chapter 36) or a betting model (Chapter 35) had used the whole-season lines as inputs for this match, which players would it have over- or under-rated most? Give the three largest differences and explain why a backtest built that way would look better than reality.

Hint

Use st.as_of(balls, "2026-04-08") against balls[balls["season"] == "2026"] and batting_summary/bowling_summary on both. Early-season "as of" lines are tiny samples (KL Rahul: 1 run in 2 innings), so the honest pre-match input is not the as-of 2026 line alone. It is a projection that blends it with earlier seasons (Chapter 25). The leak and the small sample are two different problems; do not solve one by creating the other.


Part E — Research & Extension ⭐⭐⭐⭐

E1. A notes generator for the WPL. Adapt match_facts to the Women's Premier League: choose the pool (WPL only? WPL plus women's T20Is between full members?), refit WP v0 on women's chases, and add at least two new fact families. Run it on every WPL 2026 match. Write a short methods note and publish three example notes with their evidence lines.

E2. A Test win-probability graphic. Using men's Tests in the data, build a first Test WP model from state variables (innings, lead or target, wickets in hand, overs bowled in the match) and draw it for the Sydney 2026 Test alongside the lead tracker. Validate it out of time (fit before 2020, test 2020–26). Be explicit about what the data lacks (no session or day labels, no weather).

E3. An engagement study you can actually run. Design (do not fabricate) an A/B study for your own cricket account or a club's: two versions of one graphic type over a series of matches. Write the pre-registration (outcome, sample size from ab_sample_size using your baseline, stopping rule, analysis). If you run it, report the result with its interval. If you do not, explain what you expect to learn and why the sample size is what it is.