Statistics for data science with Python, simulation first

Understand distributions, uncertainty, confidence intervals, hypothesis tests, A/B tests and regression by simulating them in Python

7 ratings 2,140 students Sample

Created by Kwame Mensah

  • Updated September 2026
  • English
  • Intermediate

What you will learn

  • Summarise data with appropriate measures of centre and spread
  • Simulate random processes to build intuition for probability and sampling
  • Calculate and interpret confidence intervals, including with the bootstrap
  • Run and correctly interpret hypothesis tests and p values
  • Design an A/B test with a sample size calculation and analyse the result
  • Fit and interpret linear regression models with statsmodels

Course content

5 sections, 24 lessons, 4h 9m total

Thinking with data and randomness 5 lessons · 51 min
  • Video: Why statistics, and why simulate Preview 8 min
  • Article: Describing data: centre, spread and shape Preview 12 min
  • Article: Probability and common distributions 13 min
  • Article: Sampling and the central limit theorem 13 min
  • Quiz: Check your understanding 5 min
Estimation and confidence intervals 4 lessons · 43 min
  • Video: Confidence intervals by simulation 12 min
  • Video: Intervals with formulas and the t distribution 11 min
  • Video: The bootstrap 12 min
  • Article: Reporting uncertainty clearly 8 min
Hypothesis testing 5 lessons · 52 min
  • Video: The logic of a hypothesis test 11 min
  • Video: p values and what they do not mean 11 min
  • Video: t tests, chi square and friends 12 min
  • Video: Effect sizes and practical significance 9 min
  • Video: Multiple comparisons and p hacking 9 min
A/B testing in practice 4 lessons · 43 min
  • Video: Designing an experiment 11 min
  • Video: Sample size and statistical power 12 min
  • Video: Analysing results and peeking 11 min
  • Article: Common pitfalls in experiments 9 min
Relationships and regression 6 lessons · 1h
  • Video: Correlation and its limits 10 min
  • Video: Simple linear regression 12 min
  • Video: Multiple regression and confounding 12 min
  • Video: Checking regression assumptions 10 min
  • Video: Logistic regression for yes or no outcomes 11 min
  • Quiz: Final check 5 min

Requirements

  • Basic Python and pandas
  • School level algebra

Description

Statistics is how data science deals with uncertainty. Is a new checkout design really better, or did we get lucky? How sure are we about an average from 200 survey responses? Is the relationship in this chart real, or noise? Without statistics, data work produces confident numbers that may be wrong.

Many people find statistics hard because it is taught as a list of formulas. This course takes a different route: we simulate first. Using Python, we generate data, repeat experiments thousands of times and watch what happens. Once you have seen a sampling distribution form on your screen, the formulas become summaries of something you already understand.

What you will learn

  • Describing data honestly: centre, spread, shape and outliers
  • Probability and the distributions that appear most often
  • Sampling, the central limit theorem and standard errors
  • Confidence intervals by simulation and by formula, including the bootstrap
  • Hypothesis testing and p values, and their common misuses
  • Designing and analysing A/B tests, including sample size and power
  • Correlation, simple and multiple linear regression
  • Communicating uncertainty to people who want a single number

Tools

We use NumPy, pandas, SciPy and statsmodels, with matplotlib for charts. Every lesson has a notebook.

You should be comfortable with basic Python and pandas. School algebra is enough for the maths; we explain each formula in words before writing it down.

Who this course is for

  • Data analysts who want firmer statistical foundations
  • Data scientists who learned tools before theory
  • Product managers and engineers who run experiments

Instructor

Kwame Mensah

Statistician and ML engineer teaching statistics and how to ship models responsibly

  • 4.4 instructor rating
  • 14 reviews
  • 3,860 students
  • 2 courses
  • Sample

I trained as a statistician and now work on machine learning systems, from experiment design to keeping models healthy after deployment. I spend a lot of time explaining uncertainty to people who would prefer a single number.

My courses focus on intuition first. We simulate things in Python before we use a formula, so the formula has something to stand on. Then we look at the tools teams actually use, such as scikit-learn, MLflow and FastAPI.

I want my students to be the person on the team who asks how big the sample was and how the model will be monitored.

View profile

Student reviews

4.4 7 ratings
5 star 57%
4 star 29%
3 star 14%
2 star 0%
1 star 0%
Lina M. Sep 29, 2026
Sample

Best intro to p values

The lesson on what p values do not mean should be required reading for anyone presenting data.

Alice V. Sep 10, 2026
Sample

Simulation made it click

I took statistics at university and forgot it. Seeing sampling distributions form in a notebook finally made it make sense.

Mohammed A. Aug 9, 2026
Sample

A/B testing section is excellent

The peeking simulation convinced my whole team to stop checking experiments daily.

Elena G. Jul 1, 2026
Sample

Clear and honest

Kwame is careful about what methods can and cannot tell you. I wanted a little more on Bayesian approaches.

Tom L. May 23, 2026
Sample

Standard error versus deviation

Such a common confusion, explained once and for all. The bootstrap lesson was a bonus.

Priyanka S. Apr 3, 2026
Sample

Great for product people

As a product manager I followed most of it. The regression section was the hardest but worth it.

Nathan B. Jan 24, 2026
Sample

Heavy on notebooks

Content is strong, but I would have liked more slides or diagrams between the notebook sessions.

$54.99 Enroll now
SampleSample catalog: the instructors, courses, reviews and stats on this site are demo content.