Course · Lecture notes, demonstrations and code

Introduction to Mathematical Statistics

Mathematical foundations, demonstrations and code

An undergraduate course that follows Richard Larsen and Morris Marx's An Introduction to Mathematical Statistics and Its Applications (6th edition, Pearson, 2018) chapter by chapter: probability, random variables and the special distributions; estimation and hypothesis testing; inference for normal data, two-sample comparisons and goodness of fit; regression, the analysis of variance, block designs and nonparametric methods; built on the book's case studies with real data. It is the step between the first-year statistics course and the graduate course Probability and Statistical Inference.

TrungTin Nguyen · Teaching page · Homepage

What each chapter offers

Lecture notes that fill the gaps. The book proves much of what it states but skips steps, leaves some proofs as exercises and moves others to appendices. The notes follow it section by section, with its numbering, and supply each missing argument in a "Filling the gap" box: 249 derivations in all. Where a companion course already proves a result in full, the notes give the statement and a sketch and link the proof.

Selected questions with graded hints. The book has more than a thousand end-of-section questions; each chapter works through a representative selection (135 in all) with complete solutions. Every derivation and every question comes with hints that unlock one at a time: the key idea, then the tools, then the steps with intermediate results to aim for, and the full solution last (why I teach this way).

The book's figures, reproduced. The Python code rebuilds 141 figures from the book's data tables and from simulation, one function per figure.

Demonstrations you can run. 28 new browser demonstrations, plus links to the demonstrations of the first-year and graduate courses where they already show the idea. The notes open each one at the case being discussed.

Before you start

Prerequisites. Calculus of one and several variables and basic algebra. No previous statistics is assumed, although the first-year course is a gentle way in.

The book. Keep it open next to the notes: section, theorem, example, case study and figure numbers match.

Where it leads. The graduate course Probability and Statistical Inference (Wasserman, All of Statistics) takes every topic further, with full generality.

Chapters

Chapter 1

Introduction: Lecture Notes

What statistics is for, through the book's motivating examples (full moons, earthquakes, estimating a fleet from serial numbers) and a short history from games of chance to modern inference.

3 figures · 5 gap-filling derivations · 3 selected questions with solutions

Chapter 2

Probability

Sample spaces and the algebra of sets, the axioms of probability, conditional probability and Bayes' rule, independence, counting, combinatorial probability and Monte Carlo.

6 figures · 21 gap-filling derivations · 12 selected questions with solutions

Chapter 3

Random Variables: Lecture Notes

Discrete and continuous random variables, expectation and variance, joint and conditional densities, transformations, order statistics and moment-generating functions.

16 figures · 27 gap-filling derivations · 14 selected questions with solutions

Chapter 4

Special Distributions: Lecture Notes

The Poisson, normal, geometric, negative binomial and gamma distributions, the Poisson limit, the central limit theorem with a full proof, and simulation.

13 figures · 21 gap-filling derivations · 10 selected questions with solutions

Chapter 5

Estimation: Lecture Notes

Maximum likelihood and the method of moments, confidence intervals, unbiasedness and efficiency, the Cramer-Rao bound, sufficiency, consistency and Bayesian estimation.

14 figures · 24 gap-filling derivations · 12 selected questions with solutions

Chapter 6

Hypothesis Testing: Lecture Notes

Decision rules, P-values, testing binomial data, Type I and II errors and power, the generalized likelihood ratio, and statistical versus practical significance.

20 figures · 16 gap-filling derivations · 8 selected questions with solutions

Chapter 7

Inferences Based on the Normal Distribution: Lecture Notes

Why S replaces sigma and the t distribution appears, the chi-squared and F laws, intervals and tests for a normal mean and variance, robustness, and power.

13 figures · 18 gap-filling derivations · 9 selected questions with solutions

Chapter 8

Types of Data: A Brief Overview: Lecture Notes

A map of experimental designs (one, two and k samples, paired data, randomized blocks, regression, categorical data) and which analysis each calls for.

5 figures · 10 gap-filling derivations · 5 selected questions with solutions

Chapter 9

Two-Sample Inferences: Lecture Notes

Comparing two groups: pooled and Welch t tests, the F test for variances and why it is fragile, two proportions, intervals for differences, and random assignment.

6 figures · 17 gap-filling derivations · 9 selected questions with solutions

Chapter 10

Goodness-of-Fit Tests: Lecture Notes

The multinomial distribution, Pearson's chi-squared test and why it has k - 1 degrees of freedom, estimated parameters, contingency tables and outliers.

7 figures · 18 gap-filling derivations · 9 selected questions with solutions

Chapter 11

Regression: Lecture Notes

Least squares and residuals, the simple linear model with exact inference for slope, intercept, variance, means and predictions, correlation, and the bivariate normal.

18 figures · 23 gap-filling derivations · 14 selected questions with solutions

Chapter 12

The Analysis of Variance: Lecture Notes

One-way analysis of variance: the F test and its exact laws, noncentral F and power, Tukey's multiple comparisons, contrasts and Scheffe, and transformations.

6 figures · 18 gap-filling derivations · 10 selected questions with solutions

Chapter 13

Randomized Block Designs: Lecture Notes

Randomized block designs: the block F test, the paired t test as its two-treatment case, contrasts, and when blocking or pairing pays off.

3 figures · 13 gap-filling derivations · 8 selected questions with solutions

Chapter 14

Nonparametric Statistics: Lecture Notes

Distribution-free tests: the sign test, Wilcoxon signed-rank and rank-sum tests, Kruskal-Wallis, Friedman, runs, and their efficiency against the t test.

11 figures · 18 gap-filling derivations · 12 selected questions with solutions

Shared resources

Python

Code that reproduces the figures

One module per chapter and one function per figure, written for this course with numpy, scipy, pandas and matplotlib, using the book's data tables.

Companion courses

First-Year Statistics and Probability and Statistical Inference

The first-year course (three versions, ten demonstrations) proves the core interval and test results these notes link to; the graduate course continues every topic.

Using the material in class

  1. Before the lecture, students read a section of the book and the matching section of the notes, with the derivations closed.
  2. In the lecture, open a case study, ask the class to predict what the data will show, then run the demonstration at the linked preset.
  3. In the tutorial, students work the selected questions with the hints, one at a time, and open the solution only to check.
  4. For assignments, students change one setting in the Python code (a sample size, a parameter, a significance level) and explain what changes in the figure.

Errata and thanks

These notes are maintained, and readers help. If you think something is wrong, in a derivation, a hint, a selected question, a figure or a demonstration, use the Report an error link at the end of any gap box or selected question, or the Feedback / report an error button on every page. Reports are private. Each confirmed error is corrected in the notes and listed here, with thanks to the reader who found it (by name only if they agree). Slips in the book itself are flagged in the chapters, next to the passage concerned.

No reader reports yet: be the first to find one.