Before you model, before you test a single hypothesis, you should look at the data — really look, plot by plot, until it has told you what it is. This discipline of listening to data has a name and a patron saint. In 1977 John Tukey published Exploratory Data Analysis and argued that statistics had grown lopsided: obsessed with confirming pre-formed hypotheses, and neglecting the earlier, humbler art of finding out what questions the data can even answer. EDA is that art.
Tukey's own line captures the spirit: "The greatest value of a picture is when it forces us to notice what we never expected to see." EDA is not a step you rush past to reach the "real" modelling — done well, it is where most of the discoveries actually happen.
The mindset is the whole point. In confirmatory analysis you decide on a hypothesis, collect data, and run a test that can only say yes or no. In exploratory analysis you arrive with open eyes, let the data suggest hypotheses, and postpone judgement. The two are partners, but they must not be confused — testing a hypothesis on the same data that suggested it is a cardinal sin (we return to it in the "watch out" below).
A practical EDA works outward in three widening circles:
| Level | Question | Typical tools |
|---|---|---|
| Univariate | What does each variable look like on its own? Centre, spread, shape, skew, gaps, outliers? | Histogram, box plot, five-number summary |
| Bivariate | How do two variables move together? | Scatter plot, correlation, grouped box plots |
| Multivariate | What patterns emerge across many variables at once? | Scatter-plot matrix, correlation heatmap, colour/facet encodings |
At the univariate stage a
Here is the single most important lesson in all of EDA, drawn as a picture. Both clouds of points
below have — to two decimal places — the same mean of
If you had trusted the summary statistics — or the regression coefficients — you would never have known that the second dataset is not linear at all. Only the plot tells you. This is the heart of EDA: numbers can agree while realities differ wildly.
A good exploratory pass systematically checks for the things that break models and mislead readers:
Each finding either fixes a data problem or seeds a hypothesis to test later, on fresh data.
In 1973 the statistician Francis Anscombe built four small datasets — now called
Anscombe's quartet — that share, to two decimals, the same mean and variance of
EDA is gloriously permissive — slice, plot, and hunt for patterns to your heart's content. But the moment you find something, you must not turn around and run a significance test for it on the same data. With enough plots you are guaranteed to stumble on striking patterns by pure chance (the "garden of forking paths"), and a p-value computed after the fact is meaningless — you have already used up the data's surprise. This is the difference between exploratory and confirmatory work. Explore freely, form your hypothesis, then confirm it on a held-out or freshly collected sample. Reporting an EDA-discovered pattern with a confirmatory p-value is one of the most common ways honest analysts fool themselves.
Kaggle Learn's free Data Visualization course is an EDA workshop in disguise: you build the histograms, scatter plots and heatmaps of this lesson on real datasets and learn to read what they are telling you before a single model is fit.