Day 3 · Wednesday · Empirical studio

Can pre-departure information rank late arrivals?

Read before opening the notebookBTS 2025 domestic flights
Important

Do not open the October–December outcomes until your model, information set, and primary measure are fixed. A high score cannot make after-departure information valid at a pre-departure clock.

Dataset card

Dataset
Reporting Carrier On-Time Performance, 2025

Official BTS monthly files; monthly-balanced teaching sample

Your filesbts_2025_development.csv; bts_2025_audit_features.csv; day3_application.ipynb
Empirical questionAmong flights that later completed, were not diverted, and have an observed outcome, can information available before scheduled departure rank arrival at least 15 minutes late?
One rowOne reported domestic flight in the stated retrospective study population.
Period and sampleJanuary–December 2025; 3,000 deterministically selected eligible flights per month.
Outcomedelayed_15: arrival at least 15 minutes late.
Prediction timeBefore scheduled departure.
DevelopmentJanuary–September, using expanding earlier-to-later folds.
Final auditOctober–December; outcome hidden until the system is frozen.
SourceU.S. Department of Transportation, Bureau of Transportation Statistics.
Used inDay 3 concept studio Questions 8–10; empirical Questions 1–6; Day 3 problem set Questions 1–12.

Variables

FieldMeaningUse
row_idStable schedule identityAlignment only
Month, DayOfWeekScheduled calendar fieldsEligible
Reporting_AirlineReporting carrierEligible
Origin, DestScheduled airportsEligible
scheduled_departure_minutesPlanned departure timeEligible
scheduled_arrival_minutesPlanned arrival timeEligible
CRSElapsedTimePlanned elapsed minutesEligible
DistanceScheduled distanceEligible
DepDelayMinutesRealised departure delayToo late
Cancelled, DivertedLater statusDefine exclusions; not predictors
delayed_15Arrival at least 15 minutes lateTarget; hidden in audit
splitDevelopment or auditPartition only

Before you run code

  1. Which claim matches these rows?
    1. A live queue covering every scheduled flight.

    2. A retrospective ranking among flights later known to be completed, non-diverted, and labelled.

    3. The causal effect of contacting a flight.

    4. Annual U.S. delay prevalence.

  2. Which feature must be excluded?
    1. Planned distance.

    2. Scheduled arrival time.

    3. Reporting carrier.

    4. Realised departure delay.

  3. Why use rolling months?
    1. To guarantee 2026 performance.

    2. To make the validation exercise resemble fitting on the past and using the model later.

    3. To ensure every fold has the same prevalence.

    4. To maximise training fit.

Notebook order

  1. Inspect the monthly sample and the target prevalence.

  2. Separate fields known before departure from fields observed later.

  3. Fit preprocessing inside each training window.

  4. Select tree depth using mean fold AP.

  5. Compare the schedule prior, logistic model, selected tree, and forest on identical rolling predictions.

  6. Save the selected model and primary measure.

  7. Open October–December outcomes once and complete Questions 4–6.

After the audit outcomes are opened

  1. Interpreting the final AP

    The frozen forest has audit AP 0.3325 and audit prevalence 0.2251. Which statement is best?

    1. The ranking improves on a no-skill AP reference within this audit population.

    2. The model prevents 33.25% of delays.

    3. The model is 33.25% accurate.

    4. The model is guaranteed to retain the same AP in 2026.

  2. Interpreting the top decile

    Among the 900 highest-scored audit-study flights, 350 are late. Which calculation is the relevant precision?

    1. \(350/900\).

    2. \(350/9{,}000\).

    3. \(2{,}026/900\).

    4. \(900/2{,}026\).

  3. Can the top 900 become tomorrow's queue?
    1. Yes; the ranking has already been audited.

    2. Yes; every audit flight was observed by BTS.

    3. No; membership in the completed, non-diverted, labelled population is known only after the flight, so a prospective study must include all cases eligible at the decision time.

    4. No; AP can never be used for operations.

← Day 3 lecture  ·  All four days →

Oxford · United Kingdom Course home Teaching CV
University of Oxford