, ,

Exploratory Data Analysis: Finding the Story in Your Data (Data Analyst Series, Part 10)

Exploratory data analysis is the poke-around phase where a clean table turns into a story. Learn to summarise, read distributions, spot outliers and find relationships before you report anything.

Data Analyst Series · Part 10 of 22

Your cleaned orders table has 1,000 rows and eight columns, and someone drops by your desk to ask what is going on with our customers. That question has no answer yet, only a table. The work of turning that grid of numbers into a sentence you can say out loud, a finding with a shape and a cause, is exploratory data analysis, and it is the part of the job that first feels like detective work rather than data entry.

Exploratory data analysis, EDA for short, is the poke-around phase. Before you test any theory or build any dashboard, you get to know the data: what each column contains, how its values are spread, where the surprises hide, and which columns move together. You are not proving anything yet. You are looking for the questions worth asking. This part gives you a small, repeatable set of moves to do that on any table, using the clean data you produced in Part 9.

Key takeaways

EDA has three moves you repeat: summarise one column with a few numbers, look at its distribution as a picture, then compare columns to find relationships.

The median and the five number summary describe skewed data more honestly than the mean, because they are resistant to a handful of extreme values.

The goal is not a chart. The goal is a question worth testing next. EDA ends when you can say, in one plain sentence, what the data seems to be doing.

Who this is for: You have a clean table, the output of Part 9, and you can write a SELECT with GROUP BY from Part 8. No new tool is needed here; EDA is a way of looking, not a piece of software. If you can read a table and a bar chart, you can follow every step. The charts below are read, not built; the plotting itself comes in Parts 15 and 16.

What EDA is and why it comes first

The statistician John Tukey gave this work its name in his 1977 book Exploratory Data Analysis. His argument was simple and still holds: before you run a test to confirm a hunch, you should spend real time just looking, because the data will tell you things you did not think to ask. Confirmatory analysis answers a question you already have. Exploratory analysis finds the question. Skip it and you risk testing the wrong thing precisely, which is a fast way to be confidently wrong.

In practical terms, EDA is a loop of small questions. What does one column look like on its own? Is it bunched up or spread out? Are there values that do not belong? Do two columns rise and fall together? Each answer suggests the next question, and after a few rounds you have a description of the data in plain language: most customers spend a little, a few spend a lot, and the ones who visit more tend to spend more. That description is the story, and everything downstream, the metrics, the tests, the dashboard, is built on it.

Start with one column at a time

The first move is always univariate, a fancy word for one column at a time. Pick a column that matters, say customer spend, and describe it with a handful of numbers before you draw anything. Every spreadsheet and every analysis language has a one-line command for this. In pandas the method is describe, and it returns the same set of numbers statisticians have leaned on for a century: the count of real values, the mean, the standard deviation, the smallest and largest values, and the 25th, 50th and 75th percentiles. Those numbers fit in a small table, and that table is often enough to see the shape of a column.

Here is that summary for the spend column of our 1,000-customer table. Read it slowly, because each number earns its place. The count of 1,000 confirms no values are missing after cleaning. The mean sits above the median, our first hint of skew. The gap between the 25th and 75th percentiles, called the interquartile range, tells you where the middle half of customers live.

StatisticValue (spend, in rupees)What it tells you
count1,000No missing values remain
mean1,080The average, pulled up by big spenders
std620Typical distance from the mean, a spread
min0The smallest real value
25% (Q1)620A quarter of customers spend less than this
50% (median)980The middle customer
75% (Q3)1,400Three quarters spend less than this
max4,200The largest value, worth a second look

The describe summary for the spend column. Mean above median plus a max far above Q3 is the signature of a right-skewed, long-tailed distribution.

How do you read a distribution?

Numbers hint at the shape, but a picture confirms it. A distribution is simply how often each range of values occurs, and the chart that shows it is a histogram: bars whose height is the count of rows falling into each bucket. The histogram below buckets spend into bands of 500 rupees. One look tells you what the summary only suggested. Most customers cluster in the low bands, and a thin tail stretches to the right where a few big spenders live. This is a right-skewed distribution, and it is the most common shape you will meet in business data, from spend to session length to order size.

How customer spend is distributedCount of customers in each 500-rupee band.01002003002100 to 500330500 to 1k2501k to 1.5k1201.5k to 2k552k to 2.5k352.5k plusThe long right tail is why the mean (1,080) sits above the median (980).
A histogram makes skew obvious. The bulk of customers sit on the left; the tail on the right drags the average up.

Three things describe any distribution, and you should name all three every time. Its centre, where the typical value sits, given by the median or the mean. Its spread, how far values reach from that centre, given by the standard deviation or the interquartile range. And its shape, whether it is symmetric, skewed to one side, or has more than one peak. For our spend column the centre is around 980, the middle half spans 620 to 1,400, and the shape leans hard to the right.

My take

When a distribution is skewed, report the median, not the mean, and say so. If your report claims the average customer spends 1,080 rupees, a reader pictures a typical person spending that much, but most spend far less; the average is inflated by a handful of whales. The median, 980, is the honest headline. I lead with the median for any money or count column and mention the mean only when someone asks.

Spot outliers with the IQR rule

An outlier is a value that sits far from the rest. Some are errors, like the spend of minus 50 you removed in Part 9. Others are real and important, like the customer who spent 4,200 when almost everyone else spent under 2,000. You need a rule to flag them consistently, not a gut feeling, and Tukey gave us one that needs only the five number summary: minimum, first quartile, median, third quartile, maximum. Take the interquartile range, Q3 minus Q1, then treat any value more than 1.5 times that range beyond the quartiles as an outlier worth inspecting.

For our spend column the arithmetic is quick. Q1 is 620 and Q3 is 1,400, so the interquartile range is 780. Multiply by 1.5 to get 1,170, and add it to Q3: any spend above 2,570 is flagged. The chart that draws this rule is the box plot, and it packs the whole five number summary plus the outliers into one small picture. The box holds the middle half, the line inside is the median, the whiskers reach to the last value inside the fence, and the dots beyond are the flagged outliers.

Where the outliers beginA box plot of spend, with the 1.5 times IQR fence drawn.01,0002,0003,0004,000Q1 620median 980Q3 1,400fence 2,570outliers
The box is the middle half, the line is the median, and the three red dots are customers the IQR rule flags for a closer look.
Worked example: A colleague reports the average order value jumped from 900 to 1,300 overnight and asks if a campaign worked. Before celebrating, you profile the day. The median barely moved, from 880 to 900, but three orders of 40,000 landed from one wholesale buyer. The IQR rule flags all three as outliers. The campaign did nothing; one bulk customer moved the mean. Reporting the median would have caught it, and the real story, a new wholesale account, is more useful than a fake win.

Relationships between two columns

Once you understand columns on their own, the interesting questions are about pairs. Do customers who visit more often spend more? The move here is bivariate, two columns at once, and the picture is the scatter plot: one dot per customer, placed by visits along the bottom and spend up the side. If the dots drift up to the right, the two rise together, a positive relationship. If they scatter with no pattern, the columns are unrelated. The plot below shows visits against spend for a sample of customers, and the upward drift is clear.

Do more visits mean more spend?Each dot is one customer: visits across, spend up.01,0002,0003,0004,000visits per month21018the dashed line is the upward trend
A scatter plot answers a two-column question at a glance. Here more visits go with more spend, a positive relationship worth investigating.

A word of caution before you get excited. A relationship you see in a scatter plot is a correlation, not proof that one column causes the other. More visits going with more spend could mean visits drive spend, or that your keenest customers both visit and spend for the same underlying reason. EDA is where you notice the pattern; deciding whether one thing causes another is a separate, harder job that Part 12 takes on directly. For now, note the relationship, resist the urge to explain it, and let it become a question you test properly later.

Category columns and their counts

Not every column is a number. Fields like city, plan type or signup channel are categorical, and you read them a different way. Instead of a mean or a median, you count how often each value appears, a frequency count, written as value_counts in pandas or a GROUP BY with COUNT in SQL, the same grouping you learned in Part 8. The output ranks the categories from most common to least, and that ranking is the story: which city sends the most customers, which plan dominates, which channel barely registers.

Two numbers make sense of a category column. Its cardinality, the count of distinct values, tells you whether you have a handful of clean categories or hundreds of messy ones that still need the standardising from Part 9. And the share held by the top value tells you how lopsided the column is. If one city holds 80 percent of customers, a chart split by city will be dull and a one-line note will do. If the split is close to even, it is worth a bar chart and a second look. Rank the values, check how concentrated they are, and you have read the column.

The loop that finds the story

EDA is not a checklist you run once; it is a loop you spin until the surprises stop. You ask a small question, answer it with a number or a chart, notice something you did not expect, and that oddity becomes your next question. The customer table starts as a vague what is going on and ends, after a few turns, as a clear sentence: spend is right-skewed, a wholesale account drives the tail, and frequent visitors spend more. Each turn is cheap; the value is in doing several. The diagram below is the rhythm I follow on every new dataset.

flowchart TD
  A[Ask a small question] --> B[Summarise the numbers]
  B --> C[Draw one chart]
  C --> D[Notice something odd]
  D --> E{New question?}
  E -->|Yes| A
  E -->|No| F[Write the finding in one sentence]
The EDA loop. You keep circling until a chart stops surprising you, then you write down what the data is doing.

Two habits keep the loop honest. First, write down each finding as you go, in plain words, so the story is captured and not just felt. Second, resist forcing a conclusion; if a chart shows no pattern, that is a real finding too, and reporting a clean null result is better than inventing a trend to please the room. The table below sketches the three question types you cycle through and the tool each one uses, so you always know which move comes next.

Question typeWhat you look atNumbers to runChart to read
One columnCentre, spread, shapedescribe, median, IQRHistogram, box plot
Odd valuesOutliers, impossible entriesmin, max, 1.5 times IQRBox plot
Two columnsDo they move togetherGroup averages, correlationScatter plot

The three EDA moves, the numbers behind each, and the chart that shows them. Cycle through these until the data stops surprising you.

Summarise before you chart

If you take one habit from this part, make it this: run the numbers before you draw the picture. A one-line summary, count, mean, median, min, max and the quartiles, takes seconds and tells you the centre, the spread and the first sign of skew or bad values. Only then draw the chart, and use it to confirm what the numbers hinted rather than to go fishing. Analysts who jump straight to plotting waste time making pretty charts of data they do not yet understand, and they miss the skew that a glance at mean versus median would have caught. Summary first, picture second, story last.

You can now take any clean column and describe it honestly: its centre with the median, its spread with the interquartile range, its outliers with the 1.5 times IQR rule, and its link to another column with a scatter plot. That is the working core of exploratory analysis, and it is the ground the rest of the series builds on. Part 11 turns to the statistics an analyst actually uses day to day, giving the intuitions behind the mean, the median and the spread a firmer footing. Keep the Data Analyst guide open as your map, and glance back at Part 9 whenever your data still looks messier than it should.

This week, take one clean table and run the three moves on a single column: summarise it, draw its histogram in your head from the numbers, and flag its outliers with the IQR rule. Write the one sentence it tells you. Do that on three columns and you will have your first real story from data.

Data Analyst Series · Part 10 of 22
« Previous: Part 9  |  Guide  |  Next: Part 11 »

References

About The Author


Discover more from Journal of Intelligent Infrastructure – By Dr Pranay Jha

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure - By Dr Pranay Jha

Subscribe now to keep reading and get access to the full archive.

Continue reading