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
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
route_idRoute | id | Route identifier. | ||
zoneZone | category | 5 levels: North, South, East, West, Central | Delivery zone. | |
distance_kmRoute distance | number | km | mean 35.26, median 29.35, SD 19.71, range 11.8–120 | Length of the route. |
stopsStops | integer | stops | mean 27.45, median 28, SD 6.091, range 14–43 | Average number of drop-off stops per run. |
before_minBefore | number | minutes | mean 43.09, median 41.9, SD 8.234, range 30.5–75.9 | Average delivery time per parcel in the four weeks before the change. |
after_minAfter | number | minutes | mean 40.4, median 38.8, SD 8.562, range 25.5–70.7 | Average 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
| Route | Zone | Route distance (km) | Stops (stops) | Before (minutes) | After (minutes) |
|---|---|---|---|---|---|
| RT01 | North | 54.9 | 33 | 47.5 | 51.9 |
| RT02 | Central | 19.7 | 32 | 42.6 | 39.9 |
| RT03 | Central | 41.3 | 37 | 48.7 | 51.1 |
| RT04 | West | 65.5 | 31 | 54.9 | 49.5 |
| RT05 | West | 35.3 | 24 | 33.6 | 33.5 |
| RT06 | South | 20 | 21 | 42.9 | 33.7 |
| RT07 | South | 24.5 | 23 | 38.3 | 36.1 |
| RT08 | East | 15.3 | 16 | 33.9 | 28.8 |
| RT09 | Central | 14.8 | 26 | 41.3 | 35.7 |
| RT10 | Central | 17.2 | 21 | 38 | 38.6 |
| RT11 | East | 38.7 | 33 | 51.8 | 45.2 |
| RT12 | South | 48.1 | 17 | 41.4 | 39.8 |
Used in
- Variance and standard deviation · Describing Data
- Intervals for differences in means · Estimation and Confidence Intervals
- One-sample t-test · Hypothesis Testing
- Paired t-test · Hypothesis Testing
- Effect sizes · Hypothesis Testing
- Checking assumptions · Hypothesis Testing
- Reporting a test responsibly · Hypothesis Testing
- Repeated measures foundations · Comparing Groups and Categorical Data
- Wilcoxon signed-rank test · Comparing Groups and Categorical Data
- Choosing a test · Comparing Groups and Categorical Data
- Did the new routing cut delivery times? · Case