The request

From Debra Marshall, Warehouse Manager
Your goal
In J4 and J5, the first and third quartiles of the quantities E2:E39 (QUARTILE.INC), and in J6 the upper fence: Q3 plus 1.5 times (Q3 minus Q1). In G2:G39, label each line: error when the quantity is below the lowest valid quantity in J1 or above the highest plausible one in J2 (use OR); otherwise unusual when it is above the fence in J6; otherwise ok. In J8, J9 and J10: the AVERAGE of all quantities, their MEDIAN, and the average of the lines not labelled error (AVERAGEIF).
- Fill
G2:G39, J4:J6, J8:J10with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
QUARTILE.INCORMEDIANAVERAGEIFnot done yet
Your sheet
| A | B | C | D | E | F | G | H | I | J | K | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | order_item_id | order_id | order_date | product | quantity | unit_price | check | Lowest valid quantity | 1 | ||
| 2 | 22427 | 9843 | 2025-06-09 | Cove Cast Iron Dutch Oven | 4 | 10.99 | Highest plausible quantity | 50 | |||
| 3 | 22428 | 9843 | 2025-06-09 | Willow Acacia Knife Block | 8 | 53.99 | |||||
| 4 | 22430 | 9844 | 2025-06-10 | Tidewater Stainless Wine Glasses | 1 | 169.00 | Q1 | ||||
| 5 | 22432 | 9845 | 2025-06-10 | Thatcher Cast Iron Bowl Set | 2 | 16.99 | Q3 | ||||
| 6 | 22444 | 9850 | 2025-06-10 | Hazel Porcelain Serving Platter | 1 | 179.00 | Upper fence (Q3 + 1.5 x IQR) | ||||
| 7 | 22452 | 9852 | 2025-06-10 | Hazel Stainless Dutch Oven | 1 | 109.00 | |||||
| 8 | 22457 | 9855 | 2025-06-11 | Linden Enamel Serving Platter | 1 | 19.99 | Average quantity | ||||
| 9 | 22482 | 9864 | 2025-06-12 | Cove Cast Iron Dutch Oven | 1 | 10.99 | Median quantity | ||||
| 10 | 22484 | 9864 | 2025-06-12 | Willow Acacia Knife Block | 12 | 53.99 | Average without errors | ||||
| 11 | 22485 | 9864 | 2025-06-12 | Monroe Stoneware Utensil Set | 3 | 13.99 | |||||
| 12 | 22486 | 9865 | 2025-06-12 | Thatcher Acacia Dutch Oven | 2 | 13.99 | |||||
| 13 | 22489 | 9867 | 2025-06-12 | Linden Enamel Serving Platter | 1 | 19.99 | |||||
| 14 | 22491 | 9867 | 2025-06-12 | Glen Stoneware Carafe | 1 | 60.99 | |||||
| 15 | 22492 | 9867 | 2025-06-12 | Thatcher Acacia Dutch Oven | 1 | 13.99 | |||||
| 16 | 22497 | 9869 | 2025-06-12 | Tidewater Stainless Wine Glasses | 2 | 169.00 | |||||
| 17 | 22500 | 9869 | 2025-06-12 | Linden Enamel Serving Platter | 2 | 19.99 | |||||
| 18 | 22502 | 9870 | 2025-06-12 | Monroe Stoneware Utensil Set | 1 | 13.99 | |||||
| 19 | 22507 | 9872 | 2025-06-12 | Thatcher Cast Iron Bowl Set | 3 | 16.99 | |||||
| 20 | 22510 | 9874 | 2025-06-13 | Linden Enamel Serving Platter | 3 | 19.99 | |||||
| 21 | 22512 | 9874 | 2025-06-13 | Willow Acacia Knife Block | 2 | 53.99 | |||||
| 22 | 22514 | 9876 | 2025-06-13 | Cedar Cast Iron Tumbler Set | 1 | 79.99 | |||||
| 23 | 22517 | 9877 | 2025-06-13 | Hazel Porcelain Serving Platter | 1 | 179.00 | |||||
| 24 | 22524 | 9880 | 2025-06-13 | Hazel Porcelain Cutting Board | 100000 | 129.00 | |||||
| 25 | 22533 | 9886 | 2025-06-14 | Monroe Stoneware Utensil Set | 1 | 13.99 | |||||
| 26 | 22536 | 9887 | 2025-06-14 | Fairhaven Stoneware Cutting Board | 2 | 70.99 | |||||
| 27 | 22538 | 9888 | 2025-06-14 | Cove Cast Iron Dutch Oven | 4 | 10.99 | |||||
| 28 | 22539 | 9888 | 2025-06-14 | Willow Acacia Knife Block | 1 | 53.99 | |||||
| 29 | 22553 | 9896 | 2025-06-14 | Upland Acacia Serving Platter | 2 | 38.99 | |||||
| 30 | 22555 | 9896 | 2025-06-14 | Linden Enamel Serving Platter | 8 | 19.99 | |||||
| 31 | 22557 | 9898 | 2025-06-15 | Linden Enamel Serving Platter | 1 | 19.99 | |||||
| 32 | 22559 | 9899 | 2025-06-15 | Hazel Porcelain Serving Platter | 2 | 179.00 | |||||
| 33 | 22560 | 9900 | 2025-06-15 | Thatcher Acacia Dutch Oven | 2 | 13.99 | |||||
| 34 | 22561 | 9900 | 2025-06-15 | Cove Cast Iron Dutch Oven | 1 | 10.99 | |||||
| 35 | 22567 | 9902 | 2025-06-15 | Linden Enamel Serving Platter | -1 | 19.99 | |||||
| 36 | 22569 | 9903 | 2025-06-15 | Cove Cast Iron Dutch Oven | 1 | 10.99 | |||||
| 37 | 22573 | 9905 | 2025-06-15 | Vale Enamel Bowl Set | 2 | 11.99 | |||||
| 38 | 22579 | 9908 | 2025-06-15 | Thatcher Cast Iron Bowl Set | 1 | 16.99 | |||||
| 39 | 22582 | 9909 | 2025-06-15 | Thatcher Cast Iron Bowl Set | 1 | 16.99 | |||||
| 40 | |||||||||||
| 41 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Debra gets, and why
The lesson
An outlier is a value far from the rest. Sometimes it’s an error (a quantity of 100000 from a finger on the zero key), sometimes it’s real and the most interesting row in the sheet (a business customer ordering 12 knife blocks). Your job is to tell them apart, and to keep one bad value from distorting every summary.
This sheet holds the real kitchen order lines from June 9 to 15, 2025, with one change we made to mirror a classic export slip: line 22524 (row 24) really has a quantity of 1; here it reads 100000. Line 22567 in row 35, with a quantity of −1, is a real data-entry error from the store’s own records.
How one value moves the average
| Formula | Result |
|---|---|
=AVERAGE(E2:E39) |
2,633.74 |
=MEDIAN(E2:E39) |
1.5 |
=AVERAGEIF(G2:G39,"<>error",E2:E39) |
2.31 |
The average adds every value and divides by 38, so the single 100000 contributes about 2,632 units to it. The median only cares about the middle of the sorted list, and the middle doesn’t move when the top value grows. That is why the report Debra saw was absurd, and why a median is the honest “typical” figure for a column you haven’t cleaned yet.
Rule 1: what is possible
Some values are impossible, whatever the rest of the data says. A line can’t ship fewer than 1
unit. The biggest line in the store’s history is 16 units, so 50 is a generous ceiling. These
are business rules, so they live in labelled cells (J1 and J2) where a manager can read and
change them:
=OR(E2<$J$1,E2>$J$2)
It is TRUE for row 24 (100000) and row 35 (−1).
Rule 2: what is unusual for this data
A statistical rule needs no business knowledge. The interquartile range (IQR) method takes the middle half of the data and flags anything far outside it:
J4 =QUARTILE.INC(E2:E39,1) Q1, a quarter of the values are at or below it: 1
J5 =QUARTILE.INC(E2:E39,3) Q3, three quarters are at or below it: 2
J6 =J5+1.5*(J5-J4) the upper fence: 2 + 1.5 × 1 = 3.5
The lower fence, Q1 − 1.5 × IQR, is −0.5 here; rule 1 already covers that side. The quartiles come from the middle of the data, so the 100000 barely touches them: with the real quantity of 1 in row 24, Q1 and Q3 are the same.
The z-score is the other common test: =STANDARDIZE(E2,AVERAGE(E2:E39),STDEV.S(E2:E39)), with
|z| above 3 called an outlier. It flags the 100000 (z ≈ 6.0) but gives the −1 a z of −0.16,
because the typo inflates the standard deviation it is measured against. On a column with one
huge error, the quartile rule is the steadier one.
One label per line
G2 =IF(OR(E2<$J$1,E2>$J$2),"error",IF(E2>$J$6,"unusual","ok"))
The order matters: test for errors first, so the 100000 is called an error rather than merely unusual. The column ends with 2 errors, 5 unusual lines (quantities of 4, 8 and 12) and 31 ok. The unusual ones are real orders: look them up before anyone “corrects” them. In Excel, a box plot (Insert > Insert Statistic Chart > Box and Whisker, Excel 2016 and later) draws the same fences as a picture.
Common mistakes
- Deleting outliers. Flag them, check the source, then fix or exclude with a reason. A deleted row can’t be checked.
- Replacing the error with the average. The average includes the error. If you must fill, use the median, and label the row as in level 6.
- Only one rule. The fence alone would call the −1 “ok”. The business rule alone catches both errors but can’t tell you which real orders are unusual.
- Reporting the average of a dirty column. One typo turned 2.31 into 2,633.74.
Lantern lit!
Practised: outliersquartileiqrmedianaverageififor
- Solved
- No hints
- First run
