ROC-AUC at 0.97, Precision at 9%: The Base-Rate Math
Work through a 1%-positive detector, turn thresholds into ROC and precision-recall points, and choose an operating point for a 30-alert review budget.
One connected lesson each day
Follow a 180-day path from mathematical notation to regression, PCA, mixture models, and support vector machines. Every lesson shows where the mathematics appears in AI.
Course progress
Next: Lesson 9, Equations, constraints, and solution sets.
Lessons 1–10
Published · Lesson 1
Read a symbol as a named quantity and separate a variable from its current value.
Published · Lesson 2
Evaluate a function and distinguish its input, rule, and output.
Published · Lesson 3
State where a function accepts inputs and what kind of output it promises.
Published · Lesson 4
Read set-builder and membership notation and use sets to describe data.
Published · Lesson 5
Interpret indexed samples and coordinates without confusing identity and value.
Published · Lesson 6
Expand sigma and product notation and translate it into loops.
Published · Lesson 7
Manipulate exponents and roots and recognize scale changes.
Published · Lesson 8
Use logarithms as inverse powers and convert products to sums.
Upcoming · Lesson 9
Treat an equation as a constraint and describe all values satisfying it.
Upcoming · Lesson 10
Justify each algebraic transformation and identify an unstated assumption.
Lessons 11–38
Upcoming · Lesson 11
Convert a two-variable linear equation into a line and test solutions.
Upcoming · Lesson 12
Interpret a system as simultaneous constraints and classify its intersections.
Upcoming · Lesson 13
Recognize inconsistent, unique, and underdetermined systems.
Upcoming · Lesson 14
Read row and column vectors and interpret coordinates as features.
Upcoming · Lesson 15
Add vectors componentwise and interpret the resulting displacement or feature mix.
Upcoming · Lesson 16
Scale a vector and predict changes to direction and magnitude.
Upcoming · Lesson 17
Construct and interpret a weighted sum of vectors.
Upcoming · Lesson 18
Read matrix dimensions and interpret rows and columns.
Upcoming · Lesson 19
Compute a matrix-vector product by rows and by columns.
Upcoming · Lesson 20
Check compatible shapes and compute a small matrix product.
Upcoming · Lesson 21
Transpose a matrix and explain what swaps semantically.
Upcoming · Lesson 22
Recognize identity behavior and verify a small matrix inverse.
Upcoming · Lesson 23
Apply elementary row operations without changing solutions.
Upcoming · Lesson 24
Find pivots, free variables, and a general solution.
Upcoming · Lesson 25
Use `numpy.linalg.solve` and explain why explicit inversion is usually avoided.
Upcoming · Lesson 26
Distinguish closure, inverse, and distributive assumptions at an intuitive level.
Upcoming · Lesson 27
Test whether a set satisfies vector-space closure rules.
Upcoming · Lesson 28
Test subspace conditions and interpret a lower-dimensional region.
Upcoming · Lesson 29
Determine whether vectors contain redundant directions.
Upcoming · Lesson 30
Identify the set of vectors reachable by linear combinations.
Upcoming · Lesson 31
Verify a basis and express a vector in basis coordinates.
Upcoming · Lesson 32
Relate dimension to the size of a basis rather than display shape alone.
Upcoming · Lesson 33
Compute rank and connect row and column perspectives.
Upcoming · Lesson 34
Test linearity and describe input and output spaces.
Upcoming · Lesson 35
Derive a mapping matrix from transformed basis vectors.
Upcoming · Lesson 36
Find simple null-space and image examples and interpret them.
Upcoming · Lesson 37
Distinguish linear and affine sets and transformations.
Upcoming · Lesson 38
Trace shapes, mappings, bias, rank, and expressivity through a two-layer network.
Lessons 39–54
Upcoming · Lesson 39
Compute common vector norms and check the norm properties.
Upcoming · Lesson 40
Explain how different norms change geometry and sensitivity.
Upcoming · Lesson 41
Compute an inner product and connect sign and magnitude to alignment.
Upcoming · Lesson 42
Interpret a dot product as a weighted feature score.
Upcoming · Lesson 43
Derive distance from a norm and compare nearest neighbors.
Upcoming · Lesson 44
Compute an angle and cosine similarity and handle zero-vector limits.
Upcoming · Lesson 45
Test orthogonality and interpret zero inner product geometrically.
Upcoming · Lesson 46
Verify orthonormality and compute coordinates with inner products.
Upcoming · Lesson 47
Execute Gram–Schmidt on two or three vectors and identify instability.
Upcoming · Lesson 48
Describe the directions orthogonal to a subspace.
Upcoming · Lesson 49
Interpret function similarity through an integral or discrete sum.
Upcoming · Lesson 50
Compute projection onto a line and explain the perpendicular residual.
Upcoming · Lesson 51
Construct and check a simple projection matrix.
Upcoming · Lesson 52
Derive normal-equation geometry without relying on explicit inversion.
Upcoming · Lesson 53
Build a 2D rotation matrix and verify its invariants.
Upcoming · Lesson 54
Choose a metric, normalization, and projection strategy for a retrieval problem.
Lessons 55–72
Upcoming · Lesson 55
Compute 2D determinants and interpret sign and scale.
Upcoming · Lesson 56
Connect zero determinant, rank loss, and non-invertibility.
Upcoming · Lesson 57
Compute trace and use its linear and cyclic properties safely.
Upcoming · Lesson 58
Verify an eigenpair and distinguish direction from scale.
Upcoming · Lesson 59
Interpret eigenvalue sign and magnitude, including zero and repeated cases.
Upcoming · Lesson 60
Solve a 2×2 characteristic equation and check the result.
Upcoming · Lesson 61
Explain how repeated linear updates approach a stable direction.
Upcoming · Lesson 62
Factor a small positive-definite matrix and recognize eligibility conditions.
Upcoming · Lesson 63
Express a diagonalizable matrix in its eigenbasis.
Upcoming · Lesson 64
State and use the real, orthogonal eigenstructure of symmetric matrices.
Upcoming · Lesson 65
Interpret SVD as rotate, scale, rotate and track shapes.
Upcoming · Lesson 66
Connect singular values to rank, conditioning, and captured signal.
Upcoming · Lesson 67
Use the SVD pseudoinverse and explain discarded zero directions.
Upcoming · Lesson 68
Construct a truncated SVD and quantify reconstruction error.
Upcoming · Lesson 69
Calculate parameter savings and identify quality tradeoffs.
Upcoming · Lesson 70
Compute a condition number and predict error amplification.
Upcoming · Lesson 71
Choose and verify Cholesky, eigendecomposition, or SVD in code.
Upcoming · Lesson 72
Select a decomposition for ranking, covariance, solving, or compression.
Lessons 73–98
Upcoming · Lesson 73
Interpret slope as local change rather than only rise over run.
Upcoming · Lesson 74
Explain the derivative limit and distinguish smaller steps from zero steps.
Upcoming · Lesson 75
Apply sum, product, quotient, and power rules with assumptions.
Upcoming · Lesson 76
Differentiate a composition and track intermediate sensitivities.
Upcoming · Lesson 77
Derive and compare sigmoid, tanh, and ReLU derivatives, including nondifferentiable points.
Upcoming · Lesson 78
Compute partial derivatives and state what remains fixed.
Upcoming · Lesson 79
Build a gradient vector and interpret its direction and units.
Upcoming · Lesson 80
Compute change along a chosen direction from a gradient.
Upcoming · Lesson 81
Construct a Jacobian and track its input/output shape.
Upcoming · Lesson 82
Multiply Jacobians in the correct order and check shapes.
Upcoming · Lesson 83
Interpret derivatives with respect to a matrix and verify dimensions.
Upcoming · Lesson 84
Rewrite scalar matrix objectives with trace identities and differentiate them.
Upcoming · Lesson 85
Draw dependencies and assign local derivatives to graph edges.
Upcoming · Lesson 86
Execute forward accumulation and explain when it is efficient.
Upcoming · Lesson 87
Execute a reverse pass and explain why scalar losses favor it.
Upcoming · Lesson 88
Derive input, weight, and bias gradients with correct batch shapes.
Upcoming · Lesson 89
Compare analytic and finite-difference gradients with scale-aware error.
Upcoming · Lesson 90
Use tensors, `requires_grad`, and backward while explaining the graph.
Upcoming · Lesson 91
Construct a small Hessian and interpret curvature directions.
Upcoming · Lesson 92
Use Hessian eigenvalues to classify local minima, maxima, and saddles.
Upcoming · Lesson 93
Build a first-order approximation and quantify local error.
Upcoming · Lesson 94
Construct first- and second-order Taylor approximations.
Upcoming · Lesson 95
Explain how multiplying small derivatives suppresses learning signals.
Upcoming · Lesson 96
Explain exploding products and evaluate clipping and initialization responses.
Upcoming · Lesson 97
Trace how one token can affect another through differentiable attention weights.
Upcoming · Lesson 98
Connect forward evaluation, loss, gradients, curvature, and parameter updates.
Lessons 99–126
Upcoming · Lesson 99
Distinguish uncertainty about outcomes from lack of numerical precision.
Upcoming · Lesson 100
Define outcomes and events and combine events with set operations.
Upcoming · Lesson 101
Apply nonnegativity, normalization, and additivity to detect invalid probabilities.
Upcoming · Lesson 102
Compute conditional probability and explain the changed denominator.
Upcoming · Lesson 103
Treat a random variable as a function and state its possible values.
Upcoming · Lesson 104
Build and normalize a probability mass function.
Upcoming · Lesson 105
Interpret probability density and areas over intervals.
Upcoming · Lesson 106
Read and construct a cumulative distribution function.
Upcoming · Lesson 107
Expand joint probabilities and marginalize hidden variables.
Upcoming · Lesson 108
Derive Bayes' theorem and identify prior, likelihood, evidence, and posterior.
Upcoming · Lesson 109
Explain why sensitivity alone does not determine posterior probability.
Upcoming · Lesson 110
Compute expectations for discrete variables and interpret the continuous analogue.
Upcoming · Lesson 111
Compute variance and standard deviation and distinguish scale from bias.
Upcoming · Lesson 112
Compute covariance and interpret sign without claiming causation.
Upcoming · Lesson 113
Build a covariance matrix and explain symmetry and diagonal entries.
Upcoming · Lesson 114
Test independence and produce a zero-covariance dependent counterexample.
Upcoming · Lesson 115
Estimate mean and variance and distinguish population from sample quantities.
Upcoming · Lesson 116
Read the Gaussian density and predict effects of mean and variance.
Upcoming · Lesson 117
Standardize values and interpret z-scores without assuming normality.
Upcoming · Lesson 118
Interpret mean vectors, covariance matrices, and density ellipses.
Upcoming · Lesson 119
Extract marginal and conditional Gaussian behavior.
Upcoming · Lesson 120
Transform standard noise into samples with a target covariance.
Upcoming · Lesson 121
Identify natural parameters, sufficient statistics, and normalization conceptually.
Upcoming · Lesson 122
Explain conjugacy and update a Beta-Bernoulli model.
Upcoming · Lesson 123
Construct and optimize a simple likelihood and log-likelihood.
Upcoming · Lesson 124
Transform a density and explain the Jacobian determinant correction.
Upcoming · Lesson 125
Generate samples with an inverse CDF and verify their distribution.
Upcoming · Lesson 126
Connect likelihoods, priors, posteriors, calibration questions, and evaluation uncertainty.
Lessons 127–142
Upcoming · Lesson 127
Define an objective, parameters, and feasible set and distinguish minimization from evaluation.
Upcoming · Lesson 128
Derive the negative-gradient update and execute steps by hand.
Upcoming · Lesson 129
Predict convergence, oscillation, and divergence as step size changes.
Upcoming · Lesson 130
Identify landscape features and their effect on first-order updates.
Upcoming · Lesson 131
Compare batch, mini-batch, and stochastic gradient estimates.
Upcoming · Lesson 132
Execute momentum updates and explain damping in narrow valleys.
Upcoming · Lesson 133
Explain moving moments and coordinate-wise scaling without treating Adam as magic.
Upcoming · Lesson 134
State equality constraints and distinguish objective contours from feasible points.
Upcoming · Lesson 135
Derive stationarity for one equality constraint and interpret gradient alignment.
Upcoming · Lesson 136
Relate penalties to constrained solutions while stating the equivalence conditions.
Upcoming · Lesson 137
Test convexity of simple sets using line segments.
Upcoming · Lesson 138
Apply geometric and Hessian tests for convexity.
Upcoming · Lesson 139
Explain why first-order conditions can certify a global solution.
Upcoming · Lesson 140
Write an explicit training loop and inspect gradients and updates.
Upcoming · Lesson 141
Diagnose loss, gradient norm, update ratio, and curvature clues without overclaiming.
Upcoming · Lesson 142
Select an update rule, learning rate, constraint or penalty, and stopping evidence.
Lessons 143–151
Upcoming · Lesson 143
Separate observations, hypotheses, parameters, predictions, and fitting rules.
Upcoming · Lesson 144
Express supervised data and a prediction function with correct indexing.
Upcoming · Lesson 145
Derive empirical risk from per-example loss and distinguish it from population risk.
Upcoming · Lesson 146
Compare squared, absolute, and classification losses by consequence and gradient.
Upcoming · Lesson 147
Frame maximum likelihood and MAP as optimization problems.
Upcoming · Lesson 148
Factor a simple joint distribution and distinguish parameters from latent variables.
Upcoming · Lesson 149
State an inference query and identify what must be conditioned or marginalized.
Upcoming · Lesson 150
Read a directed graphical model and write its joint factorization.
Upcoming · Lesson 151
Distinguish training fit, validation choice, and probabilistic evidence.
Lessons 152–159
Upcoming · Lesson 152
Write scalar and matrix forms of linear regression and track dimensions.
Upcoming · Lesson 153
Derive the least-squares estimator and interpret residual orthogonality.
Upcoming · Lesson 154
Derive squared-error regression from a Gaussian likelihood and state assumptions.
Upcoming · Lesson 155
Derive ridge regression and connect the penalty to conditioning and bias.
Upcoming · Lesson 156
Update a Gaussian prior into a parameter posterior.
Upcoming · Lesson 157
Separate observation noise from parameter uncertainty in predictions.
Upcoming · Lesson 158
Implement stable fitting and inspect residuals, conditioning, and uncertainty.
Upcoming · Lesson 159
Decide when interpretability and data limits favor linear regression and identify failure modes.
Lessons 160–167
Upcoming · Lesson 160
State what reduction keeps, what it discards, and why the criterion matters.
Upcoming · Lesson 161
Derive the first principal direction from covariance eigenvectors.
Upcoming · Lesson 162
Connect maximum variance and minimum reconstruction error.
Upcoming · Lesson 163
Relate centered-data SVD to covariance eigenvectors and singular values.
Upcoming · Lesson 164
Choose a computation path when features outnumber samples and interpret effective rank.
Upcoming · Lesson 165
Build a leakage-safe PCA pipeline and choose components using evidence.
Upcoming · Lesson 166
Interpret PCA as a latent-variable generative model with noise.
Upcoming · Lesson 167
Use PCA for inspection without treating a 2D plot as complete evidence.
Lessons 168–173
Upcoming · Lesson 168
Write a mixture density and distinguish components from observed groups.
Upcoming · Lesson 169
Introduce latent component indicators and compute responsibilities conceptually.
Upcoming · Lesson 170
Construct the GMM likelihood and explain why direct maximization is difficult.
Upcoming · Lesson 171
Execute E and M steps and identify what each holds fixed.
Upcoming · Lesson 172
Implement stable log responsibilities and monitor likelihood.
Upcoming · Lesson 173
Diagnose initialization sensitivity, singular covariance, and wrong component count.
Lessons 174–180
Upcoming · Lesson 174
Write a separating hyperplane and interpret its normal vector and bias.
Upcoming · Lesson 175
Derive point-to-hyperplane distance and identify support vectors.
Upcoming · Lesson 176
Formulate hard- and soft-margin objectives and interpret slack variables.
Upcoming · Lesson 177
Follow the Lagrangian route to a dual representation and read support-vector coefficients.
Upcoming · Lesson 178
Explain the kernel trick and test basic kernel intuition without claiming an explicit feature map is always known.
Upcoming · Lesson 179
Train linear and kernel SVMs and diagnose scaling, penalty, and kernel-width effects.
Upcoming · Lesson 180
Trace how algebra, geometry, calculus, probability, and optimization jointly determine model behavior.
Beyond the sequence
Work through a 1%-positive detector, turn thresholds into ROC and precision-recall points, and choose an operating point for a 30-alert review budget.
Work through softmax, fit a temperature on six predictions, compute ECE, and see why a better likelihood can still produce a worse binned calibration score.
NVIDIA researchers report a 25× component speedup for one KV-cache mapping, while several other model pairs lost much of the target model’s task accuracy.
AlphaEvolve helped lower the best matrix multiplication exponent bound. Learn what changed, how it was certified, and why it will not speed up today’s GPUs.
Build an intuitive understanding of vectors, dot products, cosine similarity, and why embeddings turn meaning into geometry.