Skip to content
Start free

When should you use the mean, and when the median?

Look at the shape of the 24 stores' sales before you summarize them, and pick the number that best describes the typical store: the mean, the median, or both.

Free course. Your Maestro, an AI, .

An investor wants to open a La Ceiba franchise and asks the obvious question: "How much does a store sell?" The sales team has the answer ready: "On average, 6.7 million pesos a year."

You already know not to trust an average on its own. Before you calculate anything, do what an experienced analyst does: look at how the values are spread out.

Check yourself: Of La Ceiba's 24 stores, how many do you think sell more than the average of 6.7 million?

The shape first, then the number

A one-number summary hides how the values are spread out. Before you choose the mean or the median, look at the shape: are they all about the same? Is there a cluster and a few far away? Which way do the far ones go? Walk through the 2025 sales, one bar per store (synthetic course data):

Use the left and right arrow keys to change steps.

Step 1 of 4

The 24 stores

Each bar is a store, from the one that sells the most to the one that sells the least. Before you go on, describe the shape in your own words: all about the same, or a few very different?

You don't need technical vocabulary to describe a shape. Three questions are enough:

  • Where's the cluster? Here, between 1.5 and 10 million.
  • Are there values far away, and on which side? Two, way up high.
  • How far? Centro sells more than 10 times what the median store sells.

That already tells you the mean and the median will be far apart, and why.

If you're not sure how to describe the shape of the chart, ask your Maestro for help.

Try it

Calculate the numbers that summarize the shape. The query below gets the average with AVG. Add three columns: the median with MEDIAN(ventas_2025), the minimum with MIN(ventas_2025) and the maximum with MAX(ventas_2025), separated by commas and named mediana, minimo and maximo.

If you're not sure where the commas or the names go, ask your Maestro.

Return one row with the promedio, mediana, minimo and maximo of ventas2025, in that order. You're done when you see 6677083 for the average, 3700000 for the median, 1450000 for the minimum and 43800000 for the maximum.

Your turn

Return one row with the promedio, mediana, minimo and maximo of ventas_2025, in that order. You're done when you see 6677083 for the average, 3700000 for the median, 1450000 for the minimum and 43800000 for the maximum.

Tables: sucursales (sucursal, municipio, ventas_2024, ventas_2025, clientes_2024, recompraron_2024, clientes_2025, recompraron_2025)

sucursales · 24 rows

ColumnType
sucursal Nombre de la sucursal.VARCHAR
municipio Municipio (ficticio) donde está.VARCHAR
ventas_2024 Ventas del año 2024, en pesos.BIGINT
ventas_2025 Ventas del año 2025, en pesos.BIGINT
clientes_2024 Clientes con tarjeta que compraron en 2024.BIGINT
recompraron_2024 De esos clientes, cuántos volvieron a comprar en menos de 90 días (2024).BIGINT
clientes_2025 Clientes con tarjeta que compraron en 2025.BIGINT
recompraron_2025 De esos clientes, cuántos volvieron a comprar en menos de 90 días (2025).BIGINT

First rows

sucursalmunicipioventas_2024ventas_2025clientes_2024recompraron_2024clientes_2025recompraron_2025
CentroCiudad Ceiba412000004380000098002840104003120
ChapultepecCiudad Ceiba27900000261000007100220069002140
Plaza NorteCiudad Ceiba940000010100000260096027501070

Every run starts from fresh copies of the course's tables, so try anything.

Ready to run your query.

Run it yourself

Four numbers tell the whole story: the typical store sells 3.7 million, the smallest 1.45 and the largest 43.8. The average of 6.7 million lands between the typical store and the giants, and describes none of them.

How to choose the typical number

When someone asks you for "the typical number" for something, go in this order:

  1. Look at the shape

    Sort the values or chart them. Is there a cluster and a few far away? If they're all about the same, the mean and the median will match and it doesn't matter which you use.

  2. Name the question

    If you care about the total (a budget, sales for the whole chain, payroll), use the mean: multiplied by the number of cases, it gives you the total. If you care about the typical case (an ordinary store, an ordinary person), use the median.

  3. If they're far apart, give both

    "The typical store sells 3.7 million; the average is 6.7 because two large stores sell almost half." The gap between the two is worth reporting.

  4. Say which one you used

    Write "median" or "average," not "in general" or "normally." Whoever reads your number shouldn't have to guess.

One more warning: don't drop Centro and Chapultepec "because they're outliers" to make the average look nice. They're real, they bring in almost half the money, and anyone who knows the chain will notice they're missing. If you set them aside, say so: "without the two large stores, the average of the other 22 is 4.1 million."

Check yourself: The investor asks how much a La Ceiba store sells, to estimate what theirs would sell. What do you tell them?