A mean is a compression. Compressions lose things.

Every summary statistic is a trade. You give up detail and you buy a number you can compare, email and put on a slide. The trade is almost always worth making. The problem is that we rarely ask what we paid for it.

In 1973 the statistician Frank Anscombe published four small datasets to make exactly this point. They were built so that the mean of x, the mean of y, the standard deviation of x, the standard deviation of y, the correlation, and therefore the fitted regression line, come out the same to two decimal places. He then drew them. The four pictures look nothing like each other.

The four datasets come from F. J. Anscombe, Graphs in Statistical Analysis, The American Statistician, 1973.

Half a century on, the lesson is easy to agree with and hard to practise, because the tools that made it possible are working against us. A warehouse query returns a mean. A BI dashboard renders a bar. A model reports an R squared. Each of those is a summary, and each of them will happily describe twelve completely different datasets with the same sentence.

What follows is seven demonstrations, and then a protocol. I built the datasets myself, wrote the code, and put everything in a public repository so you can check every number. Two of the demonstrations use real published data, the 1973 Berkeley admissions records and a global health dataset, because the argument only matters if it survives contact with real mess.

What this means

Descriptive statistics are a starting point that feels like a conclusion. If your exploratory analysis stops at the mean, the standard deviation and the correlation, you have not found the story, you have found the shape of the envelope. The job is to open it.

Anscombe's quartet: four regressions, one output

Here are Anscombe's four datasets. Read the table first, the way an analyst with a query and a deadline would read it.

datasetmean of xmean of ySD of xSD of ycorrelation
set 19.007.503.161.940.82
set 29.007.503.161.940.82
set 39.007.503.161.940.82
set 49.007.503.161.940.82

Identical. By every number on the page, this is one dataset reported four times. Now draw it, with the same fitted line on each panel.

Four scatter plots of Anscombe's quartet. All four share the same mean, standard deviation, correlation and fitted regression line, but show a straight line, a curve, a line with one outlier, and a vertical cluster with one high-leverage point.
Figure 1Anscombe's quartet. Each panel carries the same mean of x (9.00), mean of y (7.50), standard deviation of x (3.16), standard deviation of y (1.94), correlation (0.82) and the same dashed least squares line. The four panels are not the same dataset, and it takes about two seconds to see it.

What each panel is telling you

Dataset 1 is the case the regression was invented for. The relationship is straight, the scatter is even, and the line is a fair description of every point on the panel. If all four looked like this, summary statistics would be enough.

Dataset 2 is curved. The points sit on a clean parabola that a straight line can only approximate, so the correlation of 0.82 actually understates a relationship that is nearly deterministic. Add one x squared term and the fit becomes almost exact. Report only the linear correlation and you have just described a strong relationship as a moderate one, and you will probably conclude there is noise in a process that has none.

Dataset 3 is a perfect straight line with a single point pulled out of place. The 10 honest points have a correlation of 1.00. One row drags the reported correlation down to 0.82 and tilts the slope. In a real dataset that row is a data entry error, a different unit of measurement, or a genuinely extreme case. Two of those three need fixing, and the summary statistics cannot tell you which one you have.

Dataset 4 is the trap for anyone who fits before they look. Every x is 8, except for one observation at x = 19. That single point both creates the entire apparent trend and carries a leverage of 1.0, which means the fitted line passes through it exactly. Remove it and the regression is not merely weaker, it is undefined, because x has no variance left. A leverage of 1.0 should be impossible in a dataset you are reporting from. It happens all the time.

The trap

If you ran the four regressions in any statistical package, printed the coefficients, the R squared, the standard errors and the p values, and put the printouts on a desk, you would not be able to match the printouts to the pictures. Four different realities, one identical block of output. Anscombe chose the numbers so that the residual standard error, the confidence interval for the slope and the significance test agree as well.

The equality is a property of rounding, and that matters

It is worth being precise about the word “identical”, because statisticians have spent fifty years arguing about it. The four datasets are not arithmetically identical. They agree to two decimal places, which is the precision Anscombe chose for his table.

Anscombe published exactly this table. Read down the columns: four different datasets, one identical set of statistics. Everything below two decimal places is invisible on the page.
datasetmean of ySD of ycorrelation (r)
set 17.50091.93700.8164
set 27.50091.93710.8162
set 37.50001.93590.8163
set 47.50091.93610.8165

The standard deviation of y is 1.9370, 1.9371, 1.9359 and 1.9361. The correlations are 0.8164, 0.8162, 0.8163 and 0.8165. Real differences, hiding two decimal places down.

This is why the next two sections are worth your time. Rounding is a weak form of the trick. If I could build datasets whose statistics are identical to the last binary digit, the objection disappears, and the argument gets sharper: there is no threshold of precision at which the summary statistics start to notice the shape. They never notice. That is what a summary is.

The Datasaurus Dozen, and the method behind it

In 2016 Alberto Cairo published a dataset whose statistics look thoroughly ordinary and whose scatter plot is a dinosaur. His instruction to readers has become the slogan of this whole corner of data visualisation: never trust summary statistics alone; always visualise your data .

A year later, Justin Matejka and George Fitzmaurice at Autodesk Research generalised the idea into a method and published it at CHI 2017 as Same Stats, Different Graphs . Their contribution is not the dinosaur. It is the algorithm: start from any dataset, pick a point, nudge it, keep the nudge if the mean, the standard deviation and the correlation stay inside tolerance, and bias the nudges towards a target shape so the cloud walks towards a picture you chose. They add simulated annealing so the walk does not get stuck in local optima, and they run it until a blob of random numbers has become a circle, a star, an x, three vertical lines.

Thirteen scatter plots of the Datasaurus Dozen, shaped as a dinosaur, a star, a circle, an X, a wave and other forms, all sharing identical summary statistics.
Figure 2The Datasaurus Dozen, thirteen datasets redistributed here from the published data accompanying Matejka and Fitzmaurice (2017). Every panel has x mean 54.26, y mean 47.83, x standard deviation 16.76, y standard deviation 26.93 and a Pearson correlation of −0.06, to two decimal places.

Thirteen panels, thirteen datasets, one summary. The paper's datasets agree to two decimal places, which is plenty to make the argument in a keynote. I wanted to know whether the agreement could be exact rather than close. It can, and it takes four lines of linear algebra rather than two hundred thousand iterations of simulated annealing.

Twelve datasets, statistics identical to fifteen decimal places

Here is the whole trick. Take any cloud of points. Standardise both coordinates so they have mean zero and standard deviation one. The correlation of two standardised variables is the cosine of the angle between them, so if you want a specific correlation, you do not need to search for one: you rotate.

Method
u = (x - mean(x)) / sd(x)            # mean 0, sd 1
v = (y - mean(y)) / sd(y)            # mean 0, sd 1
e = v - (u . v / n) * u              # the part of v perpendicular to u
w = e / sd(e)                        # unit vector, still perpendicular to u

v* = r * u + sqrt(1 - r^2) * w       # corr(u, v*) is now exactly r
x' = m1 + s1 * u                     # mean m1, sd s1, exactly
y' = m2 + s2 * v*                    # mean m2, sd s2, exactly

The affine step fixes the means and the standard deviations because it is arithmetic rather than optimisation. The orthogonal step fixes the correlation because a correlation is a cosine and the two components are at right angles. Nothing in this procedure looks at the shape of the cloud, which is why the shape is free to be anything at all.

Twelve scatter plots of 142 points each, shaped as a circle, star, heart, plus sign, X, wave, spiral, triangle and the letters D and A, all carrying identical summary statistics.
Figure 3Twelve datasets of 142 points each, built from the shapes above and then transformed so that every one carries exactly the same five statistics: mean of x 54.26, mean of y 47.83, standard deviation of x 16.76, standard deviation of y 26.93, correlation −0.0641. The circle is slightly elliptical and the grid is slightly sheared, and that is the visible price of forcing a correlation of −0.06 onto a shape that does not have one. The statistics are perfect; the picture pays for it.

The table below is the verification. Twelve rows, ten decimal places, no argument.

Twelve point clouds, ten decimal places. The largest disagreement between any two rows is 1.1e-14, which is floating-point noise.
shapemean of xmean of ySD of xSD of ycorrelation
circle54.260000000047.830000000016.760000000026.9300000000-0.0641000000
star54.260000000047.830000000016.760000000026.9300000000-0.0641000000
heart54.260000000047.830000000016.760000000026.9300000000-0.0641000000
plus54.260000000047.830000000016.760000000026.9300000000-0.0641000000
x_shape54.260000000047.830000000016.760000000026.9300000000-0.0641000000
wave54.260000000047.830000000016.760000000026.9300000000-0.0641000000
spiral54.260000000047.830000000016.760000000026.9300000000-0.0641000000
triangle54.260000000047.830000000016.760000000026.9300000000-0.0641000000
h_lines54.260000000047.830000000016.760000000026.9300000000-0.0641000000
v_lines54.260000000047.830000000016.760000000026.9300000000-0.0641000000
blob54.260000000047.830000000016.760000000026.9300000000-0.0641000000
letters_DA54.260000000047.830000000016.760000000026.9300000000-0.0641000000

The largest disagreement between any two of those rows, across all five statistics, is 1.1 × 10−14. That is floating point arithmetic running out of room, not a statistical difference. You could train a model on any one of these twelve datasets and print a metric, and the metric would be the same to every digit the machine can hold, while the thing you are modelling is a spiral in one case and a heart in another.

What this means

Notice what the trick does not preserve. Skewness, kurtosis, the number of modes and every nonlinear statistic are free to differ, and they do, wildly. So the summary is not merely incomplete in an abstract sense. It is incomplete in a way that is structural: the statistics that survive the transformation are exactly the ones that cannot see shape, and the statistics that see shape are exactly the ones nobody puts in the table.

Three honest caveats, because this is a demonstration, not a proof of anything universal. These twelve datasets are synthetic and they were built to make a point, so treat the shapes as an illustration of the arithmetic rather than as evidence about anyone's data. Higher moments are not preserved, which is the whole idea. And the transformation is not a substitute for the Autodesk method: their perturbation approach generalises to any statistic you can compute, while mine works because the mean, the standard deviation and the correlation are exactly the statistics an affine-plus-rotation map can control. That is also why they are the statistics that get quoted.

Everything from here on uses either real data or datasets whose distributions are constructed to mirror shapes you meet in operational work.

The mean and the standard deviation do not describe a shape

Set the shape question aside for a moment and keep only two numbers, the pair that ends up in almost every report ever written. Six distributions below all have a mean of 50.00 and a standard deviation of 10.00, exactly, by construction.

Six histograms with identical mean 50.00 and standard deviation 10.00, showing normal, bimodal, skewed and outlier-contaminated shapes.
Figure 4Six distributions. Mean 50.00 and standard deviation 10.00 for all six, to the last digit. The dashed black line is 50, the solid coral line is each dataset's median. A histogram is the shortest path from a mean to a shape.
Every distribution has mean 50.00 and standard deviation 10.00. The median moves by 4.5 points, the interquartile range by a factor of three, and the skewness changes sign twice.
distributionmeanSDmedianIQR (Q3-Q1)minmaxskewness
normal50.0010.0049.6813.5026.683.7+0.14
bimodal50.0010.0050.8518.5130.569.2-0.03
right_skewed50.0010.0047.7112.1036.188.3+1.10
left_skewed50.0010.0052.2511.686.664.2-1.47
uniform50.0010.0048.9617.3434.268.4+0.23
outlier_driven50.0010.0049.725.73-44.4144.7+0.05

Same two headline numbers, and the story underneath is different in every panel.

The bimodal pair of humps is the clearest case. The mean of 50 sits in a gap where almost no observation lives. That is not a subtle statistical objection, it is a direct contradiction: the number you are reporting describes an outcome that does not happen. Two humps almost always means two populations, two shifts, two products, two customer segments, and the right next step is to find the variable that separates them rather than to report their average.

The skewed panels show why the mean drifts away from anything a person would recognise as typical. In the right skewed case the median sits at 47.71 while the mean is at 50, because a modest number of large values pull the mean up. In real operational data, service times, claim amounts, waiting lists and call durations are skewed in this direction, and the mean is routinely read as “the typical case” when it is nothing of the sort.

The last panel is the one I would put in front of any analyst who reports a standard deviation without a plot. Four rows out of four hundred sit far out on the tails. Those four rows alone manufacture the entire standard deviation of 10.00. Remove them and the interquartile range collapses to 5.73 against 13.50 for the normal case with the same standard deviation. The headline number is not describing the spread of your data. It is describing four records.

The trap

The mean and the standard deviation are a complete description of one distribution, the normal one, and a partial description of every other. They are least trustworthy exactly where real business data lives: skewed, bounded, spiky, contaminated, or quietly bimodal. Report the median and the interquartile range with them, report n, and report the minimum and the maximum. Then show the histogram, because a reader can absorb a shape in a second and a standard deviation never.

The boxplot mirage

The usual fix for a misleading mean is a boxplot, and it is a real improvement: five numbers instead of two, resistant to outliers, and instantly comparable across groups. It also runs into the same wall, one step further along. Six datasets below share a single five-number summary.

Six datasets sharing an identical five-number summary, shown as jittered point clouds above and as identical boxplots below.
Figure 5Six datasets. The top row draws every point, so the arrangement of the mass is visible; the bottom row draws the boxplots you would actually put in the report. Minimum 10, first quartile 30, median 50, third quartile 70, maximum 90 for all six.
The five-number summary is identical for all six datasets by construction. The mean still drifts from 44.82 to 55.83 and the standard deviation from 19.11 to 27.06.
datasetminQ1medianQ3maxIQRmeanSD
uniform10.0030.0050.0070.0090.0040.0050.0023.32
hollow (U shape)10.0030.0050.0070.0090.0040.0050.0027.06
bell (mass in the middle)10.0030.0050.0070.0090.0040.0050.1719.11
top-heavy10.0030.0050.0070.0090.0040.0055.8322.91
bottom-heavy10.0030.0050.0070.0090.0040.0044.8223.29
spike at the median10.0030.0050.0070.0090.0040.0050.8222.37

The five-number summary is identical by construction, and the mean still wanders from 44.82 to 55.83 while the standard deviation moves from 19.11 to 27.06. One dataset is a uniform spread. One crowds towards the middle. One is hollow, with the mass pushed into the tails. One is top heavy, one bottom heavy, one is a spike at the median with thin tails on either side.

If you have ever presented a wall of boxplots over a time series, this is the failure mode to worry about. The dashed box does not move, so nothing in the report moves, while the thing you are actually tracking has changed from a bell into a U. The Autodesk authors demonstrate the same effect over time, seven distributions that shift shape year after year while their boxplots stay frozen, and use it to argue for strip plots and violin plots that show density rather than quartiles.

Why this is an operations problem, not a statistical one

Consider a service desk whose response times become bimodal because a new team is handling a new ticket type. The median gets faster and the interquartile range gets narrower, both of which look like improvement on a boxplot, while an entire second population of slow jobs grows into the tail. The people experiencing that second population are the ones most likely to leave, and their experience is invisible in exactly the chart most teams use to monitor experience.

Tukey designed the boxplot to compare medians and flag outliers, and it does that job well. It was never a density plot. If the shape of the distribution is what your decision depends on, draw something that shows shape.

Method

Overlay the individual points on the boxplot whenever the number of observations is small enough for dots to be readable, which in most reporting situations it is. And plot the distribution of the same metric at two points in time side by side, not just its median, because the question “did the centre move” and the question “did the shape move” are different questions with different answers.

Correlation is a number about a line, not about a relationship

Five datasets below all have a Pearson correlation of 0.7000, exactly. They are not five variations on the same theme. They are a line, a curve, a step, a single-point accident, and a mostly random cloud with a late flourish.

Five scatter plots all with a Pearson correlation of exactly 0.7000, showing a line, a curve, a step, a single-point accident and a mostly random cloud.
Figure 6Five datasets, one correlation. Pearson r is 0.7000 in every panel. The dashed line is the least squares fit. Spearman's rho, which only looks at rank order, already separates them, and so does a single omitted point in the fourth panel.
Five datasets, one correlation. Spearman's rho, which only cares about rank order, already separates them, and the fourth dataset changes by nearly 0.3 when a single point is removed.
datasetPearson rSpearman rhor moves this much if you delete one point
linear0.70000.7090.012
curved (quadratic)0.70000.5840.008
step change0.70000.6000.005
one outlier flips it0.70000.9680.285
wall of noise + trend0.70000.5430.006

The second panel is the most common real-world case: a genuine relationship that happens to be curved. Correlations are a summary of the linear component of a relationship and nothing else, so a strong curve is reported as a moderate line. If you fit a straight line through it and then reason about the residuals as noise, you are treating structure as error, and your confidence intervals will be wrong in a way that no amount of extra data will fix.

The third panel is the one that catches experienced people, because both variables are genuinely related, up to a threshold, and then the relationship changes. Correlation has no way to represent a change in regime, so it averages two regimes into one number that describes neither.

The fourth panel is the influence problem in its purest form. Remove the single most consequential point and the correlation moves by 0.285. That is a dataset where the headline number is being held up by one row, and where any conclusion about the population is really a conclusion about one observation.

The extreme case: a perfect relationship with a correlation of zero

If all of that still feels like a matter of degree, here is the limiting case. Take every point on a circle. The relationship between x and y is perfect and deterministic: give me x and I can tell you y, up to a sign. The correlation is zero.

Points arranged on a circle, with a flat fitted regression line. The relationship is perfect and deterministic while the correlation is zero.
Figure 7A perfect relationship, a flat regression line and a correlation of 0.00. The points never leave the circle. Any analysis that screened this variable pair on correlation and discarded it would have thrown away a deterministic law of motion.

The circle is a cartoon, but the family it belongs to is not. A U-shaped relationship, an X, a sine wave, a heteroscedastic fan where the correlation holds in the middle and fails at the edges, and any cloud with two clusters at opposite corners all produce correlations near zero while containing strong structure. A low correlation is evidence about linear association. It is not evidence of independence, and it is not evidence that nothing is there.

The pooled correlation that measures the wrong thing

Here is the same problem in real data, and it is the reason I put the penguins in.

Body mass against flipper length for 342 penguins of three species, with a pooled fitted line and separate within-species lines.
Figure 8Body mass against flipper length for 342 penguins at Palmer Station, Antarctica, three species, real and slightly messy data. The dashed line is every species pooled. The solid lines are within each species.
Palmer Station penguins, real and messy. Pool the species and the relationship looks almost mechanical; inside each species it is much weaker, because the pooled figure is mostly measuring the difference between a Gentoo and an Adelie.
populationcorrelation between flipper length and body massn
all three species pooled0.871342
Adelie0.468151
Chinstrap0.64268
Gentoo0.703123

Pooled, the correlation is 0.871, close to the kind of number somebody quotes as a strong relationship. Inside each species it falls to 0.468, 0.642 and 0.703. The pooled figure is mostly a measurement of how different a Gentoo is from an Adelie, dressed up as a measurement of how flipper length relates to mass. Both statements are true, and only one of them is useful for the question a biologist is usually asking.

What this means

The correlation, n, and the scatter plot. A rank correlation alongside it, because Spearman survives curvature and outliers in ways Pearson does not. The influence of the most consequential few points. And the correlation computed separately within each group you know about, because that last number is the one that usually changes the decision.

Simpson's paradox: the number reverses when you remember the groups

Every example so far has been about a statistic failing to describe a single population well. This one is worse, because the statistic reverses. It is not vague, it is wrong in the direction of the conclusion.

In 1973 the University of California at Berkeley was accused of discriminating against women in graduate admissions, on the basis of exactly the kind of aggregate number a report would contain. Peter Bickel, Eugene Hammel and John O'Connell reanalysed the applications, department by department, and published what they found in Science in 1975. Their table, for the six largest departments, is reproduced here.

UC Berkeley graduate admissions, 1973, the six largest departments (Bickel, Hammel and O'Connell, 1975). Overall the men's admission rate beats the women's; inside four of the six departments the women's rate is the higher one. The women applied in far greater numbers to the departments that admit almost nobody.
departmentmen appliedmen admittedmen ratewomen appliedwomen admittedwomen ratewho was admitted more often
A82551262.1%1088982.4%women higher
B56035363.0%251768.0%women higher
C32512036.9%59320234.1%men higher
D41713833.1%37513134.9%women higher
E1915327.7%3939423.9%men higher
F373225.9%341247.0%women higher
ALL2,6911,19844.5%1,83555730.4%men higher
Berkeley 1973 graduate admissions. The pooled admission rate favours men, while four of the six largest departments admitted women at a higher rate.
Figure 9Berkeley graduate admissions, 1973, the six largest departments. On the left, the headline the aggregate produced. On the right, the same admissions split by department, where the women's admission rate is the higher one in four cases. The exact rates are in the table above.

Overall, 44.5 per cent of the men who applied were admitted against 30.4 per cent of the women. Inside the departments, women were admitted at a higher rate in four of the six. Both of those sentences are arithmetic facts about the same 4,526 applications.

The mechanism is the reason this is not a curiosity. Women applied in far greater numbers to the departments that admit almost nobody, and men applied in greater numbers to the departments that admit most applicants. When the two groups have different sizes and the groups have different admission rates, pooling them creates a mixture, and a mixture can run in the opposite direction to every one of its parts. The aggregate was not just imprecise. It pointed at the wrong culprit, and the correction required knowing which groups existed.

The same reversal in a dataset you would meet on a Tuesday

Berkeley is history, so here is a synthetic version of the ordinary case: three schools, hours of revision against exam score. Within each school more revision means a better score. Pool all the students and the correlation flips negative.

Three schools, revision hours against exam score. Within each school the relationship is strongly positive; pooled it is negative.
Figure 10Three schools, synthetic but built to mirror a real pattern. Within each school the relationship between revision and score is strongly positive. Pooled, the same data reports a negative relationship, because the school that sets the most homework is also the school with the weakest intake.

The pooled correlation is 0.636 and it points the wrong way; within schools it runs between 0.898 and 0.969. Nobody is confused about which number matters once they see the picture, and nobody would have seen it from the pooled output.

Real data does the same thing without being constructed for the purpose. Log GDP per person and life expectancy correlate at 0.81 across 142 countries. Inside Africa the same two variables correlate at 0.45. The pooled number is a statement about the difference between continents, not about the relationship between money and years inside a continent. Both are interesting. Mixing them up is how a report ends up saying something nobody can act on.

Log GDP per person against life expectancy for 142 countries, 2007, with a pooled fitted line and separate lines within each continent.
Figure 11Real data from Gapminder, 142 countries in 2007. Each bubble is a country, sized by population. The dashed line pools every country; the five solid lines are fitted inside each continent. The correlations are in the table above.
Gapminder 2007, 142 countries. The pooled correlation of 0.81 is a statement about the world; inside Africa the same two variables move together far more weakly.
populationcorrelation between log GDP per person and life expectancy
all countries0.809
within Africa0.452
within Americas0.780
within Asia0.800
within Europe0.836
within Oceania1.000
Real data

Compare two hospitals on readmission rates without adjusting for case mix and the hospital that treats the sickest patients looks the worst. Compare two service centres on average handling time without separating case types and the centre with harder work looks inefficient. Report a single unemployment rate while the composition of the labour force changes and the aggregate can rise while every group's rate falls. In each case the pooled number is arithmetically correct, easy to compute, and the wrong number for the decision in front of you.

How to catch it before someone else does

Ask what decides which group an observation lands in. If that thing also plausibly affects the outcome, you have a candidate for a reversal, and the groups are almost certainly unequal in size. Then plot the groups, always, even when the pooled chart looks convincing, and compute the statistic both pooled and within. When they disagree, the within-group number answers the causal question and the pooled number answers a question about composition. Say which one you are reporting, in the chart title if necessary.

What the job actually is

None of the seven demonstrations is a surprising piece of mathematics. They are surprises about how much we trust the first number we compute, and that trust is the part of the job that separates a report from an analysis.

Descriptive statistics answer the question “what is the value of this quantity”. They cannot answer “what does this quantity mean”, because meaning depends on shape, on groups and on the decision being made. Someone has to look. In most organisations that someone is the analyst, and the reason it matters is that the summary statistics will never ask for a second look on their own. They are always confident.

What this means
  1. Draw the distribution before you quote its mean. A histogram takes ten seconds and settles most of the questions in this article.
  2. Never report a mean without n and its median. Two numbers turn a fragment into a description.
  3. Add the quartiles, the minimum and the maximum. The interquartile range survives the outliers that inflate the standard deviation.
  4. Ask whether the mean is a place anyone actually is. If it lands in a gap between two humps, the mean describes nobody and the two humps are the story.
  5. For any relationship, plot first and compute second. Then report the correlation with n, the rank correlation, and the influence of the most consequential observations.
  6. Look for curvature, thresholds and clusters. A quadratic term, a regime change or two blobs will each defeat a correlation in a different way.
  7. Stratify before you pool. If you know a variable that affects both group membership and the outcome, compute the statistic inside the groups as well as across them.
  8. When a trend is reported, ask whether the shape moved, not just the centre. Growing tails and new humps are operational signals and they are invisible in a median.
  9. Test the robustness of the headline. Recompute without the top and bottom percentile. If the conclusion changes, your conclusion was about the extremes, so say so.
  10. Keep the picture next to the number. A dashboard showing a mean should carry a link to its distribution, and a report should show both.

The awkward part, in plain terms

This is judgement work rather than software work, and it is where domain knowledge earns its place. Nothing in a query engine will tell you that the response time distribution has turned bimodal because a new ticket type arrived, or that the admissions aggregate mixes departments with wildly different capacity. A statistician with no context can compute every number in this article correctly and still miss every single one of the seven points, because the seven points are all questions about the world rather than about the arithmetic.

The EDA habit worth building is a short reflexive pause between getting a number and reporting a number. Why is it that size. What would make it wrong. What is the picture behind it. What changes in my recommendation if the picture is not what I assumed. Nine times out of ten the pause costs a minute and changes nothing. The tenth time it changes the decision, and nobody notices the nine, which is why the habit is hard to acquire and worth keeping.

Method
import pandas as pd
import plotly.express as px

df = pd.read_csv("data/same_mean_sd_twins.csv")

# 1. the summary you were about to report
summary = df.groupby("dataset")["value"].agg(["mean", "std", "median", "count"])

# 2. the five numbers that spare you an argument
quartiles = df.groupby("dataset")["value"].describe(percentiles=[.25, .5, .75])

# 3. the check nobody does: is this distribution even one distribution?
fig = px.histogram(df, x="value", facet_col="dataset", facet_col_wrap=3,
                   nbins=45, color="dataset", height=560)
fig.show()

# 4. and for a relationship, picture before coefficient
scatter = px.scatter(df_xy, x="x", y="y", trendline="ols", color="group")
scatter.show()

Three lines of pandas and two charts. That is the entire intervention. The reason it does not happen is not that it is difficult, it is that the summary arrives first and looks finished.

Every number here is generated from a public repository

The datasets, the generators and the figures were built with Python, NumPy, pandas and Plotly. Nothing in this article was typed by hand: the tables are generated from the same JSON the figures read, so if a number and a chart ever disagree, the build would break.

Eleven files, eleven demonstrations. Each one is generated by a seeded script in the repository, and each script prints its own verification.
File in data/What it demonstratesRows
anscombe_quartet.csvThe 1973 original, four sets, identical to two decimal places44
same_stats_shapes.csvTwelve shapes, statistics identical to 15 decimal places1,704
datasaurus_dozen.csvThe published Datasaurus Dozen, thirteen shapes1,846
same_mean_sd_twins.csvSix distributions, mean 50.00, standard deviation 10.002,400
same_boxplot.csvSix datasets, one identical five-number summary606
same_correlation.csvFive relationships, one correlation of 0.70001,000
circle_r_zero.csvA perfect relationship with a correlation of zero400
simpson_berkeley_1973.csvReal admissions data, aggregate reverses by department12
simpson_schools.csvRevision and scores, positive within schools, negative pooled120
gapminder_2007.csvReal GDP and life expectancy, ecological fallacy142
penguins.csvReal measurement data, pooled versus within-species correlation342

Running it

git clone https://github.com/AbdoDameen/same-stats-different-graphs.git
cd same-stats-different-graphs

uv venv --python 3.11 .venv
uv pip install --python .venv/bin/python numpy pandas scipy plotly kaleido matplotlib

.venv/bin/python scripts/01_make_datasets.py   # builds data/ and verifies every claim
.venv/bin/python scripts/02_build_figures.py   # builds the figures and the tables
.venv/bin/python scripts/03_build_article.py   # assembles this page

01_make_datasets.py prints its own verification: the maximum spread across the twelve identical datasets, the five-number summaries, every correlation. If the arithmetic in this article were wrong, the script would say so before I could publish it.

Attribution

The Anscombe quartet and the Datasaurus Dozen are redistributed here for study, from the published sources cited below. The Berkeley admissions table is the six-department table from Bickel, Hammel and O'Connell (1975). The Gapminder and Palmer Station penguin data are the public datasets of those projects. Everything else was generated by the scripts in this repository from seeded random draws, which means you can rebuild each of them to the last digit.

Code is released under the MIT licence. Datasets are released under CC BY 4.0, with attribution to the original authors above. If you reuse the article itself, a link back is appreciated.

Real data

The seven demonstrations in this article are all cases where a true number produced a false impression. None of them required bad faith, sloppy work or a hidden agenda. They required only that someone report the summary and stop. That is the whole failure mode, and it is available to all of us on any Tuesday afternoon, with any dataset, and it is cheap to avoid.

Sources

  1. Anscombe, F. J. (1973). Graphs in Statistical Analysis. The American Statistician, 27(1), 17–21. The four datasets, the identical regressions and the argument for looking.
  2. Matejka, J. and Fitzmaurice, G. (2017). Same Stats, Different Graphs: Generating Datasets with Varied Appearance and Identical Statistics through Simulated Annealing. Proceedings of CHI 2017. DOI 10.1145/3025453.3025912. The Datasaurus Dozen, the boxplot and violin examples, and the perturbation method.
  3. Autodesk Research (2017). Same Stats, Different Graphs, project page with datasets, animations and source code. research.autodesk.com/publications/same-stats-different-graphs.
  4. Cairo, A. (2016). Download the Datasaurus: Never trust summary statistics alone; always visualize your data. The Functional Art. The original dinosaur.
  5. Bickel, P. J., Hammel, E. A. and O'Connell, J. W. (1975). Sex Bias in Graduate Admissions: Data from Berkeley. Science, 187(4175), 398–404. The source of the admissions table.
  6. Simpson, E. H. (1951). The Interpretation of Interaction in Contingency Tables. Journal of the Royal Statistical Society, Series B, 13(2), 238–241. The result now called Simpson's paradox.
  7. Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley. The origin of the boxplot and of the habit of looking before calculating.
  8. Tufte, E. R. (1983). The Visual Display of Quantitative Information. Graphics Press. On what a chart can carry that a table cannot.
  9. Gapminder Foundation. GDP per capita and life expectancy by country, 2007. gapminder.org/data.
  10. Gorman, K. B., Williams, T. D. and Fraser, W. R. (2014). Ecological Sexual Dimorphism and Environmental Variability within a Community of Antarctic Penguins. PLoS ONE, 9(3). Palmer Station LTER penguin measurements.

How to cite this article

Dameen, A. (2026). Same Numbers, Different Stories.
Dameen Analytics. https://github.com/AbdoDameen/same-stats-different-graphs