Descriptive & Inferential Statistics
Part of the Data Science Roadmap
In short
You'll almost never have data on everyone. Statistics helps you describe the data you do have, then make careful claims about the people you didn't measure.
Descriptive statistics summarize a dataset (mean, variance, distribution shape); inferential statistics let you draw conclusions about a wider population from a sample — both used constantly in EDA and evaluation.

Think of it like this
Buying a crate of mangoes
At the fruit market you can't taste all 100 mangoes. You pick five, note how sweet and ripe they are, and decide about the whole crate. Describing your five is descriptive stats. Guessing about the crate is inferential stats.
Watch it happen
From five mangoes to the whole crate
1/5The population is everything you care about: all users, or the whole crate.
The big ideas
What you need to know
Centre: mean and median
The mean is pulled by extreme values. The median, the middle value, isn't. Report both when data is skewed.
Spread: standard deviation
How far values usually sit from the mean. Two groups can share a mean but differ wildly in spread.
Random samples matter
Inference only works if the sample fairly represents the population. Biased samples give confident wrong answers.
Intervals beat single numbers
A confidence interval shows a likely range for the true value, not just one guess.
See it in code
Walk through the code
1import numpy as np2from scipy import stats3 4sample = np.array([42, 55, 38, 61, 47, 52, 49, 58, 44, 50]) # minutes on app5 6print(sample.mean(), np.median(sample), sample.std(ddof=1))7 8ci = stats.t.interval(0.95, df=len(sample) - 1,9 loc=sample.mean(), scale=stats.sem(sample))10print(ci) # likely range for ALL users' average1/3Ten users' daily minutes on an app: our sample.
Line 6 describes the ten users you have. Lines 8 to 10 make a careful guess about every user.
Save yourself the pain
Common mistakes
Oops
Reporting only the mean for salaries or house prices.
Do this instead
Show the median too. A few very large values drag the mean far from a typical person.
Oops
Surveying only your college friends and claiming it's true for 'Indian students'.
Do this instead
Say who the sample represents, or collect a fairer sample before generalising.
Your mission
Describe and infer
Quick check
A sample of 10 users gives a 95% confidence interval of 46 to 53 minutes. What happens if you sample 1,000 users instead?
Go deeper
- 1Calculate mean, median, variance and standard deviation on a sample dataset by hand.
- 2Learn the difference between a population parameter and a sample statistic.
- 3Practice explaining why sample size affects how confident you can be in a conclusion.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.