Probability & Statistical Inference
Model uncertainty with random variables and distributions, then estimate, test and update beliefs from data, with Python simulations you run in the browser.
Leads to: Data Scientist, Machine Learning Engineer, Biochemist, Chemist, Materials Scientist, Statistician, Actuary, Operations Research Analyst
Before you start
This course builds on Statistics Fundamentals and Python Fundamentals. Take them first if you are new to the topic.
About this course
An intermediate course for data, science, actuarial and operations research careers. You will compute expectation and variance, model counts and waiting times with the binomial, Poisson, exponential, normal and gamma distributions, and see the law of large numbers and the central limit theorem at work by simulation. You will answer probability questions with Monte Carlo simulation and bootstrap confidence intervals, find maximum-likelihood estimates, choose and run t-tests and chi-square tests, plan studies with power and control false discoveries across many tests. The last module turns to Bayesian thinking: Bayes' rule, beta-binomial posteriors and A/B tests, and sampling a posterior with the Metropolis algorithm. Prerequisites: Statistics Fundamentals and Python Fundamentals. Every lesson has a Python exercise; some use NumPy, which runs in the browser.
Course content
Module 1
Probability Models
3 lessons · 2h 2mRandom variables, expectation and variance, and the discrete and continuous distributions (binomial, Poisson, exponential, normal, gamma) that model real counts and waiting times.
- 32mRandom variablesReading
Describe an uncertain quantity with a random variable and compute its expected value and variance.
- 42mDiscrete distributionsReading
Model counts of successes with the binomial distribution and counts of events in an interval with the Poisson distribution.
- 48mContinuous distributionsReading
Use densities and CDFs to work with exponential, normal and gamma distributions for measurements and waiting times.
Module 2
Limit Theorems and Simulation
3 lessons · 2h 53mWhy averages settle down (law of large numbers) and become normal (central limit theorem), and how to answer probability questions by simulation and the bootstrap.
- 59mLLN and CLTReading
See by simulation why sample means converge to the true mean and why their distribution becomes normal.
- 1h 13mMonte Carlo simulationReading
Estimate a probability by simulating a random process many times and report how accurate the estimate is.
- 41mThe bootstrapReading
Build a percentile bootstrap confidence interval for a median or mean by resampling your data.
Module 3
Inference
3 lessons · 2h 10mEstimating parameters by maximum likelihood, choosing and running t-tests and chi-square tests, and planning studies with power while controlling errors across many tests.
- 49mEstimation and MLEReading
Write a log-likelihood and find the maximum-likelihood estimate of a parameter, numerically and in closed form.
- 35mt-tests and chi-squareReading
Choose between one-sample, paired, Welch and chi-square tests, and compute their test statistics.
- 46mPower and multiple testingReading
Compute the power and sample size of a two-group study and control false positives across many tests with Bonferroni and Benjamini-Hochberg.
Module 4
Bayesian Thinking
3 lessons · 2h 21mUpdating beliefs with Bayes' rule, conjugate beta-binomial posteriors for rates and A/B tests, and approximating posteriors by sampling with the Metropolis algorithm.
- 46mBayes' rule in practiceReading
Update the probability of a hypothesis after a test result, one piece of evidence at a time.
- 49mPriors and posteriorsReading
Use a beta prior with binomial data to get a beta posterior, summarise it, and compare two rates in an A/B test.
- 46mSimulation-based BayesReading
Approximate a posterior you cannot compute in closed form by sampling it with the Metropolis algorithm.