Purpose of EDA: Find Patterns and Counterexamples
Learning objective: use EDA to generate/check questions, not to prove a preselected story.
Your manager looks at a survey summary and says, "Group B clearly did worse - let's report that to the committee." Before you nod along, this is exactly where exploratory data analysis (EDA) belongs: EDA does not exist to prove a story your manager already believes. It exists to generate questions, look for evidence that supports a pattern, and just as actively look for counterexamples that would overturn it.
Search for supporting evidence
Pull only the handful of numbers that match "Group B did worse," turn them into one chart, and stop there.
Use EDA to generate and check questions
- Generate a question
- How large is this difference across the whole dataset? Is it consistent across subgroups, or driven by a few observations?
- Look for counterexamples
- Is there any stratum or subgroup where the result runs opposite to the overall pattern?
- Check data quality
- Could this pattern actually come from missing values, incomplete responses, or an uneven sampling stratum?
import pandas as pd
# clean: a survey + outcomes dataset, one row per observation
df = pd.read_csv("DS104_Survey_Outcomes_Clean.csv")
df.shape
df.head()
df["group"].value_counts()
# The manager's claim: Group B has a lower outcome. Look at the whole picture, not one chart
df.groupby("group")["outcome"].mean()| Prove-it framing | EDA framing |
|---|---|
| "Prove that Group B is worse." | "How large is the mean outcome gap between Group B and Group A? Does it hold within every age_band and every sampling_stratum?" |
| "Find a chart that supports this conclusion." | "Is there any subgroup where the result runs opposite to the overall pattern? If so, why?" |
Overall, Group B's mean outcome really is 6 points lower than Group A's, which looks like it supports the manager's claim. But once you check by age_band, the gap turns out to be almost entirely concentrated in the youngest stratum; in the other three age bands, Group A and Group B have nearly identical means. Looking only at the overall number hides the key question of whose difference this actually is, and that is exactly the kind of counterexample EDA is meant to surface.
- Write down the question you want to answer before you start charting or computing statistics, so the question does not quietly shift mid-analysis
- For any "A is better/worse than B" claim, recheck it with at least one different cut (stratum, age band, completion status)
- Actively look for a subgroup that runs opposite to the overall pattern, and note what share of the data it represents
- Keep "what the data shows" separate from "whether the data quality supports this claim"
Warning
Info
Your manager has already decided "Group B performs worse" and asks you to build a chart that supports it. Which approach best matches the purpose of EDA?