1. Lighthouse

Level 7 · Outliers in a quantity column

The request

From Debra Marshall, Warehouse Manager

“The kitchen pick report for June 9–15 says our average line is over two thousand units. Our biggest line ever was 16. Something in that export is wrong. Can you flag the bad lines, flag anything just unusual separately, and tell me what a typical line really is?”

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:J10 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use QUARTILE.INC OR MEDIAN AVERAGEIFnot done yet

Your sheet

Excel
The sheet for this level
ABCDEFGHIJK
1order_item_idorder_idorder_dateproductquantityunit_pricecheckLowest valid quantity1
22242798432025-06-09Cove Cast Iron Dutch Oven410.99Highest plausible quantity50
32242898432025-06-09Willow Acacia Knife Block853.99
42243098442025-06-10Tidewater Stainless Wine Glasses1169.00Q1
52243298452025-06-10Thatcher Cast Iron Bowl Set216.99Q3
62244498502025-06-10Hazel Porcelain Serving Platter1179.00Upper fence (Q3 + 1.5 x IQR)
72245298522025-06-10Hazel Stainless Dutch Oven1109.00
82245798552025-06-11Linden Enamel Serving Platter119.99Average quantity
92248298642025-06-12Cove Cast Iron Dutch Oven110.99Median quantity
102248498642025-06-12Willow Acacia Knife Block1253.99Average without errors
112248598642025-06-12Monroe Stoneware Utensil Set313.99
122248698652025-06-12Thatcher Acacia Dutch Oven213.99
132248998672025-06-12Linden Enamel Serving Platter119.99
142249198672025-06-12Glen Stoneware Carafe160.99
152249298672025-06-12Thatcher Acacia Dutch Oven113.99
162249798692025-06-12Tidewater Stainless Wine Glasses2169.00
172250098692025-06-12Linden Enamel Serving Platter219.99
182250298702025-06-12Monroe Stoneware Utensil Set113.99
192250798722025-06-12Thatcher Cast Iron Bowl Set316.99
202251098742025-06-13Linden Enamel Serving Platter319.99
212251298742025-06-13Willow Acacia Knife Block253.99
222251498762025-06-13Cedar Cast Iron Tumbler Set179.99
232251798772025-06-13Hazel Porcelain Serving Platter1179.00
242252498802025-06-13Hazel Porcelain Cutting Board100000129.00
252253398862025-06-14Monroe Stoneware Utensil Set113.99
262253698872025-06-14Fairhaven Stoneware Cutting Board270.99
272253898882025-06-14Cove Cast Iron Dutch Oven410.99
282253998882025-06-14Willow Acacia Knife Block153.99
292255398962025-06-14Upland Acacia Serving Platter238.99
302255598962025-06-14Linden Enamel Serving Platter819.99
312255798982025-06-15Linden Enamel Serving Platter119.99
322255998992025-06-15Hazel Porcelain Serving Platter2179.00
332256099002025-06-15Thatcher Acacia Dutch Oven213.99
342256199002025-06-15Cove Cast Iron Dutch Oven110.99
352256799022025-06-15Linden Enamel Serving Platter-119.99
362256999032025-06-15Cove Cast Iron Dutch Oven110.99
372257399052025-06-15Vale Enamel Bowl Set211.99
382257999082025-06-15Thatcher Cast Iron Bowl Set116.99
392258299092025-06-15Thatcher Cast Iron Bowl Set116.99
40
41

Loading the editor…

    ResultPress Check to compare G2:G39, J4:J6, J8:J10

    Mote checks your result

    Press Check. Each right cell becomes a firefly in your lantern.

    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.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.