Syllabus: F1 Analytics: Data Science on Real Timing Data (15 weeks)

Track: πŸ“Š Analytics (Chapters 1–2, 12–14, 19–27, 34–37, 40) Level: Upper-undergraduate or master's elective in data science, statistics or sports analytics Format: Two 75-minute sessions a week: one lecture-discussion, one hands-on lab Prerequisites: Introductory statistics (regression, confidence intervals); Python with pandas, or a willingness to learn it in the first two weeks with Appendix A

Course description

Formula One produces a dataset on every lap: sector times, tyre compounds, pit-lane times, race-control messages, weather and car telemetry. This course uses the free OpenF1 and Jolpica-F1 data to teach the whole analytics workflow on a problem that fights back. Students clean messy timing data, separate tyre wear from fuel burn, rate drivers through a network of teammates, forecast races with walk-forward validation, and simulate thousands of races to find strategies that survive a safety car. The semester builds one system, Box Box, a race-strategy simulator, one module at a time.

Learning outcomes

By the end of the course, students will be able to:

  1. Build a reproducible pipeline from raw API data to analysis-ready tables, and document every cleaning decision with its effect on the sample.
  2. Define a performance metric precisely (clean lap, degradation rate, pit loss, green-flag pass) and show how the choice of definition changes the answer.
  3. Separate confounded effects in observational data (fuel burn from tyre wear, car from driver, traffic from pace) and state what remains unidentified.
  4. Report every estimate with n and an interval, using Wilson intervals for proportions and the bootstrap for medians.
  5. Build predictive models, validate them walk-forward against naive baselines, and detect leakage.
  6. Design, run and check the convergence of a Monte Carlo race simulation, and use it to compare robust and clean-race strategies.
  7. Communicate a data-driven race story to a non-technical audience with honest, accessible charts.

Required materials

  • The book, free online, with its code and data snapshot.
  • Python 3.11+ and the packages in requirements.txt. No paid data source is needed; FastF1 is optional and never required.

Weekly schedule

Readings are each chapter's index.md unless stated. "Lab" scripts live in the chapter's code/ folder and are run from the chapter folder. Scripts marked ⏱ build a cache or take several minutes on first run: run them before class.

Wk Topic Reading Lab (chapter scripts) Project and assessment
1 Why the car is fast, and a first look at the data Ch 1; Appendix A as needed Setup clinic; 01_first_speed_trace.py, 03_g_forces_from_telemetry.py, 04_peak_g_by_circuit.py Setup check-in
2 The data pipeline: sources, cleaning, joins Ch 2; Appendix J Β§Β§ on OpenF1 and Jolpica 03_cleaning_funnel.py, 04_joins_across_sources.py, 05_telemetry_pipeline.py, 06_stint_boundary_fix.py M1 assigned (data)
3 Strategy as optimisation: pit loss, break-even, stop counts Ch 12 02_pit_loss_and_break_even.py, 03_how_many_stops.py, 04_optimise_barcelona.py M1 due; M2 assigned (strategy)
4 The undercut and overcut Ch 13 01_miami_anatomy.py, 03_undercut_study.py, 04_gap_and_model.py
5 Safety cars, VSCs and red flags: hazards and the Singapore gamble Ch 14 02_base_rates_history.py, 03_hazard_model.py, 04_pit_loss_under_neutralisation.py, 07_anchor_c_singapore.py M2 due; M3 assigned (undercut + neutralisation)
6 Reading a lap: sectors, mini-sectors, theoretical best Ch 19 03_theoretical_best.py, 04_anchor_a_suzuka.py, 05_minisector_resolution.py
7 Race pace: fuel correction, traffic and dirty air Ch 20 02_fuel_effect_from_data.py (run first), 03_identification_limits.py, 04_traffic_and_dirty_air.py, 05_race_pace_rankings.py M3 due; M4 assigned (pace + degradation)
8 Driver vs car: teammate gaps, Elo and the teammate chain Ch 21 01_teammate_gaps.py, 04_elo_ratings.py, ⏱ 06_anchor_d_teammate_chain.py (~4 min) Midterm (Parts A and C)
9 Tyre degradation modelling Ch 22 02_fuel_lesson.py (run first), 03_linear_vs_nonlinear.py, 04_mixed_models.py, 07_anchor_b.py
10 Telemetry and team development trends Ch 23, Ch 24 Ch 23: ⏱ 02_lap_profiles.py, 03_profile_charts.py, ⏱ 05_fingerprints.py; Ch 24: 03_development_rates.py, 04_change_points.py M4 due; M5 assigned (montecarlo)
11 Honest visualisation; predictive modelling Ch 25, Ch 26 Ch 25: 02_colour_audit.py, 03_honest_axes.py; Ch 26: 01_baselines.py, 03_race_models.py, 05_leakage.py Capstone proposal due
12 Monte Carlo race simulation Ch 27 01_engine_ingredients.py, 02_anchor_c_singapore.py, 03_convergence.py, 06_validation_usgp.py
13 Pit stops and overtaking Ch 34, Ch 35 Ch 34: 02_three_clocks.py, 04_stationary_time.py, 05_slow_stops.py; Ch 35: 01_counting_passes.py, 05_pass_probability.py M5 due
14 Weather, reliability, penalties Ch 36, Ch 37 Ch 36: 02_track_temp_and_deg.py, 04_weather_forecasting.py, 05_rain_and_safety_cars.py; Ch 37: 01_dnf_history.py, 02_team_reliability.py, 06_penalty_cost.py Capstone forecast pre-registered
15 Capstone: assembling Box Box Ch 40 Chapter 40 code: the command-line tool, the HTML report and the smoke tests Capstone presentations; Final exam (Parts A and B)

Session plans in brief

  • Weeks 1–2: data before models. Spend real time on the cleaning funnel in Chapter 2: 101,949 race laps become 84,881 clean laps, and every step can be argued. The 2025 Miami GP (OpenF1 is missing laps 2–24) and the frozen 2026 Suzuka pole lap are perfect "what would you do?" cases.
  • Week 3: the threshold concept. "Strategy minimises total race time, not lap time." Use the 2026 Barcelona GP decomposition: Hamilton won by 19.561 s even though his strategy cost him about 10 s against Russell's.
  • Week 5: the Singapore gamble. Have students guess before running Anchor C. Most expect the two-stop to win under a high safety-car rate. It does not: the flexible one-stop does.
  • Week 7: the fuel lesson. Run Chapter 20's hook first: in 63.7% of driver-races the fastest clean lap comes in the final quarter, on old tyres. Ask why. The answer (fuel burn hides tyre wear) sets up weeks 9 and 12.
  • Week 8: honest verdicts. Anchor D's Verstappen–Hamilton gap is βˆ’0.230% with a 95% interval of βˆ’0.408 to βˆ’0.069, and the size changes with the method. Have students write the one-sentence verdict before reading the book's.
  • Week 11: baselines and leakage. No model in Chapter 26 beats "pole wins" on top-1 accuracy by a margin that excludes zero. Teach why log loss and Brier score are the better targets.
  • Week 12: convergence. Students should compute how many simulated races they need before trusting a difference, and see why common random numbers matter.

Box Box milestones

Each milestone is a module in project/boxbox/, a project_checkpoint.py that demonstrates it on a race the student chooses (not the book's example), and a one-page memo. Rubrics are in Project rubrics.

Milestone Due Module(s) Must demonstrate
M1 Data foundation Wk 3 data RaceData loader for any 2023–2026 race; a coverage report; a cleaning funnel with counts
M2 First strategy model Wk 5 strategy Enumerate legal strategies, total race time, optimiser; compare with what the winner did
M3 Strategy under uncertainty Wk 7 undercut, neutralisation Undercut gain calculator; SC/VSC hazard and reduced pit loss; an expected-value comparison of box vs stay
M4 Performance models Wk 10 pace, degradation Fuel-corrected race pace with intervals; a degradation model that states its fuel correction and is validated out of sample
M5 Simulation Wk 13 montecarlo A seeded Monte Carlo with SC, DNF and lap-1 draws; convergence check; robust vs clean-race strategy for one race
Capstone Wk 15 cli, report, tests (Ch 40) The assembled tool, a forecast pre-registered in week 14 for a race outside the fitting data, and a scored post-mortem

Students may import the book's version of an earlier module if theirs is broken, with a deduction noted in the rubric. That keeps one bad week from sinking the semester.

Assessment

Component Weight Notes
Weekly labs (best 12 of 14) 20% Script, printed output and a short interpretation; graded complete / partial / missing
Box Box milestones M1–M5 25% 5% each, project rubrics
Midterm exam 15% Midterm, Parts A and C (20 questions, 90 minutes)
Final exam 15% Final, Parts A and B (20 questions, 2 hours)
Capstone 20% Tool, pre-registered forecast, report and presentation
Participation and discussion 5% Using the discussion guides

Late work and reruns

Because every result must reproduce, allow resubmission of a lab within a week if the student's script did not run on the grader's machine but runs after a fix. Do not allow resubmission of the pre-registered capstone forecast after the race: that is the point of pre-registration.

Course policies worth stating on day one

  • Every number has a source. The data, a sourced reference table, or arithmetic on stated inputs. Numbers from memory, from a broadcast or from a website without a source do not count.
  • State the definition and the n. An estimate without its definition, its sample size and an interval is incomplete, however precise it looks.
  • Decisions are graded as decisions. Strategy answers are judged on the reasoning given what was known at the time.
  • Real people. Drivers and teams are discussed through their public results. No speculation about private matters.

Adapting the course

  • Shorter (10 weeks): drop Weeks 10, 13 and 14 and fold Chapter 25 into Week 11. Keep M1–M3 and M5.
  • More statistics: add Appendix E readings in Weeks 5, 8 and 11; add Chapter 38 (betting) as a calibration week.
  • More engineering: swap Weeks 13–14 for Chapters 3 and 11 from the engineering syllabus.

See also: Instructor Guide Overview Β· Common Struggles Β· Chapter notes