Established France 2017The online brain of Dereck MezquitaDereck's Notes
Dereck's Notes

Mathematical Statistics with R I: Foundations

Series Overview
1 Describing Data
2 Probability: The Language
3 Random Variables
4 Discrete Distributions
5 Continuous Distributions
6 Joint Distributions and Multivariate Thinking
7 Convergence and Limit Theorems
8 Point Estimation
9 Interval Estimation
10 Hypothesis Testing: Framework
11 Classical Tests
12 Multiple Testing and Modern Concerns
13 Nonparametric Methods
14 Linear Algebra for Statistics
15 Simple Linear Regression
16 Multiple Linear Regression
17 Regression Diagnostics
18 Analysis of Variance
19 Generalised Linear Models: Framework
20 Logistic Regression
21 Poisson and Count Models
22 Bayesian Thinking
23 Computational Bayesian Methods
24 Experimental Design and Data Collection
25 Bringing It Together

About

This website is custom made by Dereck using React, Next.js 15 app dir, and TypeScript. It incorporates progressive web app technologies and relies on a Bun backend along with a SQLite database and Docker for CI/CD deployment.

If you would like to know more you can find the full source code on github.com/dereckmezquita/derecksnotes.com

Knowledge Graph

See every post, definition, and reference on the site rendered as one interconnected network of ideas. Visit it →

Mathematical Statistics with R I: Foundations

By Dereck MezquitaLast updated: 2026-04-0361 parts
statisticsmathematicsprobabilityinferencelinear-modelsrggplot2

Contents

1 Describing Data

Summary statistics, visualisation, and the art of understanding data before modelling it.

  1. 1.1 Types of Data and Central Tendency
  2. 1.2 Spread and Shape
  3. 1.3 Visualisation and Relationships
2 Probability: The Language

Sample spaces, axioms, conditional probability, independence, and Bayes theorem.

  1. 2.1 Sets, Axioms, and Counting
  2. 2.2 Conditional Probability and Independence
  3. 2.3 Bayes' Theorem
3 Random Variables

Discrete and continuous random variables, expectation, variance, moments, and moment generating functions.

  1. 3.1 Discrete and Continuous Random Variables
  2. 3.2 Expectation and Variance
  3. 3.3 Higher Moments and Moment Generating Functions
4 Discrete Distributions

Bernoulli, binomial, geometric, hypergeometric, and Poisson — each derived from first principles.

  1. 4.1 Bernoulli and Binomial
  2. 4.2 Geometric, Negative Binomial, and Hypergeometric
  3. 4.3 The Poisson Distribution and Relationships
5 Continuous Distributions

Uniform, exponential, gamma, normal, chi-square, t, F, and beta distributions — derived and connected.

  1. 5.1 Uniform, Exponential, and Gamma
  2. 5.2 Normal and Derived Distributions
  3. 5.3 Beta, Transformations, and Relationships
8 Point Estimation

Method of moments, maximum likelihood, bias, consistency, efficiency, Fisher information, and the Cramer-Rao bound.

  1. 8.1 Estimator Properties and Method of Moments
  2. 8.2 Maximum Likelihood Estimation
  3. 8.3 Fisher Information, Cramér-Rao, and Sufficiency
9 Interval Estimation

Confidence intervals derived from first principles. Pivotal quantities and sample size determination.

  1. 9.1 Confidence Intervals for Means
  2. 9.2 Proportions and Variance
  3. 9.3 Pivotal Quantities and Sample Size
10 Hypothesis Testing: Framework

The logic of testing, p-values, Type I and II errors, power, the Neyman-Pearson lemma, and likelihood ratio tests.

  1. 10.1 Logic and P-values
  2. 10.2 Errors and Power
  3. 10.3 Neyman-Pearson and the Likelihood Ratio Test
11 Classical Tests

t-tests, chi-square tests, F-tests — each derived from the theory, not presented as recipes.

  1. 11.1 t-Tests
  2. 11.2 Proportions and Chi-Square
  3. 11.3 F-Test and Checking Assumptions
12 Multiple Testing and Modern Concerns

Family-wise error rate, false discovery rate, and the replication crisis.

  1. 12.1 FWER and Bonferroni
  2. 12.2 FDR and Replication
13 Nonparametric Methods

Permutation tests, rank-based tests, the bootstrap, and cross-validation.

  1. 13.1 Permutation and Rank Tests
  2. 13.2 Bootstrap and Cross-Validation
14 Linear Algebra for Statistics

Vectors, matrices, projection, eigenvalues — taught in service of linear models.

  1. 14.1 Vectors, Matrices, and Systems
  2. 14.2 Projection and Eigenvalues
15 Simple Linear Regression

Least squares derived by calculus, properties of estimators, inference, and residual analysis.

  1. 15.1 Model and Estimation
  2. 15.2 Inference and Prediction
  3. 15.3 R-squared and Residuals
16 Multiple Linear Regression

The matrix formulation, Gauss-Markov theorem, inference, multicollinearity, and model selection.

  1. 16.1 Matrix Formulation
  2. 16.2 Gauss-Markov and Inference
  3. 16.3 Model Selection
17 Regression Diagnostics

Assumption checking, influential observations, heteroscedasticity, and remedial measures.

  1. 17.1 Assumptions and Residuals
  2. 17.2 Influence and Remedies
18 Analysis of Variance

ANOVA as a special case of linear models. One-way, two-way, interactions, and ANCOVA.

  1. 18.1 One-Way ANOVA and Comparisons
  2. 18.2 Factorial Designs and ANCOVA
19 Generalised Linear Models: Framework

The exponential family, link functions, iteratively reweighted least squares, and deviance.

  1. 19.1 The Exponential Family
  2. 19.2 Link Functions and IRLS
20 Logistic Regression

The model derived from exponential family theory. Inference, model assessment, and extensions.

  1. 20.1 Model and Inference
  2. 20.2 Assessment and Extensions
21 Poisson and Count Models

Poisson regression, overdispersion, negative binomial, and zero-inflated models.

  1. 21.1 Poisson Regression
  2. 21.2 Overdispersion and Extensions
22 Bayesian Thinking

Priors, posteriors, conjugate analysis, credible intervals, and Bayes factors.

  1. 22.1 Framework and Conjugate Priors
  2. 22.2 Credible Intervals and Testing
23 Computational Bayesian Methods

Monte Carlo integration, Metropolis-Hastings, Gibbs sampling, and diagnostics.

  1. 23.1 MCMC Algorithms
  2. 23.2 Diagnostics and Practice
24 Experimental Design and Data Collection

Randomisation, blocking, sample size determination, and common pitfalls.

  1. 24.1 Principles and Practice
25 Bringing It Together

The statistical workflow, case studies, and the road ahead.

  1. 25.1 Workflow and Case Studies

Comments

Log in to leave a comment.