Statistics for Data Analysis
Topic 4 of 14 · In Data Analysis · September 8, 2026
The statistics analysts actually use: averages that don't lie, spread, distributions, correlation, and thinking about chance.
Overview
Statistics sounds intimidating, but a Data Analyst uses a surprisingly small, practical slice of it. Statistics is really the science of making sense of numbers when there is variability — and almost all real data varies.
The payoff of this topic is huge: you will stop reporting a single average as if it told the whole story, you will know whether a difference you see in a report is real or just luck, and you will finally understand why "correlation is not causation" is the most repeated warning in the field. Everything here stays at the level a working analyst needs — no proofs, no calculus.
Before You Start
- Complete the Basics topic and have your spreadsheet or notebook ready with the delivery dataset you will reuse (orders with delivery minutes and a partner flag).
- Be able to compute mean, median and standard deviation in your tool of choice before starting.
- Re-read the outlier discussion from the Data Cleaning topic so detect-investigate-decide is fresh in your mind.
- Have the Excel correlation function (or pandas correlation in Python) ready for the correlation exercise.
- Bring the vocabulary from Basics: you should be able to name a measure and a dimension without looking them up.
Learning Objectives
- Use mean, median and mode — and know when each one misleads
- Measure spread with range, variance and standard deviation
- Read percentiles, quartiles and the interquartile range (IQR)
- Understand what a distribution is, including the normal distribution and skew
- Explain sampling and sampling bias, and why sample ≠ population
- Detect and decide what to do about outliers
- Interpret correlation correctly and distinguish it from causation
- Grasp hypothesis testing: null/alternative, p-value, significance
- Tell statistical significance from practical significance
- Apply these ideas to a real dataset and make defensible claims
Prerequisites
Basics (data types, metrics, data quality) and comfortable arithmetic. No math background needed — you will compute everything in Excel or Python anyway.
Why Statistics Matters
Every dataset is a sample — a subset — of a bigger reality (a population). One month of orders is a sample of all months; 200 surveyed users are a sample of all users. Statistics answers two questions analysts ask constantly: "What is the truth, roughly?" (descriptive stats) and "Is this difference real or just luck?" (inference). Without this lens, a report that compares two averages can confidently state a false conclusion — because the difference was noise.
Measures of Center: Mean, Median, Mode
Mean = sum ÷ count (the average). Median = the middle value when sorted. Mode = the most frequent value.
The trick is skew: a few huge values (a mansion in house-price data) pull the mean up while the median stays undisturbed. Example: five salaries — 100, 110, 120, 130, 1,000. Mean = 292 (misleading), median = 120 (honest). Analysts report median for income, house prices, session lengths — anything with outliers. Click AVERAGE in Excel for a clean symmetric spread; click MEDIAN when big values can yank the story sideways.
Measures of Spread: Range, Variance, Standard Deviation
Center tells you where the middle is; spread tells you how squashed or scattered the values are.
- Range = max − min (fragile — one outlier blows it up)
- Variance = average squared distance from the mean
- Standard deviation (SD) = sqrt(variance) — spread in the data's own units
Low SD = values huddle near the mean (consistent delivery times); high SD = values swing widely (unpredictable). For a normal distribution about 68% of values sit within ±1 SD and 95% within ±2 SD. Comparing two groups with the same average but very different SDs tells you which is stable and which is wild.
Percentiles, Quartiles and the IQR
Percentiles mark the sorted data cut-offs: the 25th percentile (Q1), the 50th (median, Q2) and the 75th (Q3) split the data into quarters. The Interquartile Range (IQR) = Q3 − Q1 = the middle 50% band.
IQR is the professional's outlier detector: values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are classic outliers. Two practical uses: report "the middle 50% of orders were $25–$60" (a far truer picture than an average), and flag suspicious records before analysis.
Distributions: The Shape of Your Data
A distribution is just a histogram of where the values fall. The famous normal distribution (bell curve) shows up when many small factors add up: heights, measurement errors, long-run averages. Its shape lets you estimate how common extreme values are.
Real business data is often skewed instead: revenue, order amounts and salaries pile up near the low end with a long right tail (right-skewed) — the same reason medians beat means. Recognizing skew immediately tells you which summary and which chart will be honest, and whether a log/normalized transform might improve your analysis.
Sampling and Sampling Bias
Analyzing a whole population is often expensive or impossible, so analysts work on samples. A sample is only useful if it fairly represents the population — that is the crux of sampling bias.
Classic bias traps: surveying only app users for a product used on desktop and mobile; judging satisfaction only from complaints (angry people self-select); A/B tests that include only power users. Whenever you hear "based on N surveys", ask how were these people chosen? A biased sample produces confident garbage no matter how clean the analysis is.
Correlation (and Why It Is Not Causation)
Correlation (r, from -1 to +1) measures whether two variables move together. Ice-cream sales and drowning accidents correlate strongly in summer — one does not cause the other; a third force (warm weather) drives both.
Correlation ≠ causation because a relationship could be coincidence, due to a lurking variable, or even reversed. To prove cause you need experiments (A/B tests, controlled trials) or very strong domain logic. A good analyst reports associations honestly and labels causal claims only when the evidence truly supports them.
Outliers
Outliers are extreme values that sit far outside the pack. They are not automatically errors — a whale account ordering 1,000 units is real, valuable data.
Analyst protocol: detect → investigate → decide. Detect with IQR or z-scores; investigate whether it's an error, a data-entry bug, or a genuine event; then decide — flag it, exclude it (documenting why), cap it, or keep it split for a separate analysis. Never silently delete; never let one absurd row pull your whole average.
Hypothesis Testing: Significance in One Page
When a report says a change is statistically significant, it means the observed difference is unlikely to be pure chance.
- Null hypothesis (H₀): nothing is happening — the new button converts the same as the old (difference = 0)
- Alternative hypothesis (H₁): a real effect exists
- Test statistic + p-value: a p-value is the probability of seeing results at least this extreme if H₀ were true. p < 0.05 is the common "unlikely to be luck" line
Two caveats that matter daily: a small p-value doesn't mean a large effect (statistical ≠ practical significance), and a large dataset will flag even trivial differences as significant. Analysts always report the size of the effect, not just its p-value. Confidence intervals show the range the true value likely sits in — "conversion lifted 0.4% (±0.3%)" — and are the more honest cousin of a single point estimate.
Hands-On Practice
Use a real dataset (house prices, salaries, deliveries — anything with outliers).
- Compute mean, median, mode and SD; decide which to report and why.
- Find quartiles and IQR; flag every IQR-based outlier and classify each as error vs genuine.
- Draw the histogram; describe skew and what it means for the average.
- Pick two numeric columns; compute correlation in Excel (
=CORREL); write two plausible non-causal explanations. - Split your data into two groups (e.g. regions); compare means + SDs and judge if the difference looks real or within noise.
Deeper Worked Examples
Is the new delivery partner actually faster?
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
When an 8% lift might be noise
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Common Mistakes
- Reporting the mean on skewed data as if it were the center
- Ignoring standard deviation — identical averages can have opposite stories
- Treating correlation as proof of cause
- Analyzing a biased sample then generalizing to everyone
- Deleting outliers without documenting the reason
- Calling a trivial effect 'significant' because the dataset is huge
- Assuming normal distribution for revenue/income data (usually skewed)
Real-World Usage
Interviewers probe statistics basics because the cost of misuse is high: a manager who chases a "7% lift" that is actually noise spends budget on nothing. In daily work you will use medians and SDs for summaries, IQR to police data quality, distributions to choose charts and transforms, and significance/effect-size reasoning whenever someone compares two periods or two groups. Every data story you tell later rests on these numbers being honest.
Mini Project
Business problem: The delivery team claims the new last-mile partner made orders faster. The analyst must check this with statistics before the company signs a contract.
Dataset: any order-delivery log with delivery minutes and the partner flag (60–90+ orders across the two partners). Create one if needed.
Objective: an evidence-based verdict — is the new partner faster, similar, or within noise?
Task 1
Task 2
Task 3
Task 4
Task 5
| Deliverable | Proves |
|---|---|
| Per-partner summary table | Mean/median/SD + IQR |
| Outlier investigation | Error vs genuine handling |
| Effect-size statement | Statistical vs practical significance |
| Confidence interval | Honest uncertainty |
| Plain verdict | Analyst communication |
Key Takeaways
- Samples represent populations; bad samples create biased, confident lies
- Median beats mean under skew; SD tells you how scattery the data is
- Quartiles + IQR give a robust picture of spread and detect outliers
- Distributions (normal vs skewed) decide your summary stats and charts
- Outliers: detect → investigate → decide, and document every choice
- Correlation measures co-movement, not cause
- Significance answers 'likely luck?'; effect size answers 'worth acting on?'
Key Terms & Glossary
| Term | Meaning |
|---|---|
| mean | The arithmetic average, sum divided by count, which is easily dragged upward by a few huge values. |
| median | The middle value of the sorted data, and the honest centre for skewed distributions such as income or order amounts. |
| standard deviation | A measure of spread in the data's own units, telling you whether values huddle near the mean or swing widely. |
| interquartile range | The middle 50% band of the data, Q3 minus Q1, used to describe typical spread and to drive the 1.5-times-IQR outlier rule. |
| p-value | The probability of seeing a result at least this extreme if the null hypothesis were true; a small p-value means the result is unlikely to be sheer luck. |
| correlation | A number from -1 to +1 measuring whether two variables move together — a measure of co-movement, never a proof of cause. |
Learning Resources
StatQuest with Josh Starmer
The clearest statistics videos on the internet — mean, SD, p-values, correlation and more.
OpenIntro Statistics (Free Textbook)
A full, free introductory statistics textbook with exercises and datasets.
Khan Academy: Statistics and Probability
Free structured video course from distributions to hypothesis testing.
Scribbr — Descriptive Statistics
A friendly, example-driven reference on mean/median/mode, spread and percentiles.
Statistics by Jim
Intuitive, no-calculus explanations of skew, outliers, correlation and significance.
Seeing Theory
Interactive visuals that make distributions, probability and inference click.
Chapter Quiz
Chapter Quiz — Statistics for Data Analysis
Averages that don't lie, spread, distributions, correlation and chance — the statistics an analyst actually uses.
Question 1 of 5
For income data, which measure of center should you headline?
Knowledge Check
End-of-Topic Exam
Hint: One region dominates the total.
Model answer: The mean is the sum 1,460 divided by 5, which is 292; the median is the middle sorted value, 120. Report the median as the typical figure: revenue is right-skewed, so the giant region pulls the mean to 292 while 120 reflects a normal region. The mean still matters for the total pot, but a typical-region claim must use the median.
Hint: The fences sit at Q1 minus 1.5 times the IQR and Q3 plus 1.5 times the IQR.
Model answer: Q1 is 4.5 and Q3 is 9.5, so the IQR is 5. The lower fence is 4.5 minus 7.5, which is negative 3; the upper fence is 9.5 plus 7.5, which is 17. Only 34 lies beyond a fence, so exactly 34 is flagged as an outlier.
Hint: Temperature drives both — one hidden force.
Model answer: Correlation measures co-movement, not causation, and a third variable can drive both measures. The lurking variable is hot, sunny July weather, which increases both snow-cone buying and the time in the sun that produces sunburn. A controlled experiment or very strong domain logic would be needed before claiming a causal link.
Hint: Separate statistical significance from practical effect size.
Model answer: For test A: the lift is statistical, meaning it is unlikely to be luck, but it is practically tiny — 0.2% on that traffic may not pay for the rollout, so report the size, not just the p-value. For test B: the 2.0% gap looks large but the tiny sample cannot rule out noise, so the honest message is 'promising direction, not yet proven' — run it longer or on more traffic before spending money.