Module 11 · Statistics for Data Analysis
"Final project: delivery performance review"
Plan and start your final project, a statistical review of Harbourline Freight's delivery performance that uses every tool in the course, and check your set-up with three warm-ups.
About 20 minutes
The problem
Harbourline Freight's customers judge it on one thing: does the shipment arrive when promised? The operations director wants a review she can take to the board:
"How reliable are we, really? Where are we worst, and is it getting better or worse? And give the sales team something useful for quoting."
A review like that needs everything in this course: the right averages and spreads, percentiles a customer can plan around, outliers investigated rather than deleted, rates with confidence intervals, tests that separate real changes from noise, and a regression the sales team can use. This lesson sets up the project; the full brief and submission are on the course's project page.
The concept
From questions to statistics
Each of the director's questions maps to a tool:
| Question | Tool | Lesson |
|---|---|---|
| How long do shipments take? | Median, IQR and 90th percentile, by mode and route | 2, 3 |
| How reliable is each route? | On-time rate with a 95% confidence interval | 5, 8 |
| Which shipments went badly wrong? | Histogram, z-scores, the IQR rule | 4 |
| Is anything getting better or worse? | Two-proportion test, 2025 against 2026 | 9 |
| What should a quote look like? | Regression of charge on containers, for one route | 10 |
Definitions first
State them at the top of your workbook, because every number depends on them:
- Transit days =
delivery_date − ship_date, for Delivered shipments only. - On time = transit days ≤ the route's
target_transit_days. - Year = the year of
booking_date. 2026 runs from January to August only.
A fair comparison
Routes have very different targets: one day for Lagos–Ibadan by road, 42 for Shanghai–Onne by sea. Comparing raw transit times across routes is meaningless; compare on-time rates, or days late against each route's own target. And watch for small routes: a route with 36 deliveries has a wide confidence interval.
Example
A first look at on-time performance by route. With a pivot table of delivered shipments (route in rows; count and average of a 1/0 on_time column), sorted by on-time rate, the three least punctual routes are:
| Route | Target | Delivered | On time |
|---|---|---|---|
| Lagos → Ibadan (road) | 1 day | 62 | 69.4% |
| Lagos → Abuja (air) | 1 day | 36 | 69.4% |
| London Heathrow → Lagos (air) | 1 day | 53 | 69.8% |
All three have a one-day target. That's a finding in itself: the least punctual routes aren't the long sea voyages, they're the short trips with no slack. The question for the director isn't only "why are these routes late?" but also "is a one-day promise realistic?" Before saying either, check the confidence intervals: with 36 to 62 deliveries each, the margins are around ±12 to ±15 points, so these three aren't clearly worse than routes in the low 70s.
Overall, 76.6% of the 2,411 delivered shipments arrived on time.
Walkthrough
- Download the logistics dataset. In
shipments.csv, addmode,origin,destinationandtarget_transit_daysfromroutes.csvwith XLOOKUP. - Add
transit_days,on_time(1 or 0) andyear, and filter to Delivered shipments. Write your three definitions at the top of a Notes sheet. - Build a pivot table of on-time rate and count by mode, then by route.
- For each mode, calculate the median, IQR and 90th percentile of transit days.
- Pick the route you'll use for the quoting formula and fit
freight_chargeagainstcontainers. - Open the project brief on the course page and list which tool answers each of its tasks.
Practice
Practice
What percentage of delivered shipments arrived on time (transit days ≤ the route's target)? One decimal place.
Practice
Among sea routes, which route_id has the largest standard deviation of transit days for delivered shipments?
Practice
When a delivered shipment is late, what is the median number of days late (transit days − target)?
Check your understanding
Answer every question to check.