Instructor Notes — Chapter 40: Capstone: Your Personal Golf Analytics Dashboard
Chapter 40 closes the book by assembling the yardbook modules into one report, python -m yardbook report, and then asking the question every golfer should ask of every app and coach: is it right? For a real golfer nobody can answer that, because nobody knows the golfer's true skill. The cast are SIMULATED, so their truth is written down, and the chapter's centre of gravity is a validation: run the report on fresh simulated samples and count how often it recovers the built-in truth. Students see the full report on Rosa (four yardsticks, sub-categories with Holm, dispersion, aim, equipment, the practice plan, the progress test and the handicap trend), then the five other cast reports, then the error rates, then the limits. The epilogues close each character's arc with simulated outcomes only, including one that refuses to give Marcus the happy ending the story wanted.
Chapter text: Chapter 40 · Discussion guide: ch-40-discussion.md
Learning Objectives
By the end of the session students should be able to:
- Run the dashboard on a shot file and read every section, including what it skips and why.
- Explain what each of the four yardsticks (target SIM, own-level SIM, PGA TOUR, same-course peers) answers, and state which one the practice plan uses and why.
- Explain the baseline-course caveat and compute a same-course peers value by subtraction.
- Apply the Holm adjustment to a family of sub-category tests and interpret a near-miss.
- Size the rounds needed to prove a change with the power formula, and distinguish "not significant" from "not real".
- Identify a post-hoc split as a noise check, not a test.
- Design and interpret a validation on simulated golfers, including why representative seeds alone mislead.
- List the report's limits and argue which ones a product built on it must display.
Suggested Session Plan (75 minutes)
| Minutes | Activity | Notes |
|---|---|---|
| 0–8 | Hook: Rosa's report in 13 seconds, and "is it right?" | A real golfer has no answer key; a simulated one does (cast.py docstring). |
| 8–16 | The pipeline (40.1) | Eleven sections, one call. Three design rules: degrade gracefully, every number carries its interval, refuse bad data. |
| 16–28 | Four yardsticks and the peers column (40.2) | Rosa APP −3.29 vs a 12, −1.55 vs her level, −13.40 vs the tour, −2.20 vs peers. Walt's flip: 1.81 strokes split 0.92 / 0.81 vs the tour, 1.62 / 0.14 vs SIM 14. |
| 28–38 | Sub-categories; pattern and aim (40.3–40.4) | Only APP 225+ survives Holm (0.009); 100–125 misses at 0.051. Marcus's driver +6.0 yd right; aim 12 yd left, 0.21 saved. |
| 38–44 | Equipment (40.5) | Walt's driver 194 vs 3-wood 191 on course; equipment alone +3.0 of 28.9 yards. |
| 44–56 | The plan and its proof (40.6) | 20 h → 1.50. Real improvement, p = 0.237 at 20 v 20; 118 rounds each side. False alarm +4.40, p = 0.045. Index 16.2 after 80 rounds. |
| 56–70 | Validation (40.7) | 82% / 87% (own level, 20 / 60 rounds). Walk through the four failures: Emma, Tasha, Marcus, Dev. |
| 70–75 | Limits, epilogues, The Last Hole (40.8) | Exit ticket: "Name one thing your report can't see, and one number it gave you that you'd want 40 more rounds to believe." |
50-minute variant. Hook (4), pipeline (4), four yardsticks and peers (10), the plan and the progress test with the false alarm (12), validation and its failures (14), limits (6). Assign 40.3–40.5 as reading with A5, A6, B2 and B5, and the epilogues as reading before the next class.
Key Numbers to Emphasise
| Number | What it means | Source / label |
|---|---|---|
| Rosa vs SIM 12: OTT −0.59, APP −3.29 (−5.30 to −1.35), ARG −0.24, PUTT +0.28, total −3.84 | The plan's yardstick | SIMULATED, seed 154023 |
| Rosa APP: −1.55 own level, −13.40 PGA TOUR, −2.20 same-course peers (−4.16 to −0.33) | Four questions, four answers | SIMULATED |
| Typical 15.4 on the member course vs SIM 15.4: OTT −0.47, APP +1.22 | The baseline-course offset | SIMULATED, 1,000 rounds, seed 2026 |
| Walt's 1.81 strokes: 0.92 OTT / 0.81 APP vs PGA TOUR; 1.62 / 0.14 vs SIM 14 | Why plans use a target-level SIM baseline | SIMULATED (Chapter 30) |
| Holm over 18 tests: APP 225+ p_adj 0.009; APP 100–125 raw 0.003 → 0.051 | One flag, one near-miss | SIMULATED |
| Marcus driver centre +6.0 yd right (p < 0.0005, 285 drives); aim 12 L, 4 long, 4.096 vs 4.306 at the flag | Pattern and aim from a 20-round sample | SIMULATED, seed 78035 |
| Walt: D 194 vs 3W 191 on course (gap 2.8); driver levers +3.0 / +13.4 / +19.3 / +17.1 / +28.9 yd | On-course question, launch-monitor answer | SIMULATED + MODEL |
| Plan: 20 h approach → 1.50 strokes/round (habit 0.44); 🧪 r = 0.03 per hour | The gap model | SIMULATED + assumption |
| 20 v 20: score +1.20 (p 0.237), SG: APP +2.09 (p 0.054); needs 118 (score) and 66 (APP) rounds each side; power 27% / 39% | Real but unproven | SIMULATED, seeds 154023 / 154100 |
| No-change half split: +4.40 strokes, p = 0.045 | A false alarm, caught | SIMULATED |
| Index 14.9 / 15.0 / 13.8 / 16.2 after rounds 20 / 40 / 60 / 80 | The index lags | SIMULATED |
| Recovery, own level: 82% (20 rounds), 87% (60); peers 74% / 88%; truth's CI excludes 0: 59% / 91% | The validation | SIMULATED, seeds 5001–5060, 6001–6030 |
| Marcus peers recovery 25% (20 rounds); driver bias detected 98% | A habit, not a category skill | SIMULATED |
| Epilogues: Rosa 1.54 (118 rounds to prove), Marcus 0.81 (286), Walt 0.51 (1,164), Dev 1.05 (208) | What each fix is worth, and how long proof takes | SIMULATED |
| Club event: Marcus wins 3.6% aiming at flags, 5.5% with dispersion targets (fair 4.2%); seeded edition 15th of 24 | Better bet, no guaranteed win | SIMULATED, 20,000 editions |
| Scheffler 2025 +3.29 → 2026 +2.86: −0.43 (CI −1.16 to +0.31); 645 rounds per period to detect | The progress test on real players | REAL (Case Study 1) |
Likely Misconceptions
- "It ran without errors, so it's right." A pipeline that runs has passed a software test, not a golf test. The chapter spends more words checking the report than building it (40.1's pitfall).
- "The own-level column is my true profile." On the member course a typical golfer of every cast level "gains" about a stroke on approach against his own SIM baseline. The peers column cancels that; the own-level column doesn't (A4, C3).
- "The flagged sub-category is where all my loss lives." Rosa's flag is 225+ yards, but her truth is the same approach multiplier at every distance, and 100–125 missed the flag by 0.001 after adjustment.
- "p = 0.237, so the practice didn't work." The improvement is built in; the test has 27% power at 20 rounds a side. Not significant isn't the same as not real (40.6).
- "My last ten rounds are four shots better than the ten before: proof." Rosa's no-change file produced exactly that (+4.40, p = 0.045). Only a change point declared in advance is a test (A8).
- "My index will show the improvement." Rosa's simulated golfer really improved after round 20, and her index after 80 rounds was 16.2, higher than her starting 15.4 (A9, M5).
- "The report found all six truths, so it works." The default seeds were chosen to be representative. Only fresh seeds give an error rate, and it is about one sample in five at 20 rounds (A10).
The Lab
Run each script from the chapter directory with python code/NN_name.py. Outputs are also saved in code/_out/, along with the HTML reports. There are no order dependencies.
01_assemble_report.py(about 15 s, SIMULATED): Rosa's full report and its tables.02_cast_reports.py(about 50 s, SIMULATED): the six cast reports and the truth check.03_validation_seeds.py(about 45 s, SIMULATED): fresh 20- and 60-round samples and the recovery table.04_progress_rosa.py(about 40 s, SIMULATED): before and after, the false alarm, and the 80-round index.05_epilogues.py(about 35 s, SIMULATED): each fix played out, and Marcus's club event.case_study_01.py(about 30 s, REAL: the progress test on tour players),case_study_02.py(about 25 s, SIMULATED: the course-offset table and Coach Tasha's report),project_checkpoint.py(about 20 s: the command line, run by subprocess, on Dev's file).
What to look for: in 02, that six of six own-level findings match the truth on representative seeds, and that Marcus's peers finding is approach, not off the tee; in 03, how far Marcus's and Emma's rates fall on fresh seeds; in 04, the split with p = 0.045 and the label the report gives it; in 05, the seeded club-event edition that Marcus doesn't win. The pytest file project/tests/test_yardbook_cli.py (about 45 s) is a good demonstration of testing an analytics tool end to end.
Assigning Exercises by Track
- ⛳ Golfer: A1, A2, A3, A8, A9, B1, B3, B4, B5, C1, D1, M5.
- 📊 Analyst: A4, A5, A10, B2, B3, B6, C2, C3, C5, C6, C7, C8, M1, M3, E1 or E2.
- 🏌️ Coach/Fitter: A2, A5, A6, A7, B5, B7, C1, C3, C4, D2, M2, M4.
- 🎰 Betting/DFS: A8, A10, B3, B6, C7, D3, D4, M3, E2.
Everyone should do A1, A3 and A8 (why simulation can validate, which baseline the plan uses, and why a post-hoc split isn't a test). Golfers should run C1 on a cast file and then on their own rounds; they may skip Parts C2–C8 and E.
Connections to Other Chapters
- Chapter 10 and Chapter 12: strokes gained and the choice of baseline (M1).
- Chapter 13: sub-categories and Holm (B2).
- Chapter 14 and Chapter 28: power, rounds needed and honest progress tests (B3, M3).
- Chapter 15 and Chapter 30: the baseline-course caveat and Walt's baseline flip (A3, A4).
- Chapter 18, Chapter 19 and Chapter 38: aim, dispersion and the caddie's 1.45 strokes (M2).
- Chapter 24 and Chapter 25: the driver levers and gap flags (B7, M4).
- Chapter 27 and Chapter 29: the gap model and the lagging index (B4, M5).
- Chapter 34: Dev's model, calibrated but unproven, the same arithmetic as his putting fix (D4).
- Appendix I: the yardbook guide, for students who want to run the package on their own data.
Data and Toolkit Caveats
- Every validation number is SIMULATED. The error rates are the simulator's. If real golfers' errors are correlated in ways the simulator's aren't, real error rates could differ. Say so whenever a rate is quoted.
- Representative seeds. Each cast default seed is the most representative of 60 candidate samples. Use them to teach, never to validate.
- Normal-approximation intervals in the validation. For speed,
03_validation_seeds.pyuses mean ± 1.96 SE; the reports themselves use the bootstrap. - Peers exist only for the member course. On any other course the report omits the column, and the own-level column carries an unknown course offset.
- On-course gap flags are by size only, with their own interval and a "firm" flag; the overlap test belongs to launch-monitor sessions.
- Simulator quirks left in place. The approach multiplier also applies to 3-woods off par-4 and par-5 tees (Rosa's tee 3-wood lateral SD 24.4 instead of 18.8), and water drops replay with the same aim. Fixing them would shift every seeded number in the book.
- 🧪 elements. The practice-response rate (0.03 per hour), Rosa's improvement (approach multiplier 1.30 → 1.187), Walt's 9.0-yard driver fix and Dev's 12-handicap putting, the 23-player club-event field, and the member course's CR 70.8 / Slope 125 are assumptions, and the chapter labels them.
- The "Prove" box uses the level's SIMULATED round SD (4.79 at 15.4), not the golfer's own 20-round SD (5.81 for Rosa). Exercise M3 asks students to argue both sides.
- Two aim numbers for Marcus. The report's 0.21 comes from a pattern fitted to 38 sampled shots; the book's 0.39 uses his true pattern and the full shot model. Both are right for what they measure.