Mathematical Statistics
Use probability to infer what a sample can tell you about a population.
Use probability to infer what a sample can tell you about a population.
Before you start. Mathematics for AI and Data Science, especially probability.
Use Python 3.12 for the examples. Install the dependencies with python -m pip install numpy scipy. Run each week as a separate script. Try the worked example on paper first, then change one assumption in the lab and explain the result. All datasets are small or generated locally.
The 12 weeks
| Week | Lesson | What you’ll do |
|---|---|---|
| 1 | Populations, samples, and statistics | Estimate a fixed population rate and explain why two samples disagree. |
| 2 | Sampling distributions and standard error | Predict how the uncertainty of a sample mean changes with sample size. |
| 3 | Law of large numbers and central limit theorem | Separate convergence of an average from the shape of its sampling distribution. |
| 4 | Bias, variance, and mean squared error | Choose a variance estimator according to the error you care about. |
| 5 | Likelihood and maximum likelihood | Derive a Bernoulli estimate and handle the boundary case. |
| 6 | Sufficiency and Fisher information | Reduce Bernoulli data to a count and measure local precision. |
| 7 | Confidence intervals and coverage | Compare two interval methods near a probability boundary. |
| 8 | Hypothesis tests, p-values, and power | Measure false positives and missed effects as different frequencies. |
| 9 | Likelihood ratios and multiple testing | Compare nested models and calculate the cost of searching many hypotheses. |
| 10 | Bootstrap and permutation inference | Match the resampling operation to the question and unit of analysis. |
| 11 | Bayesian inference with a beta prior | Calculate a posterior and see how prior strength matters. |
| 12 | Capstone · Analyze a randomized experiment | Report an effect, quantify uncertainty, and stress-test the conclusion. |