Why your “average” delivery time can mislead you
Imagine you run operations for Larkspur Delivery, a fictional company that brings restaurant food to customers in one city. Every Monday someone asks the same question: how long does a delivery take? The obvious answer is the average. You type =AVERAGE(B20:B43), Excel says 35.1 minutes, and that number goes into the weekly report. The trouble is that almost nobody actually waited 35 minutes. Most orders arrived in 20 to 40 minutes, and two orders went badly wrong: one courier got lost and needed 78 minutes, another hit a closed road and needed 95.
This lesson is for analysts, operations managers, students and anyone who has to summarise or compare numbers that are not nicely bell-shaped: delivery times, waiting times, invoice amounts, salaries, house prices, response times of a website, satisfaction scores from 1 to 5. These data have long tails, outliers and ties, and the classic tools (the mean, the standard deviation, the t-test, ANOVA) can give answers that are technically correct but practically misleading. Nonparametric statistics, built on ranks instead of raw values, is the toolkit for exactly these situations, and you can do all of it in Excel without add-ins.
In the free lab above you measure how skewed Larkspur's last 24 deliveries are, compare the mean with the median, and draw the histogram that shows why a t-test is a poor fit. This article walks through the same data step by step, explains the ideas behind it, and shows where the rest of the course takes you.
The core idea: shape first, then the test
Every statistical test makes assumptions. The t-test and ANOVA compare means, and they assume the data in each group are roughly normal, or that the samples are large enough for the central limit theorem to rescue you. When data are strongly right-skewed (a long tail to the right), two things go wrong. First, the mean no longer describes a typical case, because a handful of extreme values drag it upwards. Second, those same values inflate the standard deviation, which makes the t-test's denominator bigger and its power smaller. You may miss a real improvement simply because two bad days added noise.
The median is the middle value of the sorted data. Half of the orders took less, half took more. If the 95-minute order had taken 950 minutes, the median would not move at all, while the mean would jump by more than half an hour. That property is called robustness, and it is the whole reason nonparametric methods exist.
Rank tests push this idea further. They replace every value by its rank in the sorted data: the fastest delivery gets rank 1, the slowest gets rank 24. Distances disappear, only the order remains. The 95-minute order is simply “the largest”. Because ranks always run from 1 to n, they do not care whether the original data are normal, skewed, or measured on an ordinal scale like “very unhappy” to “very happy”. That is why the Mann-Whitney U test, the Wilcoxon signed-rank test, the Kruskal-Wallis test and the Spearman correlation are all called rank-based or distribution-free methods.
There is a price. When the data really are normal, rank tests are slightly less efficient than their mean-based counterparts. For the Mann-Whitney test the asymptotic relative efficiency against the t-test is about 0.95 under normality, which means you need roughly 5% more observations for the same power. With skewed or heavy-tailed data, the rank test is often the more powerful of the two. Rank tests also answer a slightly different question: they test whether one distribution tends to produce larger values than another (a shift in the whole distribution), not whether the means differ. Keep that in mind when you write the conclusion.
How to tell if your data are skewed
You do not need a formal test to decide. Three quick checks, all of which you build in the lab, are usually enough:
- Mean versus median. If the mean is clearly above the median, there is a right tail; clearly below means a left tail. For Larkspur the mean (35.1) is 5.6 minutes above the median (29.5).
- The SKEW function.
=SKEW(range)returns the sample skewness. As a common rule of thumb, values between −0.5 and 0.5 are roughly symmetric, values beyond ±1 indicate strong skewness. Larkspur's 24 orders give 2.34, which is very strong. - A histogram. A picture beats any number. Count the values in equal-width bins with COUNTIFS and draw a column chart. A tall block on the left and isolated bars far to the right is the typical shape of waiting and delivery times.
Worked example: Larkspur's last 24 deliveries
The lab sheet holds 24 order IDs (L-4101 to L-4124) in A20:A43 and their delivery times in minutes in B20:B43. The sorted values are 18, 21, 22, 23, 24, 25, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 35, 36, 38, 41, 46, 52, 78 and 95. Here is what the summary block at the top of the sheet produces, plus one extra row you can add yourself to see the effect of the two extreme orders.
| Measure | Excel formula | Result | What it tells you |
|---|---|---|---|
| Mean | =AVERAGE(B20:B43) | 35.08 | Pulled up by 78 and 95 |
| Median | =MEDIAN(B20:B43) | 29.5 | Middle of the 12th and 13th sorted values (29 and 30) |
| Standard deviation | =STDEV.S(B20:B43) | 17.90 | Inflated by the tail |
| Skewness | =SKEW(B20:B43) | 2.34 | Strong right skew (above 1) |
| Mean without 78 and 95 | =AVERAGEIFS(B20:B43,B20:B43,"<70") | 30.41 | Two orders shift the mean by 4.7 minutes |
| Median without 78 and 95 | =MEDIAN(IF(B20:B43<70,B20:B43)) | 28.5 | The median moves by only 1 minute |
| Rank of the 95-minute order | =RANK.AVG(95,B20:B43,1) | 24 | Just “the largest”, whatever its size |
Two numbers deserve attention. Removing just two of 24 orders moves the mean by almost five minutes but the median by only one. And the standard deviation of almost 18 minutes would suggest that deliveries routinely vary between about 17 and 53 minutes, which is not what the sorted list shows: 21 of the 24 orders sit between 18 and 46 minutes. A report built on the mean and standard deviation would describe a business that does not exist.
The bin table in A7:D16 counts the orders per 10-minute interval. Columns C and D hold the lower and upper limits, and one copyable formula fills column B: =COUNTIFS($B$20:$B$43,">="&C8,$B$20:$B$43,"<"&D8). The criteria are built as text, the & joins the operator to the cell value, and the absolute references keep the data range fixed when you copy the formula down. The total in B17 must equal 24, which is your check that no order fell between two bins.
| Bin (minutes) | From | To (under) | Orders |
|---|---|---|---|
| 10–20 | 10 | 20 | 1 |
| 20–30 | 20 | 30 | 11 |
| 30–40 | 30 | 40 | 7 |
| 40–50 | 40 | 50 | 2 |
| 50–60 | 50 | 60 | 1 |
| 60–70 | 60 | 70 | 0 |
| 70–80 | 70 | 80 | 1 |
| 80–90 | 80 | 90 | 0 |
| 90–100 | 90 | 100 | 1 |
| Total | 24 |
The answer to task 3 follows directly: the weekly report should show the median as the typical delivery time, ideally with the share of late orders next to it (for example “4 of 24 orders took longer than 45 minutes”). That combination tells a manager both what a normal order looks like and how often things go wrong, which is what they actually need to know.
Step by step in Excel
Here is the complete workflow, written so you can follow it in the lab above or in desktop Excel with your own data.
- Put the data in one column. One row per observation, the ID in column A, the value in column B. No blank rows, no text such as “n/a” mixed into the numbers, because AVERAGE and MEDIAN silently skip text and you lose rows without noticing.
- Mean: click B2 and type
=AVERAGE(B20:B43), then press Enter. Tip: type=AVERAGE(, then select the range with the mouse or with Ctrl+Shift+Down Arrow from B20 (Cmd+Shift+Down on a Mac). - Median: in B3 type
=MEDIAN(B20:B43). With an even number of values Excel averages the two middle ones, which is why you get 29.5 and not a value that appears in the data. - Skewness: in B4 type
=SKEW(B20:B43). Format B2:B4 with one or two decimals via Home › Number › Decrease Decimal, or press Ctrl+1 and choose Number. - Bin limits: type the lower limits 10, 20, … 90 in C8:C16 and the upper limits 20, 30, … 100 in D8:D16. Choose bins of equal width and make sure the first lower limit is below the minimum (=MIN) and the last upper limit above the maximum (=MAX).
- Counts per bin: in B8 enter
=COUNTIFS($B$20:$B$43,">="&C8,$B$20:$B$43,"<"&D8)and copy it down to B16 (select B8:B16 and press Ctrl+D). Press F4 while the cursor is in a reference to cycle through the $ variants. - Reconcile: in B17 type
=SUM(B8:B16)and compare it with=COUNT(B20:B43). If they differ, a value lies outside your bins. - Histogram: select A7:B16, then Insert › Charts › Column (or Insert › Recommended Charts). In desktop Excel you can also select the raw values B20:B43 and use Insert › Statistic Chart › Histogram, which bins automatically. In a column chart, set the Gap Width to a small value (Format Data Series › Series Options) so the bars touch like a real histogram.
- Titles: click the chart title and type something like “Delivery times, last 24 orders”; add the vertical axis title via Chart Elements (the + button) › Axis Titles and type “Orders”.
- Decide and document: write in one cell which centre you report and why (“median, because SKEW = 2.3 and two extreme orders”). Future you, and your colleagues, will thank you.
=AVERAGE(B20:B43)-MEDIAN(B20:B43). Then change the 95 in B23 to 950. The gap explodes from 5.6 to about 40 minutes while the median stays at 29.5. Change it back with Ctrl+Z.
Which rank test replaces which classic test?
Once you know the data are skewed, the next question is which test to use. Each classic test has a rank-based counterpart, and every one of them is covered in this course with Larkspur data.
| Situation | Classic (mean-based) test | Rank-based alternative | Excel building blocks |
|---|---|---|---|
| Two independent groups | Two-sample t-test (T.TEST type 2 or 3) | Mann-Whitney U (Wilcoxon rank-sum) | RANK.AVG, SUMIF, NORM.S.DIST |
| Paired before/after | Paired t-test (T.TEST type 1) | Wilcoxon signed-rank test | ABS, RANK.AVG, SUMIF |
| Paired, only direction known | Paired t-test | Sign test | COUNTIF, BINOM.DIST |
| Three or more groups | One-way ANOVA | Kruskal-Wallis H test | RANK.AVG, SUMIF, CHISQ.DIST.RT |
| Association of two variables | Pearson correlation (CORREL) | Spearman rank correlation | RANK.AVG, CORREL on ranks |
| Uncertainty of an estimate | t confidence interval (CONFIDENCE.T) | Bootstrap percentile interval | PERCENTILE.INC, STDEV.S |
Common mistakes and how to spot them
- Reporting the mean of skewed data without comment. Spot it: the mean is clearly above the median and SKEW is above 1. Fix: report the median, or both, and say why.
- Deleting outliers to make the data look normal. The 95-minute order really happened, and a customer really waited. Removing it hides a business problem. Use a robust method instead, and investigate the outliers separately.
- Using RANK.EQ when there are ties. RANK.EQ gives tied values the same, lowest rank, so the ranks no longer add up to n(n+1)/2. Rank tests need RANK.AVG. Check:
=SUM(ranks)must equal=n*(n+1)/2, which is 300 for 24 values. - Bins that overlap or leave gaps. If one bin is “20–30” with ≤30 and the next starts at 30 with ≥30, the value 30 is counted twice. Use “≥ lower and < upper” consistently and check that the bin total equals the number of observations.
- Saying a rank test “compares medians”. Strictly, Mann-Whitney and Kruskal-Wallis test whether one group tends to have larger values. Only if the distributions have the same shape is that the same as a difference in medians.
- Treating a large sample as a free pass. With hundreds of observations the t-test on means becomes valid again, but the mean may still be a poor description of a typical case. Validity of the test and usefulness of the summary are two separate questions.
- Text that looks like numbers. Values imported from a CSV can be text (left-aligned, a green triangle in the corner). AVERAGE, MEDIAN and SKEW ignore them. Check with
=COUNT(B20:B43): it must equal the number of rows.
Quick reference: functions used in this course
| Function / shortcut | What it does | Example |
|---|---|---|
AVERAGE | Arithmetic mean | =AVERAGE(B20:B43) |
MEDIAN | Middle value of the sorted data | =MEDIAN(B20:B43) |
SKEW | Sample skewness (0 = symmetric) | =SKEW(B20:B43) |
STDEV.S | Sample standard deviation | =STDEV.S(B20:B43) |
COUNTIFS | Count values that meet several conditions | =COUNTIFS(r,">="&C8,r,"<"&D8) |
RANK.AVG | Rank with average ranks for ties | =RANK.AVG(B20,$B$20:$B$43,1) |
RANK.EQ | Rank, ties share the lowest rank | =RANK.EQ(B20,$B$20:$B$43,1) |
PERCENTILE.INC | Percentile (quartiles, bootstrap limits) | =PERCENTILE.INC(B20:B43,0.75) |
CORREL | Pearson correlation; on ranks it gives Spearman | =CORREL(rank1,rank2) |
NORM.S.DIST | Standard normal probability for z-approximations | =2*(1-NORM.S.DIST(ABS(z),TRUE)) |
| F4 | Cycle absolute/relative references | B20 → $B$20 → B$20 → $B20 |
| Ctrl+D | Fill the formula down a selection | Select B8:B16, press Ctrl+D |
| Ctrl+1 | Open Format Cells | Set decimals for B2:B4 |
Real-world uses
- Operations and logistics: delivery, picking and waiting times are almost always right-skewed. Report the median and a high percentile (for example the 90th) instead of mean ± standard deviation, and compare two routing set-ups with Mann-Whitney.
- Customer surveys: satisfaction scores on a 1–5 scale are ordinal. The difference between “2” and “3” is not necessarily the same as between “4” and “5”. Kruskal-Wallis compares several regions or branches without pretending the scores are measurements.
- Finance and controlling: invoice amounts, expense claims and customer revenue are dominated by a few large values. Medians and rank correlations describe the typical customer and are not hijacked by one key account.
- Before/after projects: training, a new tool or a process change measured on the same people or machines. The Wilcoxon signed-rank test or the sign test works even when the improvement is uneven or there are a few extreme cases.
- Small samples: pilots with 10 to 20 observations, where you cannot check normality reliably. Rank methods and the bootstrap let you draw careful conclusions without assuming a shape you cannot verify.
What you will build in the rest of this course
Lesson 1 is free. The remaining 20 lessons are part of the paid course (one-time $9.90) and each one is a hands-on lab with the same Larkspur Delivery data, automatic checking and hints, so you build every test yourself instead of reading about it.
Ranking Data: RANK.EQ, RANK.AVG and Ties. You rank the late deliveries of 12 couriers with both ranking functions, rebuild the average rank of ties by hand, and check the rank sum against n(n+1)/2. This is the foundation of every rank test, and the place where most spreadsheet errors start.
Mann-Whitney U Test: Two Independent Groups. Did the new routing app make deliveries faster? You rank all 22 orders from the old and the new app together, add up the ranks per group, compute U and turn it into a p-value with the normal approximation, the same steps statistics software performs behind the scenes.
Wilcoxon Signed-Rank Test: Paired Before/After Data. Twelve couriers drive the same test route before and after a route training. You calculate the differences, rank their absolute values, attach the signs and test W+, which is the right tool when the same people are measured twice.
Kruskal-Wallis H Test: Three or More Groups. Three delivery zones, 20 satisfaction answers. You rank them all, compute H and get its p-value with CHISQ.DIST.RT, the rank-based answer to one-way ANOVA.
Spearman Rank Correlation vs Pearson. Do restaurants with more menu photos get more weekly orders? You compute both correlations and see on a scatter chart how a single new restaurant distorts Pearson while Spearman stays stable.
The Sign Test: Only Up or Down. Sixteen customers compare the old and the new insulated packaging. With only the direction of each preference, you count pluses and minuses and calculate an exact binomial p-value with BINOM.DIST.
Bootstrap Confidence Interval from Resampled Means. You turn 50 resampled means of a skewed delivery sample into a bootstrap standard error and a 95% percentile interval with PERCENTILE.INC, then compare it with the classic t-interval to see where the two disagree.
The course ends with an exam that mixes all methods, so you practise the most important skill of all: choosing the right test for the data in front of you.
Summary
Skewed data and outliers are the normal case in business, not the exception. Before you compare means, look at the shape: a histogram built with COUNTIFS, the gap between mean and median, and SKEW. When the data are strongly skewed, as Larkspur's delivery times are with a skewness of 2.34, the median describes a typical order far better than the mean, and rank-based tests compare groups without being hijacked by one lost courier. You now know why ranks work, how to measure skewness in Excel and how to present the result honestly.
Now scroll up and do the free lab: calculate the mean, the median and SKEW for the 24 orders, decide which centre the weekly report should show, and draw the histogram. It takes about 15 minutes, and the Coach checks every step.
Frequently asked questions
When should I use a nonparametric test instead of a t-test?
Use a rank-based test when the data are strongly skewed, contain outliers you cannot remove, are ordinal (like 1–5 ratings), or the sample is small and you cannot check normality. With large, roughly symmetric samples the t-test is fine and slightly more powerful.
How do I calculate skewness in Excel?
Use =SKEW(range), for example =SKEW(B20:B43). Values near 0 mean a symmetric distribution, and as a rule of thumb values above 1 or below -1 indicate strong skewness.
Why is the median better than the mean for skewed data?
The median is the middle value of the sorted data, so a few extreme values barely move it. The mean adds up every value, so one very large observation pulls it towards the tail and away from the typical case.
Do nonparametric tests compare medians?
Not exactly. Tests like Mann-Whitney and Kruskal-Wallis test whether values in one group tend to be larger than in another. They can be read as a comparison of medians only if the groups have distributions of the same shape.
What is the difference between RANK.EQ and RANK.AVG?
Both rank a value within a list. RANK.EQ gives tied values the same lowest rank, while RANK.AVG gives them the average of the ranks they occupy, which is what rank tests such as Mann-Whitney and Spearman require.
Can I run nonparametric tests in Excel without an add-in?
Yes. With RANK.AVG, SUMIF, COUNTIF and distribution functions such as NORM.S.DIST, CHISQ.DIST.RT and BINOM.DIST you can build the Mann-Whitney, Wilcoxon, Kruskal-Wallis, Spearman and sign tests yourself, which is exactly what this course does.
Keep going: Nonparametric Statistics: Rank Tests, Spearman & Bootstrap
This free lab is lesson 1 of 21. Unlock the other 20 hands-on labs, the final exam and your certificate for a one-time $9.90.
- Ranking Data: RANK.EQ, RANK.AVG and Ties
- Mann-Whitney U Test: Two Independent Groups
- Wilcoxon Signed-Rank Test: Paired Before/After Data
- Kruskal-Wallis H Test: Three or More Groups
- Spearman Rank Correlation vs Pearson
- The Sign Test: Only Up or Down
- Bootstrap Confidence Interval from Resampled Means
- Mann-Whitney with Many Ties: the Tie-Corrected SD
- Effect Sizes for Rank Tests: Probability of Superiority and Rank-Biserial r
- Hodges-Lehmann Estimator: How Many Minutes Faster?
- Dunn's Post-Hoc Test after Kruskal-Wallis
- Friedman Test: The Same Testers Try Three App Versions
- Kendall's Tau: Concordant and Discordant Pairs
- Permutation Test: Shuffling the Group Labels
- Confidence Interval for the Median from Order Statistics
- Mood's Median Test: Above or Below the Grand Median
- Kolmogorov-Smirnov Test: Comparing Whole Distributions
- Runs Test: Are the Ups and Downs Random?
- Bootstrap Interval for a Difference in Medians
- Final Project: Nonparametric Delivery Report for a Grocery Courier