Exploratory data analysis

Also known as: EDA

On this page 7

Exploratory data analysis (EDA) is the open-ended examination of a dataset with summary statistics, visualizations and simple transformations to understand its structure, quality and patterns before formal modeling or reporting. In analytics, EDA is the stage where an analyst learns what the data actually contains, as opposed to what its documentation claims.

The approach was popularized in the 1970s as a counterweight to purely confirmatory statistics. Its guiding idea is that data should be looked at before it is tested: EDA generates hypotheses, reveals errors and shapes the questions that later analysis answers, while confirmatory analysis tests those hypotheses on suitable data.

What exploratory data analysis examines

Exploratory data analysis examines a dataset along a small set of recurring dimensions: its shape, the distribution of each variable, relationships between variables and the quality of the records. Covering all of them systematically prevents surprises later in the project.

DimensionQuestionTypical technique
StructureHow many rows, columns and types?Schema listing, row counts, sample rows
Univariate distributionWhat values does each variable take?Histogram, box plot, frequency table
Data qualityWhat is missing, duplicated or invalid?Missing-value counts, uniqueness checks
RelationshipsWhich variables move together?Scatter plot, correlation matrix, cross-tabulation
Time behaviorAre there trends, seasonality or breaks?Line chart, rolling statistics
SegmentsDo groups behave differently?Grouped summaries, faceted charts
Main questions of exploratory data analysis

The order is not fixed. EDA is iterative: a strange spike in a histogram leads to a check of the raw records, which may reveal a unit error, which in turn changes how a relationship is plotted.

Core techniques and summary statistics

EDA relies on robust, easy-to-read summaries more than on complex models. The five-number summary of minimum, first quartile, median, third quartile and maximum describes a numeric variable without assuming any distribution.

Robust measures matter because real data are often skewed. The median and interquartile range resist outliers, whereas the mean and standard deviation can be pulled far by a few extreme values. A large gap between mean and median is itself an early signal of skewness or data errors.

The table below matches common variable types with the summaries and charts that suit them best.

Variable typeUseful summariesUseful charts
Continuous numericMedian, quartiles, range, skewnessHistogram, box plot, density plot
CategoricalCounts, proportions, number of levelsBar chart, frequency table
Two numeric variablesCorrelation coefficientsScatter plot, hexbin plot
Numeric by categoryGrouped medians and spreadsSide-by-side box plots
Time seriesRolling means, period-over-period changeLine chart, seasonal subseries plot
Techniques by variable type

Correlation coefficients should always be read together with a scatter plot. Very different patterns, including curved relationships and clusters, can produce the same coefficient, and Spearman rank correlation is more robust than Pearson correlation when outliers or nonlinear trends are present.

EDA compared with other analytics approaches

EDA is exploratory and hypothesis-generating, which sets it apart from the analytics approaches that typically follow it. The comparison below clarifies where it fits.

ApproachMain goalTypical output
Exploratory data analysisUnderstand data, find questionsNotes, charts, data quality issues
Descriptive analyticsReport what happenedRecurring dashboards and KPIs
Diagnostic analyticsExplain why it happenedRoot-cause analyses
Confirmatory analysisTest predefined hypothesesTest results with error control
Predictive analyticsForecast outcomesValidated models and scores
Exploratory data analysis and related approaches

The boundary with descriptive analytics is practical rather than technical: both use summaries and charts, but descriptive work answers known, recurring questions, while EDA deals with new or unfamiliar data. EDA is also an essential first step in feature engineering for machine learning.

A practical EDA workflow

A disciplined EDA follows a repeatable workflow while leaving room for curiosity. The following steps cover most projects.

  1. Clarify the purpose and the unit of observation, such as one row per order or per customer.
  2. Profile the structure: column types, row counts, keys and uniqueness.
  3. Quantify missing and invalid values per column and per segment.
  4. Plot every important variable on its own before combining variables.
  5. Explore relationships with the outcome of interest and between predictors.
  6. Record findings and open questions in a short, reproducible notebook or report.

Automated profiling tools can produce a first overview in minutes, but they do not replace judgment. They cannot know that a negative age is impossible or that a sudden drop in records coincides with a system migration.

For large datasets, exploration usually starts on a random sample of tens of thousands of rows, which renders charts quickly, and then verifies key findings on the full dataset. Rare categories and extreme values, however, should always be counted on all rows, because a sample can miss them entirely.

Pitfalls and limits of exploration

The flexibility of EDA is also its main risk. With enough slicing, random noise produces convincing patterns, so findings from exploration are hypotheses, not conclusions.

PitfallRiskSafeguard
Testing on the explored dataOverstated significanceConfirm on a holdout or new sample
Ignoring missingness patternsBiased conclusionsAnalyze who and what is missing
Over-aggregationHidden subgroup effectsBreak results down by key segments
Deleting outliers blindlyLoss of real rare eventsInvestigate before removing
Unrecorded stepsResults cannot be reproducedScripted, versioned analysis
Common EDA pitfalls

Aggregated data can even reverse a relationship, a phenomenon known as Simpson’s paradox, which is why comparisons across groups should always be checked within meaningful segments as well.

In simple terms

Exploratory data analysis is like walking through a house before buying it. The listing describes the rooms, but only a visit shows the cracked tile, the bright kitchen and the odd smell in the basement.

An analyst does the same with data. Simple counts and charts show what is really there, what is broken and what looks interesting. Only after this first look does it make sense to ask precise questions.

A practical example

A subscription streaming service asks its analytics team why cancellations rose last quarter. Before building any churn model, an analyst runs an EDA on about 400,000 customer records with signup date, plan, viewing hours, payment method and cancellation date.

The histogram of viewing hours shows a large spike at exactly zero, and further checks reveal that one payment provider stopped sending usage data in the second month of the quarter. A grouped box plot also shows that customers on the annual plan barely changed, while monthly-plan cancellations doubled in two regions.

The team fixes the data feed first and then focuses the model on monthly plans in those regions. The EDA took two days and prevented a model trained on corrupted usage data, which would have pointed to the wrong cause.