Exploratory Data Analysis (EDA): Tukey's Framework
Introduction
Imagine receiving a spreadsheet with 50,000 rows of customer data. Before running any statistical test or building any model, the first task is to understand the data: its shape, quirks, patterns, and problems. This process has a name — Exploratory Data Analysis (EDA) — and it was formalized by John Tukey in his 1977 book of the same name.
EDA is not a single technique but a philosophy: let the data reveal its story before imposing assumptions. The five number summary and the box plot — both Tukey inventions — are central tools in this approach.
What Is EDA?
Exploratory Data Analysis is the practice of using visualizations and summary statistics to:
- Understand the structure and patterns in data.
- Detect anomalies, outliers, and errors.
- Check assumptions before formal modeling.
- Generate hypotheses for further investigation.
Tukey deliberately contrasted EDA with Confirmatory Data Analysis (CDA), which uses hypothesis tests and formal inference. EDA is the detective work; CDA is the courtroom trial. Both are necessary, but EDA must come first.
Tukey's Analogy
Core Principles of EDA
1. Resistance
Use statistics that resist the influence of extreme values. The median resists outliers that pull the mean. The IQR resists outliers that inflate the standard deviation. Tukey designed the five number summary specifically because all five values are resistant (or reasonably so).
2. Residuals
After fitting a simple model to data, examine what is left over — the residuals. Patterns in residuals reveal structure the model missed. EDA treats residual analysis as a first-class activity, not an afterthought.
3. Re-expression
Transform data (logarithms, square roots, reciprocals) to reveal simpler patterns. A right-skewed distribution often becomes approximately symmetric after a log transformation, making patterns easier to see.
4. Revelation
Visualize data in multiple ways. A single chart can hide important features. Tukey advocated for looking at data from many angles: box plots, stem-and-leaf displays, scatter plots, and residual plots.
The EDA Toolkit
| Tool | Purpose | What It Reveals |
|---|---|---|
| Five Number Summary | Numeric summary | Center, spread, range, quartile positions |
| Box Plot | Visual summary | Distribution shape, outliers, group comparisons |
| Histogram | Shape visualization | Modality, gaps, clusters, skewness |
| Stem-and-Leaf Plot | Detailed shape + values | Distribution shape while preserving individual values |
| Scatter Plot | Relationship visualization | Correlations, clusters, nonlinear patterns |
| Residual Plot | Model diagnostic | Patterns the model missed |
A Practical EDA Workflow
A structured EDA process for any new dataset:
- Check dimensions: How many rows and columns? What are the variable types?
- Examine missing values: Which variables have gaps? How much data is missing?
- Compute summary statistics: Five number summary, mean, standard deviation for each numeric variable.
- Visualize distributions: Histograms and box plots for each variable.
- Check for outliers: Use the 1.5 × IQR rule and visual inspection.
- Examine relationships: Scatter plots and correlation matrices for pairs of variables.
- Document findings: Record anomalies, patterns, and questions for further analysis.
Modern EDA
EDA vs. Confirmatory Data Analysis
| Aspect | EDA | CDA |
|---|---|---|
| Goal | Discover patterns | Test specific hypotheses |
| Approach | Open-ended, visual | Formal, mathematical |
| Tools | Charts, summaries, transformations | Hypothesis tests, confidence intervals |
| Assumptions | Minimal | Requires specific conditions (normality, independence) |
| Order | Always first | After EDA |
Common EDA Mistakes
- Skipping EDA entirely: Jumping straight to modeling or testing often leads to wrong conclusions.
- Using only means: The mean alone can hide bimodality, skewness, and outliers. Always examine the full distribution.
- Ignoring outliers: Outliers may be errors (fix them) or genuinely extreme values (understand them). Either way, they deserve attention.
- Over-interpreting patterns: EDA generates hypotheses, not conclusions. A pattern in an exploratory analysis must be confirmed with appropriate tests.
Start Exploring
The Five Number Summary Calculator is a quick EDA tool: enter any dataset to instantly see the five number summary, IQR, outlier fences, and a box plot — exactly the starting point Tukey would recommend.
Verify Your Calculations
Use the free five number summary calculator to check your work.
Open CalculatorWritten by Oge Nwaozuzu
Statistics educator and data analyst. Creator of 5numbersummarycalculator.app.