Chapter 39 Quiz
Twenty questions. Answers and explanations are hidden under each question.
Multiple choice (one point each)
1. How many modules, and how many public functions and classes, does Crease contain at the end of the book?
- A. 24 modules, 374 functions
- B. 36 modules, 588 functions
- C. 36 modules, 617 functions
- D. 40 modules, 700 functions
Answer
C. Chapter 39's architecture script counts 36 modules and 617 public functions and classes (612 documented), 14,969 non-blank code lines. B is Chapter 38's checkpoint count, which covers top-level functions only and leaves out the 29 public classes. A and D are not counts any script in the book prints.
2. Which module is imported by the most other Crease modules?
- A.
data· B.charts· C.states· D.winprob
Answer
C. states.py (Chapter 19) is imported by four modules — win
probability, resources, live projection and batting order all stand on its expected-runs tables and
Markov model.
3. Which Streamlit cache should hold a fitted win-probability model?
- A.
st.cache_data· B.st.cache_resource· C.st.session_state· D. No cache: refit each time
Answer
B. A fitted model is a shared, read-only object; cache_resource
returns the same object without copying it. cache_data would pickle and copy it on every
call.
4. In the IPL 2026 final, what did WP v1 (fitted on 2023–25 chases) give Royal Challengers Bengaluru at the innings break, needing 156?
- A. 0.594 · B. 0.689 · C. 0.865 · D. 0.986
Answer
C. 0.865, the same number Chapter 20 reported. 0.594 was the first-ball figure; 0.986 was after six overs of the chase.
5. Which delivery was the largest single win-probability swing of the final?
- A. Kohli's last boundary · B. Shubman Gill caught off Hazlewood (2.2) · C. B Sai Sudharsan caught off Bhuvneshwar Kumar (3.4) · D. Venkatesh Iyer's six off Rabada (1.3 of the chase)
Answer
C. Gujarat's WP fell from 0.368 to 0.277 (−0.090). Gill's dismissal (−0.077) was second; Iyer's six (+0.043) was the biggest swing of the chase.
6. Who had the highest WPA in the final?
- A. V Kohli · B. VR Iyer · C. Rasikh Salam · D. Washington Sundar
Answer
C. Rasikh Salam's 3 for 27 added 0.112 of a win. Iyer (+0.078) led the batters; Kohli's 75* added 0.073 because the chase was nearly won before most of his runs came.
7. With the announced team sheets and Gujarat at home, the pre-match model gave Gujarat:
- A. 0.509 · B. 0.562 · C. 0.571 · D. 0.594
Answer
C. 0.571, matching Chapter 24. 0.509 is the same with no home term; 0.562 is Elo alone with home.
8. Why does the dashboard pass model=fit_pooled_t20(as_of) to build_predictor for the IPL?
- A. It is faster · B. The IPL-only default logit learns a negative weight on Elo · C. The pooled model includes women's matches · D. The IPL has no Elo ratings
Answer
B. With about 520 IPL matches the competition-only logit puts a negative coefficient on Elo; pooling twelve men's competitions fixes it (Chapter 24).
9. After 10 overs of the 2026 IPL first innings (71 innings), the live simulator's mean miss was 16.7 runs. What was run rate × 20's?
- A. 13.3 · B. 20.0 · C. 24.0 · D. 35.1
Answer
C. 24.0. 35.1 is run rate × 20 after six overs; 13.3 after fifteen.
10. Which statement about the pre-match IPL model's 2026 re-test is correct?
- A. The favourite won 64.1% · B. It beat a coin flip by 10% on Brier · C. It was 0.7% worse than a coin flip on Brier · D. It was not tested
Answer
C. Brier 0.2516 against 0.2500 for a coin; the favourite won 54.2% of 72 decided matches. 64.1% is the men's full-member T20I figure for 2023–26.
11. On the dashboard's run, de Kock's shrunk strike rate against off-spin is 115.5 with a 90% interval of 108.5–122.4. What is the expected rate for a batter of his skill?
- A. 112.9 · B. 120.9 · C. 125.8 · D. 151.6
Answer
C. 125.8. 112.9 is his raw rate; 120.9 is what an average left-hander scores on the same balls (Chapter 11's absolute check); 151.6 is his shrunk rate against right-arm pace.
True or false, with a one-line reason (one point each)
12. A smoke test proves that a model's predictions are correct.
Answer
False. It proves the code runs and gives output of the right shape on real input; correctness needs out-of-time evaluation (model cards) and reproduction tests.
13. The dashboard's figures in Chapter 39 are screenshots of the running app.
Answer
False. A headless browser captured only the loading skeleton; the
figures are drawn by the app's own fig_* functions from the same cached results, and are labelled
that way.
14. WP v1 was almost perfectly calibrated on all 2026 men's T20 chases but under-confident in IPL chasers.
Answer
True. Calibration slope 0.99 overall; in the IPL 1.33, with chasers winning 63.1% of states where the model averaged 56.8%.
15. The real total of Gujarat Titans' innings (155) fell outside the 80% live projection range at least once.
Answer
False. It was inside the range after all 19 overs, which is pleasant but proves little about calibration on its own.
16. In Case Study 2, Punjab Kings' 95.6% top-four probability came mainly from the model rating them as one of the strongest teams.
Answer
False. On the eve of the season the model gave them only 30.1%; the 95.6% came from the points they had banked (six wins and a washout from seven).
Short answer (two points each)
17. Name the three layers of app.py and say what each is allowed to do.
Answer
(1) Data and model functions: compute and cache; know nothing about the screen. (2) Figure builders: take computed results, return a matplotlib Figure. (3) Page functions: arrange widgets, call (1) and (2), display. One point for the layers, one for the rules.
18. Give two reasons the Match Centre uses a women's WP model for women's matches, with a number for each.
Answer
Chapter 20: the men's model overrates women's chasers by 9.4 points even with a women's environment; the women's own model scored a Brier of 0.0916 against 0.1111 for the men's model with women's context. Case Study 1: at the WPL 2026 final's innings break the two models gave Bengaluru 30.2% (women's) v 19.8% (men's).
19. What must a model card contain beyond accuracy, and why?
Answer
Known failure modes and what the model must not be used for (also training data and period, and the baseline it was tested against). Without them, a user will apply the number where it breaks: for example WP v1 on the last ball, or the IPL pre-match model for betting.
Applied scenario (three points)
20. A broadcaster wants Crease's Live Projection on air for the IPL 2027 season. List three things you must do before the first match, each tied to a number from this chapter.
Answer
Any three of: (1) refit the simulator on innings up to the end of 2026 and freeze it before the season (the chapter's test froze it before 2026); (2) re-check coverage, because 80% ranges held only 69.0% after 15 overs in 2026 — widen late ranges or say so; (3) use the broadcast line's rounding and "k in n" phrasing, because the median missed by 16.7 runs on average after 10 overs and a precise-looking number misleads; (4) never use the men's chain for WPL matches (women's spread 0.11 v men's 0.07); (5) add the live check to the smoke and reproduction tests so a data refresh cannot silently break it.
Scoring: 11 multiple choice (1 each) + 5 true/false (1 each) + 3 short answer (2 each) + 1 scenario (3) = 25 points. 22–25: you could run Crease for a club. 17–21: solid; reread 39.8. Below 17: rerun the chapter's scripts and read their outputs beside the text.