Mathematical foundations, demonstrations and code
A course that follows Susan Holmes and Wolfgang Huber's Modern Statistics for Modern Biology (Cambridge University Press, 2019) chapter by chapter, from generative models for counts, likelihood and Bayesian updating, through mixtures, clustering, multiple testing and multivariate analysis, to count data and generalized linear models, networks and phylogenetic trees, image data, supervised learning and the design of experiments.
Lecture notes that fill the gaps. The book is applied and often states a result and moves on. The notes follow it section by section, with its section and figure numbers, and write out the argument behind each such result in a "Filling the gap" box: 237 derivations in all, from the EM algorithm and the bootstrap to Benjamini-Hochberg false discovery rate control, the Eckart-Young theorem, the negative binomial GLM and Ripley's K function.
The book's figures, reproduced. The R code rebuilds 318 of the book's figures from its data, with one function per figure. Where we found a slip in the book, the notes say so and show the evidence.
Demonstrations on real data. 47 browser demonstrations run the methods on the book's data sets. The notes open each one at the case being discussed, each links back to the notes, and each reproduces the numbers of the R code.
Prerequisites. A first course in probability and statistics, linear algebra (matrices, eigenvectors) and calculus. Some familiarity with R helps for the code but is not needed for the notes or the demonstrations.
The book. Holmes and Huber's book is freely readable online from its website, together with its data. Keep it open next to the notes: section, figure and exercise numbers match.
Binomial, Poisson and multinomial models for counts, testing by simulating the null distribution, and the chi-square statistic.
6 figures reproduced · 10 gap-filling derivations · 8 exercises with solutions
Maximum likelihood and goodness of fit for counts, Bayesian updating with conjugate priors, Hardy-Weinberg equilibrium, and Markov chains for DNA sequences (CpG islands).
25 figures reproduced · 23 gap-filling derivations · 6 exercises with solutions
The statistics behind the graphics: kernel density estimates, empirical CDFs and QQ plots, two-dimensional densities and hexagonal binning, heatmaps, colour spaces and transformations.
46 figures reproduced · 18 gap-filling derivations · 6 exercises with solutions
Finite mixtures and the EM algorithm, zero inflation, the empirical distribution and the bootstrap, the gamma-Poisson (negative binomial) model and variance-stabilising transformations.
25 figures reproduced · 20 gap-filling derivations · 5 exercises with solutions
Distances, k-means and PAM, hierarchical clustering, density-based clustering, choosing the number of clusters, and clustering mass cytometry data and sequencing reads.
26 figures reproduced · 20 gap-filling derivations · 11 exercises with solutions
Tests and p-values, permutation tests, and multiple testing: family-wise error, Benjamini-Hochberg false discovery rate control, local fdr, independent filtering and hypothesis weighting.
20 figures reproduced · 17 gap-filling derivations · 7 exercises with solutions
Centring and scaling, the singular value decomposition and the Eckart-Young theorem, principal component analysis, biplots, and when components are stable.
30 figures reproduced · 18 gap-filling derivations · 4 exercises with solutions
RNA-seq counts: size factors, the negative binomial generalized linear model, IRLS, Wald and likelihood ratio tests, dispersion shrinkage and variance-stabilising transformations.
16 figures reproduced · 22 gap-filling derivations · 3 exercises with solutions
Multidimensional scaling, correspondence analysis, the horseshoe effect, t-SNE, the RV coefficient, canonical correlation and sparse CCA, and constrained ordination.
40 figures reproduced · 19 gap-filling derivations · 8 exercises with solutions
Graphs and their Laplacians, network analyses, substitution models and phylogenetic trees (Jukes-Cantor, neighbour joining, Felsenstein's pruning), and the minimum-spanning-tree two-sample test.
27 figures reproduced · 22 gap-filling derivations · 9 exercises with solutions
Images as arrays, filtering and convolution, thresholding and morphology, segmentation by watershed and Voronoi propagation, and spatial point patterns (Ripley's K and L, pair correlation).
29 figures reproduced · 18 gap-filling derivations · 6 exercises with solutions
Discriminant analysis, logistic regression, overfitting and cross-validation, the curse of dimensionality, the bias-variance trade-off, ridge, lasso and elastic net, and support vector machines.
21 figures reproduced · 10 gap-filling derivations · 5 exercises with solutions
Experimental design: randomisation, blocking and pairing, power and sample size, replicates and pseudoreplication, the design effect, batch effects and regression to the mean.
7 figures reproduced · 20 gap-filling derivations · 6 exercises with solutions
One script per chapter and one function per figure. Runs with R and the CRAN and Bioconductor packages the book uses.
The same format for Bishop's Pattern Recognition and Machine Learning: mixture models and EM, PCA and latent variables, approximate inference and sampling, in more mathematical depth.