Chapter 2 Quiz — Cricket Data, the Toolkit, and Your First Analysis

20 questions. Answers and explanations are hidden under each question. A scoring guide is at the end.


Multiple choice

1. In the toolkit's canonical batting table, "balls faced" means:

  • A. every delivery on which the player was the striker
  • B. every legal delivery on which the player was the striker
  • C. deliveries as striker, excluding wides (no-balls count)
  • D. deliveries as striker, excluding wides and no-balls
Answer

C. A batter can hit a no-ball, so they faced it; a wide is by definition out of reach, so it isn't counted as faced. Option B would also exclude no-balls.

2. Cricsheet stores the over of the delivery "0.5" as over index 0. The toolkit's over column for that delivery is:

  • A. 0 B. 0.5 C. 1 D. 5
Answer

C. over_no = ov["over"] + 1 converts Cricsheet's zero-based over numbers to the 1-based numbers commentators use, so the first over is over == 1.

3. In the IPL 2026 final's first over, two consecutive wides were bowled before the fifth legal ball. Their ball_in_over values are:

  • A. 5 and 6 B. 4 and 4 C. 5 and 5 D. blank (NaN)
Answer

C. An illegal delivery is labelled with the legal ball still to be bowled. It's legal_ball_index that is blank (NaN) on wides.

4. Which of these is not credited to the bowler as a wicket by bowling_summary?

  • A. stumped B. hit wicket C. run out D. caught and bowled
Answer

C. BOWLER_WICKET_KINDS contains bowled, caught, lbw, stumped, caught and bowled and hit wicket. Run-outs are fielding dismissals.

5. A bowler concedes a wide (1 run), a no-ball hit for four (5 runs total), a bye (1) and three dot balls in an over that is then completed with two singles. Runs conceded by the bowler are:

  • A. 8 B. 9 C. 10 D. 7
Answer

A. Legal balls: the bye, three dots and two singles = 6. Runs charged to the bowler: wide 1 + no-ball 5 + singles 2 = 8. The bye is not charged to the bowler. (If you chose B, you charged the bye — the most common slip.)

6. Why does the toolkit cache parsed data as Parquet?

  • A. Parquet is the only format pandas can read
  • B. Cricsheet publishes Parquet files
  • C. Parsing JSON is slow; reading a columnar Parquet file is fast and allows reading only some columns
  • D. Parquet files are always smaller in memory than JSON
Answer

C. In the chapter's timing, Tests took 15.8 s to parse and 0.66 s to read from Parquet. D is false: in memory the Tests table is about 2 GB regardless of what format it was read from — Parquet saves disk space and lets you read fewer columns.

7. The first IPL season (April–June 2008) is labelled in Cricsheet's season column as:

  • A. 2008 B. "2008" C. "2007/08" D. "IPL 2008"
Answer

C. Seasons are strings, and three IPL seasons use slash labels ("2007/08", "2009/10", "2020/21"). Filtering on "2008" returns nothing.

8. How many matches has Cricsheet withheld from the men's T20I archive in this snapshot, and why?

  • A. 0 — the archive is complete
  • B. 166, matches featuring the Afghanistan men's team (or played in the Afghanistan Premier League), by Cricsheet policy
  • C. 166, matches with incomplete ball-by-ball data
  • D. 14, Afghanistan Tests
Answer

B. The archive's README states it. (D describes the Tests archive: 14 withheld.)

9. Across all 20 competitions in the snapshot, how many deliveries carry two wickets?

  • A. 0 B. 13 C. 295 D. 14,705
Answer

B. Thirteen — none in the IPL. The toolkit keeps only the first wicket's details but records the count in n_wickets_on_ball. (14,705 is the number of IPL deliveries with any wicket.)

10. The median number of legal balls in a men's Test in the snapshot is closest to:

  • A. 557 B. 1,000 C. 1,949 D. 2,699
Answer

C. 1,949. 557 is the median ODI; 2,699 is the maximum Test.

11. Who led IPL 2026 in wickets, per the chapter's computation?

  • A. B Kumar, 28 B. K Rabada, 29 C. JC Archer, 25 D. Rashid Khan, 21
Answer

B. Kagiso Rabada, 29 wickets at an economy of 9.68. B Kumar was second with 28 at 7.95.


True or false (with a one-line justification)

12. The deliveries table has exactly one row per delivery recorded in Cricsheet's JSON.

Answer

True. The chapter's census counted 295,732 IPL deliveries in the JSON and 295,732 rows in the Parquet table.

13. A batter's innings count in batting_summary includes innings in which they were run out as the non-striker without facing a ball.

Answer

True — innings are counted from appearances as striker or non-striker. (But beware: a player who never faced a ball in the data you pass in has no row at all, because rows come from balls faced.)

14. bowling_summary's overs column can be multiplied by 6 to get balls bowled.

Answer

False. overs is a scorecard label: 4.3 means 4 overs and 3 balls (27 balls), not 4.3 × 6. Use the balls column.

15. In the IPL, 25 matches have no winner, and this is a data-quality problem.

Answer

False. All 25 are ties (16, settled by super overs and recorded in eliminator) or no-results (9). The value is missing by design.

16. Grouping men's T20I deliveries by the bowler name always gives one row per real person.

Answer

False. 38 names in the men's T20I deliveries map to two or more different people (check with bowler_id); "Rashid Khan" is three bowlers (Belgium, Nepal, ICC World XI).


Short answer

17. Name four things Cricsheet does not record that ball-tracking or hand-charting would provide.

Answer

Any four of: where the ball pitched (line and length); ball speed; swing/seam/spin movement; shot direction; fielding positions; dropped catches; misfields and runs saved; DRS ball-tracking projections. (Batting positions and player roles are also not labelled.)

18. Explain in two or three sentences why the toolkit counts outs by player_out rather than by batter.

Answer

The dismissed player isn't always the striker: a non-striker can be run out. Counting by player_out credits the dismissal to the right person — the non-striker gets the out, and the striker, who survived, doesn't.

19. Give two reasons the IPL 2026 sixes-per-match figure can legitimately differ between two analyses of the same data.

Answer

(1) The match filter: the chapter's season_table keeps only matches won outright without D/L (71 in 2026, 19.51 sixes a match), while a count over all 74 matches gives about 19.3. (2) Whether super overs are included. Others: whether no-result matches with some play are counted, and whether "sixes" includes non-boundary sixes (it shouldn't).


Applied scenario

20. Nusrat wants to compare the Bangladesh Premier League's 2026 season with IPL 2026. She writes:

bpl = load_deliveries("bpl")
b26 = bpl[bpl["season"] == "2026"]
print(batting_summary(b26).head(10))

and gets an empty table. List the checks she should make, in order, and explain what each could reveal. Then name one further caution before comparing the two leagues' leading batters.

Answer
  1. Check the season labels: load_matches("bpl").groupby("season")["start_date"].agg(["min", "max", "size"]). The check shows the latest BPL season is labelled "2025/26" and began on 26 December 2025. So season == "2026" finds nothing — and even Crease's filter_balls(year=2026) misses it, because Crease dates a season by its first match (2025). Use the label.
  2. Check coverage: the inventory shows the BPL's last match in the snapshot was 23 January 2026 — confirm the season is complete in the data before treating it as a full season.
  3. Check names: the BPL has 7 names that map to more than one player; summarise the leaders by batter_id / bowler_id as well as by name, or pin them with only_player().

Further caution: the leagues differ in quality of opposition, conditions and season length; raw runs and averages aren't comparable across leagues without adjustment (Chapter 26's league translation).


Scoring guide

Score What it means What to do next
18–20 You can trust yourself with the toolkit Move on to Chapter 3; try Exercises C4 and C7
14–17 Solid, with a gap or two Re-read the sections behind the questions you missed (§2.5 for 2–3, §2.7 for 1, 4, 5, 13–14, §2.8 for 7–10, 15)
10–13 The ideas are there but the definitions are shaky Re-run code/02_parse_and_cache.py and check each column against §2.5 and §2.7
Below 10 Start again from §2.3 Work through the chapter with the scripts open, then retake the quiz

Scoring: one point per question; for True/False, the point requires a correct justification.