Statistics
OLS from first principles, correlation measures, t-statistics from repeated looks, and the base-stack way to compute each.
OLS from first principles
The normal equations and their one-line derivation, a numpy implementation with standard errors and t-statistics in a dozen lines, what heteroskedasticity does to it, and the statsmodels version if it is installed.
Pearson versus Spearman
Spearman is Pearson on the ranks. When the tails are fat the two disagree, and the disagreement tells you how much of a result is being carried by a handful of rows.
t-statistics from repeated looks
The t-statistic used throughout this site is the mean of many per-period measurements over its standard error. What it assumes, when the repeats are not independent, and the cheap correction for overlapping targets.
Logistic regression with a majority-class baseline
For a binary target the first number to compute is the majority-class rate, because any classifier that cannot beat it has learned nothing. A base-stack logistic regression on a chronological split, scored honestly.
Classification metrics, and which one answers the question
Accuracy measures the base rate when the positive class is rare. AUC measures ranking, PR-AUC ranking weighted toward the rare class, log-loss and the Brier score the probabilities, and precision and recall at a threshold the decision. One code block computes all of them on a real imbalanced table, with the baselines each one has to beat.