7 Exploratory Data Analysis
Learn how exploratory data analysis uses plots and numerical summaries to reveal patterns, investigate unusual observations, and develop useful follow-up questions without treating patterns as proof of causation.
Purpose of exploratory analysis
, or EDA, examines a dataset with visualizations and numerical summaries before conclusions are drawn or a formal model is built. It helps reveal structure, patterns, relationships, and unusual observations, and helps formulate useful questions for further investigation.
Exploration should stay connected to a clear problem. A visible pattern can guide further questions, but it does not by itself establish an explanation or prove causation.
Choose a plot that fits the data
Choose a display that matches the types of variables and the question being asked:
Two numerical variables: Use a to look for trends, curved patterns, changes in spread, clusters, or isolated points.
A numerical variable across categories: Use side-by-side box plots or dot plots to compare typical values and variation between groups.
Values over time: Use a to look for trends, cycles, abrupt shifts, and gaps.
Several numerical variables: Use a scatterplot matrix for a quick view of pairwise patterns.
Interpret patterns with care
A of daily temperature and cold-drink sales might show sales tending to rise on warmer days. The points could also show unusually low-sales days or a change in the pattern during a particular season. These visible relationships are associations, not proof that temperature causes sales to rise; other factors may help explain the pattern.
Numerical summaries can support what a graph suggests. Compare group medians and ranges, or calculate a for two numerical variables when a roughly linear pattern is relevant. A single statistic can hide important features: may fail to describe a curved relationship, while group averages can conceal substantial overlap or variation.
Investigate unusual observations
An is an observation or pattern that differs noticeably from the rest of the data. A point far from the main cloud in a may be unusual in one variable or in relation to the relationship between the variables. Box plots and histograms can also flag values in the tails of a distribution.
Treat a flagged observation as something to investigate, not as an error to remove automatically. Check the original record, units, data-entry process, and relevant context. An unusual value might be a measurement or coding error, a rare but valid event, or evidence that the data contain distinct groups or follow a different pattern.
Turn patterns into questions
Use visible patterns to develop testable follow-up questions. For the temperature and sales example, questions could include:
Do sales generally rise with temperature, or does the pattern differ by season?
Are unusually low-sales days associated with store closures or missing records?
Does the relationship hold for every store, or is it driven by one location?
Does the spread in sales change as temperature rises?
State which variables and groups the question concerns, then decide what additional data, comparisons, or analyses could help answer it. Exploration is most useful when linked to a clear problem rather than becoming a search for patterns without context.