Statistics Quest

Delivery times before and after a routing change (paired)

Average delivery time per route for 60 courier routes of a fictional parcel company, Swiftdune Couriers, measured over four weeks before and four weeks after a new route-optimisation system was introduced. Each row is one route with both measurements, so the data are naturally paired. Routes differ a lot from each other, while the improvement is small and consistent — exactly the situation where a paired analysis is far more powerful than treating the two columns as independent samples (compare with delivery_independent).

Rows
60
Columns
6
One row is
one delivery route (before and after)
Version
v1

Data dictionary

ColumnTypeUnitSummaryDescription
route_id
Route
idRoute identifier.
zone
Zone
category5 levels: North, South, East, West, CentralDelivery zone.
distance_km
Route distance
numberkmmean 35.26, median 29.35, SD 19.71, range 11.8–120Length of the route.
stops
Stops
integerstopsmean 27.45, median 28, SD 6.091, range 14–43Average number of drop-off stops per run.
before_min
Before
numberminutesmean 43.09, median 41.9, SD 8.234, range 30.5–75.9Average delivery time per parcel in the four weeks before the change.
after_min
After
numberminutesmean 40.4, median 38.8, SD 8.562, range 25.5–70.7Average delivery time per parcel in the four weeks after the change.

What it is good for

  • Compute differences (after − before) and run a paired t-test with a confidence interval.
  • Contrast the paired result with an (incorrect) two-sample t-test on the same columns.
  • Check the distribution of differences (normality, outliers) and use the Wilcoxon signed-rank test as an alternative.

Methods: paired t-test, Wilcoxon signed-rank test, two-sample t-test (for contrast), confidence interval for a mean difference, scatter plot of before vs after.

Data quality notes

  • Before and after are strongly correlated (r > 0.9) because route characteristics persist.
  • Each value is a four-week average, not a single delivery.
  • No missing values.

Provenance and licence

Each route has a baseline average time driven by its distance and number of stops (route-to-route sd ≈ 12 minutes). After = before-level − 3 minutes (true saving) + route-specific variation in the saving (sd 1.5) + measurement noise (sd 2.5 for each period). Times are averages over four weeks, rounded to 0.1 minute.

Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241018). It does not describe real people or organisations; any resemblance is coincidental.

Preview

Dataset

Delivery times before and after a routing change (paired)

60 rows · one row = one delivery route (before and after) · synthetic data

RouteZoneRoute distance (km)Stops (stops)Before (minutes)After (minutes)
RT01North54.93347.551.9
RT02Central19.73242.639.9
RT03Central41.33748.751.1
RT04West65.53154.949.5
RT05West35.32433.633.5
RT06South202142.933.7
RT07South24.52338.336.1
RT08East15.31633.928.8
RT09Central14.82641.335.7
RT10Central17.2213838.6
RT11East38.73351.845.2
RT12South48.11741.439.8

Used in