Introduction to statistics for data science
Every model a data scientist builds rests on statistics. Before writing a single line of machine learning code, you need to know what statistics actually is, why it matters, and two ideas that everything else in this course depends on: population versus sample, and descriptive versus inferential statistics.
📄 Download Module 1 notes (PDF, free)Quick Answer: What Is Statistics?
Statistics is the practice of collecting, organizing, analyzing, and interpreting data so people can understand it and make decisions from it, instead of guessing. In data science, statistics does two jobs: it summarizes the data you already have (descriptive statistics), and it helps you draw honest conclusions about data you have not seen, based on a smaller sample (inferential statistics). Every module after this one builds on those two ideas.
Introduction to Statistics for Data Science: What Is Statistics, Really?
Strip away the formulas, and statistics is just a disciplined way to answer questions using data instead of opinion. Did this website redesign actually increase sign-ups, or did sign-ups just happen to go up that week? Is this new drug actually working, or would patients have improved anyway? Statistics gives you a structured process to answer questions like these honestly, including admitting when the data does not give you a clear answer.
Data science leans on statistics constantly, often without naming it directly. Every time a model's accuracy is reported, a confidence score is shown, or an A/B test declares a winner, statistics is doing the work behind the scenes.
Why Data Scientists Need Statistics
You can write Python code without knowing statistics. You cannot trust the results of that code without it. A model can report 95% accuracy and still be useless if the underlying data was biased, or if that number was a coincidence of one lucky test split. Statistics is what lets a data scientist tell the difference between a real signal and random noise, which is exactly what the later modules in this pillar, hypothesis testing, confidence intervals, and A/B testing, are built to do.
A data scientist without statistics can build a model. A data scientist with statistics knows whether to trust it.
Population vs Sample
A population is every member of the group you actually want to understand, for example, every customer who has ever used an app. A sample is a smaller, manageable subset of that population, chosen carefully so it represents the whole group well enough to draw conclusions from, without needing to measure every single person.
Almost nothing in data science works with a full population. You cannot survey every customer or track every website visitor forever. Instead, you take a sample, and statistics is the toolkit that lets you trust conclusions drawn from that smaller group.
A Worked Example: Population vs Sample in Practice
Imagine a mobile app with 2 million registered users, your population. You want to know the average number of minutes users spend in the app per day. Measuring all 2 million users every day is not realistic, so instead you take a random sample of 5,000 active users and measure their usage for a week.
Suppose that sample shows an average of 14.2 minutes per day. Descriptive statistics describes that number for your 5,000-user sample. Inferential statistics is what lets you say, with a calculated margin of error, that the true average across all 2 million users is likely close to 14.2 minutes too, without ever measuring them directly.
A sample of 5,000 users, chosen randomly, gives a far more reliable estimate than a sample of 20 users, even though both are technically samples. Module 7 on sampling methods and the Central Limit Theorem explains exactly why sample size changes how much you can trust the result.
# average, then pulled a random sample of 500 to see how close
# the sample estimate lands, before publishing this module.
Population mean: 50.015
Sample mean (n=500): 49.748
Difference: 0.267
Descriptive vs Inferential Statistics
These are the two branches of statistics you will use in almost every project, and this course is organized around exactly this split.
| Descriptive Statistics | Inferential Statistics |
|---|---|
| Summarizes the data you already have | Draws conclusions about data you have not seen |
| Uses mean, median, standard deviation | Uses hypothesis tests, confidence intervals |
| No uncertainty involved | Always involves a margin of uncertainty |
| Answers: what happened in this dataset? | Answers: what is likely true beyond this dataset? |
Modules 2 through 5 build your descriptive statistics toolkit. Modules 6 through 15 build your inferential statistics toolkit, ending in A/B testing, the most commonly used inferential method in industry.
Common Mistakes Beginners Make
These are the mix-ups that trip up most people learning statistics for the first time, worth watching for as you move through the rest of this pillar.
- Treating a small, convenient sample (like the first 20 rows of a spreadsheet) as if it represents the whole population.
- Assuming descriptive statistics alone prove something is true, when they only describe the data you already collected.
- Confusing correlation with causation, a distinction covered in full detail in Module 13.
- Skipping straight to machine learning models without checking whether the underlying data or sample was collected in a biased way.
Practice Check
Before moving to Module 2, try answering this without scrolling back up.
A university has 40,000 enrolled students. A researcher surveys 500 randomly chosen students about their study habits. Which group is the population, and which is the sample? Is the researcher using descriptive or inferential statistics if they then estimate study habits for all 40,000 students based on that survey?
Answer: the 40,000 enrolled students are the population. The 500 surveyed students are the sample. Estimating study habits for all 40,000 students based on the smaller survey is inferential statistics, since it draws a conclusion about data beyond what was directly measured.
Frequently Asked Questions
What is statistics in simple words?
Statistics is the practice of collecting, organizing, analyzing, and interpreting data so that people can understand it and make decisions from it, rather than guessing.
What is the difference between a population and a sample?
A population is every member of the group you want to study. A sample is a smaller subset of that population, chosen so it represents the whole group closely enough to draw conclusions from without measuring everyone.
What is the difference between descriptive and inferential statistics?
Descriptive statistics summarize data you already have, using tools like mean, median, and standard deviation. Inferential statistics use a sample to make predictions or draw conclusions about a larger population.
Why do data scientists need statistics?
Statistics gives data scientists a way to check whether a pattern in data is real or just random noise, and to quantify how confident a prediction or model result actually is.
Is statistics the same as data analysis?
They overlap but are not identical. Data analysis is the broader practice of examining data to find insights, which may use statistics, visualization, and domain knowledge together. Statistics is one specific, mathematically rigorous toolset within that broader practice.
Can I learn statistics without a math degree?
Yes. Most working data scientists learned applied statistics through practice on real datasets rather than a formal math degree. Understanding what a method does and when to use it matters more than deriving formulas from scratch.
References
Next: Descriptive Statistics: Mean, Median, and Mode
Start building your descriptive statistics toolkit, and see where each measure quietly misleads you.
Start Module 2 →Khalid Hussain
Founder of Review Publically. MSc holder and Google Advanced Data Analytics certified. Teaches Python and SQL data analysis with a focus on current, correct, production-ready code rather than outdated conventions. Verifies every formula in this pillar against a real Python calculation before publishing.
Related Reading