Topic 08

Descriptive statistics that matter

18 min readPart 3 — Analysis & Visualization
By the end you'll be able to

Summarize data honestly with a few core statistics — and avoid being fooled.

Measures Of CenterMean Vs MedianMeasures Of SpreadStandard DeviationCorrelation Not Causation

Topic 8 — Descriptive statistics that matter

Goal: Summarize data honestly with a few core statistics — and avoid being fooled.

Lesson 8.1 — The one-number question

Marcus, Perch's Head of Marketing, drops by Nadia's desk on a Tuesday with the kind of request she's already learning to expect. "How much does a customer spend on a typical order? Just give me one number for the deck."

One number. He wants a single value that stands in for ten thousand rows of orders. Nadia ran weekly sales reports for years at her old retail job, so this part feels familiar. She pulls the average and is about to type "$50" into the chat.

Then she stops, because Priya, her mentor, has trained one reflex into her: which one number?

A single value that represents a whole column is a measure of center — a stand-in for "the typical case." There are three common ones, and they don't always agree:

  • Mean (the average): add every value, divide by the count. It's the one everyone knows. In SQL it's AVG().
  • Median: sort all the values and take the middle one. Half the data sits above it, half below.
  • Mode: the value that shows up most often.

Three answers to "what's typical," and which you reach for changes the story Marcus puts in his deck. So before she sends "$50," Nadia checks which kind of number it actually is.

Lesson 8.2 — When the average lies

Here's the trap Priya was steering her around.

Picture ten people in a room, all earning modest salaries — say, somewhere around $40,000 to $60,000. The average salary in that room is roughly $50,000, and that number describes everyone pretty well.

Now a billionaire walks in.

Run the average again and it leaps past $90 million. By that number, this is a room full of the fabulously wealthy. But ten of the eleven people still can't make rent. The mean got dragged up by a single extreme value and stopped describing almost everyone in the room.

The median, the middle value once you line everyone up, barely flinches. Sort the eleven salaries and the person in the middle still earns about $50,000. The billionaire is just the last name on the list, with no special power to yank the middle around.

The mean is a democracy where the loudest voice can outvote everyone. The median just asks who's standing in the middle.

That gap between mean vs median is one of the most useful things an analyst carries. Whenever the data has extremes (incomes, house prices, order sizes) the median is usually the more trustworthy "typical." So when Nadia finds a handful of bulk office buyers placing $4,000 orders among thousands of $40 sofa-cushion buyers, she knows the mean is being pulled upward. She sends Marcus the median instead, and notes which one she used. The mode, meanwhile, has its own job: it shines for categories, not money. "Most orders came from mobile" is a mode; "the desk people buy most is the walnut one" is a mode. When the question is which value appears most, that's the one to reach for.

Lesson 8.3 — The middle is only half the truth

A week later Marcus is back, this time about delivery. "Customers keep asking how long shipping takes. What do I tell them?" Nadia pulls the data: average delivery time is about the same for Perch's two warehouses — five days each. She almost reports "five days" and moves on.

Then she looks at the two warehouses side by side.

The first ships everything in four to six days, every time. The second also averages five days — but its orders land anywhere from one day to thirty. Same average, wildly different experience. A customer on the second warehouse might get their desk tomorrow or might still be waiting a month from now, and "five days" hides that completely.

This is why a center is only ever half a summary. The other half is spread — how varied the values are, how far they wander from that center. Two warehouses, two stores, two anything can share an average and feel like different planets.

There are two spread measures Nadia needs:

  • Range: the simplest one. Maximum minus minimum. Warehouse one's range is two days (4 to 6). Warehouse two's is twenty-nine (1 to 30). That one comparison already tells the story.
  • Standard deviation: a measure of how far values typically sit from the mean. A small standard deviation means the data clusters tightly around the average; a large one means it's scattered all over.

She doesn't compute the range or standard deviation by hand — the warehouse with the wider range is obvious, and the tool does the arithmetic. The skill is knowing to look.

Lesson 8.4 — Reading standard deviation without doing the math

So Nadia asks Tom, Perch's data engineer, to add one column to her query, and out comes a standard deviation for each warehouse. Warehouse one: about 0.8 days. Warehouse two: about 7 days. She's never calculated one in her life, and she doesn't need to. She just needs to read it:

  • Small standard deviation → values huddle close to the average, so the average is a reliable description. Warehouse one's 0.8 says: trust the five-day number, almost everyone's near it.
  • Large standard deviation → values are scattered, so the average is technically true but practically misleading. Warehouse two's 7 says: don't promise five days to anyone — the actual wait swings hard both ways.

You read standard deviation the way you read a temperature: small means steady, large means all over the place, no formula required. Most tools hand it to you for free — in a spreadsheet it's STDEV, and in SQL most databases spell it STDDEV() (PostgreSQL, MySQL), while SQL Server writes it STDEV. The name shifts a little by tool, but it's always sitting right next to the AVG() you already know.

The takeaway Nadia writes on a sticky note above her monitor: never report a center without a sense of the spread. "The average order is $50" is a half-answer. "The average order is $50, but they range from $5 to $500" is the answer Marcus can actually use, because now he knows whether a $50 free-shipping threshold is going to catch most carts or almost none.

One number is a headline. The spread is the story underneath it.

Lesson 8.5 — The most dangerous sentence in analysis

Now the hard one. A month in, Nadia spots something that makes her sit up: customers who get the email newsletter spend, on average, three times as much as customers who don't. Her first instinct, the same one everyone has, is a triumphant headline: the newsletter makes people spend more. We should email everyone. She's halfway through messaging Dana with exactly that when Priya's voice stops her.

What Nadia found is a correlation — two things that move together. It's real and worth noticing; correlation is the analyst's smoke detector, pointing at relationships worth investigating. But here is the single most important warning in all of analysis:

Correlation does not prove causation. Two things moving together is a question, not an answer.

Take the classic case. In any beach town, ice-cream sales and drownings rise and fall together across the year. Does ice cream cause drowning? Obviously not. A third thing, hot summer weather, drives both: more heat means more ice cream sold and more people swimming. Ban ice cream and the drownings won't budge, because ice cream was never the cause.

That hidden third factor is a confounder — something lurking behind the scenes, driving two things at once and faking a relationship between them. Confounders are why "X and Y are correlated" must never graduate into "X causes Y" without a fight.

So what's the confounder behind Nadia's newsletter? Almost certainly the customers themselves. People who sign up for a furniture newsletter are already the most loyal, most engaged buyers — the ones who'd spend more anyway. The newsletter didn't create big spenders; big spenders opted into it. Emailing everyone might do nothing.

How do you ever prove cause? You run a controlled experiment — an A/B test. Split comparable customers at random, send the newsletter to one group and not the other, and see if spending diverges. Random assignment breaks the confounder's grip: it scrambles loyal and casual buyers evenly across both groups, so any difference that remains is the newsletter's doing. (The experimentation track covers how to run these properly.)

Nadia rewrites her message to Dana. Not "the newsletter makes people spend more," but "newsletter subscribers spend more — likely because they're already our most loyal buyers, so I'd want to test it before we expand the program." That sentence is the difference between an analyst people trust and one whose recommendation gets quietly walked back three weeks later.

Worked example — One number for Dana

Dana, the VP of Operations, sends Nadia a one-line email before a board meeting: "I need our typical order value and whether the new free-shipping-over-$75 idea makes sense. One slide. Today."

Nadia walks the whole topic in fifteen minutes.

First, center. The mean order value is $58. But Perch has a long tail of bulk orders, so she also pulls the median: $44. The gap confirms the extremes are inflating the mean, so she leads with the median. The $44 is the order that's actually typical.

Second, spread. Orders run from $9 to $3,800, with a large standard deviation. Most orders cluster low, with a thin tail of giants — exactly the tail pulling the mean above the median.

Third, the free-shipping question. A $75 threshold sits above both the mean and the median, so most carts wouldn't qualify. The offer would mostly reward big spenders who already buy a lot. Worth flagging.

Fourth, the causation trap. She sees that customers who hit free shipping spent more overall and nearly writes "free shipping drives bigger orders." She catches it: that's a correlation with an obvious confounder — people cross the threshold because their orders are already big. To know if the offer actually changes behavior, Perch would need to A/B test it.

Her one slide reads: Typical order is about $44 (median); the $58 average is pulled up by a few large orders. A $75 free-shipping threshold would exclude most carts — recommend testing a lower bar near $50. We can't yet say free shipping causes bigger orders; that needs an experiment. Dana gets the answer and the recommendation in one breath, no methodology lecture. That's the job.

Key terms

  • Measure of center — a single value standing in for "the typical case": mean, median, or mode.
  • Mean — the average; sum divided by count. Distorted by extreme values. SQL: AVG().
  • Median — the middle value when sorted; ignores extremes, so it resists outliers.
  • Mode — the most common value; best for categories ("most orders came from mobile").
  • Spread — how varied the data is around its center; measured by range or standard deviation.
  • Range — the simplest spread: maximum minus minimum.
  • Standard deviation — how far values typically sit from the mean; small = clustered, large = scattered.
  • Correlation — two things moving together; a clue to investigate, not proof of cause.
  • Confounder — a hidden third factor driving two correlated things at once (e.g. summer driving both ice cream and drownings).

Try this

Open any small dataset you have (a column of prices, salaries, ages, anything with numbers) in a spreadsheet. Compute three things: AVERAGE, MEDIAN, and STDEV (or just eyeball the min and max for range). Now ask yourself two questions. Are the mean and median far apart? If so, you have extreme values pulling the average around, and the median is your safer "typical." Is the standard deviation large relative to the values? If so, your data is scattered and no single number tells the whole story. Write one honest sentence summarizing the column, center and spread, the way you'd hand it to a busy executive.

Common pitfalls

  • Defaulting to the mean. AVG() is the easiest function to type, so it's the one people reach for by reflex. On anything with extremes (incomes, order sizes, durations) it quietly lies. Check the median before you trust the average.
  • Reporting a center with no spread. "$50" alone hides whether orders cluster tightly or swing from $5 to $500. A center without a range or standard deviation is half an answer, and the missing half is usually the important one.
  • Promoting correlation to causation. The most expensive mistake on this list. "Newsletter subscribers spend more, so the newsletter works" skips straight past the confounder (loyal customers self-select in). Treat every correlation as a question for an experiment, never a finding to announce.
  • Forgetting the mode exists. For categories like payment method, device, or product color, neither mean nor median means anything. "Which value appears most" is the mode, and it's the right tool for those columns.

Key takeaways

  • Pick the right measure of center: mean for symmetric data, median when extremes exist, mode for categories.
  • The median resists outliers while the mean gets dragged by them — add one billionaire and the mean lies, the median doesn't.
  • Always pair a center with spread (range or standard deviation); read standard deviation as small = clustered, large = scattered, without doing the math.
  • Correlation is not causation — a hidden confounder can drive two things at once, and only a controlled experiment (A/B test) establishes cause.
  • Treat every relationship in data as a question to investigate, not a conclusion to announce.
Loading SQL playground…
Score 100% to unlock the next topic

Preparing your quiz…