Introduction

Why Statistics?

Statistics is the science of learning from data. It gives you the tools to summarize data, quantify uncertainty, test hypotheses, and make predictions. Every field that works with data — from medicine to machine learning — depends on statistical reasoning.

  • Data science & ML — train/test splits, evaluation metrics, A/B testing, overfitting detection. Statistics is the foundation beneath every model.
  • Scientific research — clinical trials, psychology experiments, and physics measurements all rely on hypothesis testing and confidence intervals.
  • Business — conversion rate optimization, product analytics, forecasting, and pricing all use statistical methods daily.
  • Engineering — quality control, signal processing, reliability analysis.

The Python Statistics Stack

This course uses three complementary libraries:

  • statistics — Python's built-in module for basic descriptive stats (mean, median, mode, stdev). No dependencies needed.
  • NumPy — fast array operations, percentiles, random sampling, and correlation. The backbone of scientific Python.
  • SciPy — probability distributions, hypothesis tests (t-test, chi-square), standard error, and linear regression via scipy.stats.

What You Will Learn

This course contains 15 lessons organized into 4 chapters:

  1. Descriptive Statistics — Summarize datasets with mean, median, mode, variance, standard deviation, percentiles, and z-scores.
  2. Distributions — Model random phenomena with the normal and binomial distributions. Understand sampling, the Central Limit Theorem, and standard error.
  3. Inference — Draw conclusions from samples: one-sample and two-sample t-tests, confidence intervals, and chi-square goodness-of-fit.
  4. Regression — Measure relationships: Pearson correlation, linear regression, and bootstrap resampling for distribution-free inference.

In-Browser Runtime

All code runs live in your browser via Pyodide — CPython compiled to WebAssembly. NumPy and SciPy load automatically from your import statements.

Next →