Mathematical Foundations

V.5 · Statistics

What does 95% describe: this interval or the procedure?

Generate actual iid normal samples, keep the true mean fixed, and see which computed intervals cover it. Compare nominal confidence with realized finite-run coverage.

Generate intervals, keep the parameter fixed

Realized confidence intervalsIndependent Normal(2, 1.5²) observations, known positive sigma. Solid intervals with circles contain the true mean; dashed intervals with crosses miss it. 24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.11: [1.85407, 3.93292], contains the true mean22: [1.8765, 3.95536], contains the true mean33: [0.175558, 2.25441], contains the true mean44: [0.667201, 2.74606], contains the true mean55: [0.460958, 2.53981], contains the true mean66: [1.78062, 3.85948], contains the true mean77: [1.12786, 3.20671], contains the true mean88: [0.897063, 2.97592], contains the true mean99: [1.15233, 3.23118], contains the true mean1010: [1.04725, 3.1261], contains the true mean1111: [0.764586, 2.84344], contains the true mean1212: [0.541674, 2.62053], contains the true mean1313: [0.864381, 2.94324], contains the true mean1414: [1.15223, 3.23109], contains the true mean1515: [1.73108, 3.80993], contains the true mean1616: [1.34751, 3.42637], contains the true mean1717: [0.618553, 2.69741], contains the true mean1818: [1.13024, 3.2091], contains the true mean1919: [1.93374, 4.01259], contains the true mean2020: [1.14552, 3.22438], contains the true mean2121: [0.503343, 2.5822], contains the true mean2222: [0.969842, 3.0487], contains the true mean2323: [0.473323, 2.55218], contains the true mean2424: [0.450917, 2.52977], contains the true mean-0.8244422.094085.01259

Fixed true mean: solid vertical line. Covered intervals: solid with a circle. Misses: dashed with a cross.

Inspect actual samples and interval endpoints
All independently generated samples in this run · numbers are approximate
RunObserved dataMeanIntervalContains μ?
12.97304, 2.33777, 3.43706, 3.20148, 5.05031, -0.938388, 3.38556, 3.701122.89349[1.85407, 3.93292]Yes
22.78429, 4.62035, 2.8021, 1.89325, 3.55988, 2.41692, 3.56162, 1.689052.91593[1.8765, 3.95536]Yes
33.59197, 0.339878, 1.34199, 1.53675, -2.34097, 2.24434, 3.14056, -0.1346391.21499[0.175558, 2.25441]Yes
4-0.0822681, 1.85551, 1.94851, 3.00234, 3.32026, -0.640119, 1.4655, 2.783291.70663[0.667201, 2.74606]Yes
52.61597, -0.478017, 1.17727, 1.24757, 2.03046, 1.34251, 2.43678, 1.630541.50039[0.460958, 2.53981]Yes
63.26609, 3.23589, 2.86899, 1.24482, 4.1721, 1.97058, 3.52642, 2.275512.82005[1.78062, 3.85948]Yes
73.2789, 1.31012, 0.778484, 4.46444, 1.59884, 1.83696, 3.52106, 0.5494732.16728[1.12786, 3.20671]Yes
81.94841, 1.38685, 0.485856, 1.20657, 3.43691, 2.96584, -1.30809, 5.369581.93649[0.897063, 2.97592]Yes
90.886605, 3.69259, 0.896441, 1.00305, 1.23726, 1.74526, 2.1706, 5.902242.19176[1.15233, 3.23118]Yes
101.35523, 0.935627, 1.94937, -0.395398, 2.22155, 4.00398, -0.391373, 7.014412.08667[1.04725, 3.1261]Yes
112.45392, 1.51618, 2.00619, 4.45934, -1.37533, 0.754752, 3.91502, 0.702031.80401[0.764586, 2.84344]Yes
122.3616, 1.97117, 0.865305, 3.57084, 0.185172, 1.56461, 3.04802, -0.9179011.5811[0.541674, 2.62053]Yes
131.97943, 1.65591, 2.08807, 1.61595, 2.28695, 3.00654, 1.56046, 1.037171.90381[0.864381, 2.94324]Yes
14-0.40359, 0.995094, 2.39025, 3.07418, 3.6261, 0.0122935, 4.31671, 3.522222.19166[1.15223, 3.23109]Yes
152.39587, 3.46295, 0.235254, 1.24608, 3.76126, 2.47818, 4.70542, 3.879032.77051[1.73108, 3.80993]Yes
162.23797, 4.12205, 4.48604, 4.051, 0.14299, 2.23633, -0.375721, 2.194842.38694[1.34751, 3.42637]Yes
170.543875, 2.62113, 3.01202, 0.944039, 2.13269, 2.26187, -1.39411, 3.142331.65798[0.618553, 2.69741]Yes
182.38296, 0.900644, 0.674948, 1.32291, 3.0563, 4.4221, 3.20713, 1.390362.16967[1.13024, 3.2091]Yes
193.13602, 3.59136, -0.422838, 5.07176, 3.93563, 1.58585, 2.73937, 4.148172.97316[1.93374, 4.01259]Yes
203.18813, 1.90995, 1.2839, 2.255, 0.384163, 2.78901, 1.46473, 4.204722.18495[1.14552, 3.22438]Yes
211.18132, -0.658202, 3.07692, 0.0745426, 4.16757, 2.37307, -0.448357, 2.575311.54277[0.503343, 2.5822]Yes
223.62391, 2.26872, 2.07639, 2.48207, 0.5452, 2.22347, 2.41897, 0.4354192.00927[0.969842, 3.0487]Yes
230.414517, -0.202615, 3.32201, 1.04712, 1.1255, 0.998438, 3.1793, 2.217741.51275[0.473323, 2.55218]Yes
24-2.53737, 1.45541, 3.17531, 2.31494, 1.33247, -0.284611, 1.79253, 4.674091.49034[0.450917, 2.52977]Yes

Assumptions: iid normal observations; σ is known and positive. This model has exact normal coverage at n = 1 as well as larger n. Realized coverage is never forced to match nominal confidence.

Independent Normal(2, 1.5²) observations, known positive sigma. Solid intervals with circles contain the true mean; dashed intervals with crosses miss it. 24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.

Fixed true population mean
2
Known population standard deviation
1.5
Normal critical value
1.959964
Theoretical standard error
0.53033
Interval width
2.078856
Realized finite-run coverage
1
Analytic model coverage (CDF error ≤ 2e−9)
0.95

= exact finite-data/model quantity · ≈ binary64 approximation; empirical results describe this run

from 0.5 to 5, up to 2 decimal places

from 1 to 64, whole numbers only

from 1 to 80, whole numbers only

from 0 to 4294967295, whole numbers only

24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.

Xˉ±z1−α/2σn,z≈1.95996\bar X\pm z_{1-\alpha/2}\frac{\sigma}{\sqrt n},\quad z\approx1.95996
Pμ(μ∈I(X))=1−α≈0.95P_\mu(\mu\in I(X))=1-\alpha\approx0.95

Specify the repeated-sampling model

The parameter stays fixed while independent samples vary. Sigma is known; no estimated-sigma or asymptotic small-sample shortcut is used.

Xi∼iidN(μ,σ2)X_i\overset{\mathrm{iid}}{\sim}N(\mu,\sigma^2)

Generate actual iid normal samples, keep the true mean fixed, and see which computed intervals cover it. Compare nominal confidence with realized finite-run coverage.

Intuition

Before sampling, an interval is random because its center depends on unseen data. The population mean stays fixed. After observing a sample, the computed interval has fixed endpoints: it either contains that mean or misses it. Repeating the procedure makes this distinction visible.

Definition

Assume Xi∼iidN(μ,σ2)X_i\overset{\mathrm{iid}}{\sim}N(\mu,\sigma^2) with known σ>0\sigma>0. For confidence 1−α1-\alpha, define I(X)=[Xˉ−z1−α/2σ/n,Xˉ+z1−α/2σ/n]I(X)=[\bar X-z_{1-\alpha/2}\sigma/\sqrt n,\bar X+z_{1-\alpha/2}\sigma/\sqrt n]. The normal quantile satisfies Φ(z1−α/2)=1−α/2\Phi(z_{1-\alpha/2})=1-\alpha/2. Confidence is the procedure’s coverage Pμ(μ∈I(X))=1−αP_\mu(\mu\in I(X))=1-\alpha.

Mechanics

The true mean is fixed at 2. Change known σ, sample size, repetition count, confidence level or seed. Each interval comes from its own independently generated sample, whose observed values and endpoints are available in the table. Covered intervals use solid lines and circles; misses use dashed lines and crosses. Replay preserves the run; Reset restores the canonical experiment.

Derivation

Normality gives Z=(Xˉ−μ)/(σ/n)∼N(0,1)Z=(\bar X-\mu)/(\sigma/\sqrt n)\sim N(0,1) for every positive n. The event −z≤Z≤z-z\leq Z\leq z is equivalent to μ∈I(X)\mu\in I(X) and has probability 1−α1-\alpha. This is an exact finite-sample normal-model statement; no large-sample approximation or estimated σ is hidden in the derivation.

Worked examples

At 95% confidence, z≈1.959963984540054z\approx1.959963984540054. Known σ=1.5\sigma=1.5 and n=8n=8 give half-width approximately 1.03943, so an observed mean of 2 gives endpoints approximately 0.960572 and 3.03943. If the mean instead equals 4, the interval approximately [2.96057,5.03943] misses the fixed true mean 2. The simulation calculates its actual means without replacing them by either example.

Worked example: Generate intervals, keep the parameter fixed

Realized confidence intervalsIndependent Normal(2, 1.5²) observations, known positive sigma. Solid intervals with circles contain the true mean; dashed intervals with crosses miss it. 24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.11: [1.85407, 3.93292], contains the true mean22: [1.8765, 3.95536], contains the true mean33: [0.175558, 2.25441], contains the true mean44: [0.667201, 2.74606], contains the true mean55: [0.460958, 2.53981], contains the true mean66: [1.78062, 3.85948], contains the true mean77: [1.12786, 3.20671], contains the true mean88: [0.897063, 2.97592], contains the true mean99: [1.15233, 3.23118], contains the true mean1010: [1.04725, 3.1261], contains the true mean1111: [0.764586, 2.84344], contains the true mean1212: [0.541674, 2.62053], contains the true mean1313: [0.864381, 2.94324], contains the true mean1414: [1.15223, 3.23109], contains the true mean1515: [1.73108, 3.80993], contains the true mean1616: [1.34751, 3.42637], contains the true mean1717: [0.618553, 2.69741], contains the true mean1818: [1.13024, 3.2091], contains the true mean1919: [1.93374, 4.01259], contains the true mean2020: [1.14552, 3.22438], contains the true mean2121: [0.503343, 2.5822], contains the true mean2222: [0.969842, 3.0487], contains the true mean2323: [0.473323, 2.55218], contains the true mean2424: [0.450917, 2.52977], contains the true mean-0.8244422.094085.01259

Fixed true mean: solid vertical line. Covered intervals: solid with a circle. Misses: dashed with a cross.

Inspect actual samples and interval endpoints
All independently generated samples in this run · numbers are approximate
RunObserved dataMeanIntervalContains μ?
12.97304, 2.33777, 3.43706, 3.20148, 5.05031, -0.938388, 3.38556, 3.701122.89349[1.85407, 3.93292]Yes
22.78429, 4.62035, 2.8021, 1.89325, 3.55988, 2.41692, 3.56162, 1.689052.91593[1.8765, 3.95536]Yes
33.59197, 0.339878, 1.34199, 1.53675, -2.34097, 2.24434, 3.14056, -0.1346391.21499[0.175558, 2.25441]Yes
4-0.0822681, 1.85551, 1.94851, 3.00234, 3.32026, -0.640119, 1.4655, 2.783291.70663[0.667201, 2.74606]Yes
52.61597, -0.478017, 1.17727, 1.24757, 2.03046, 1.34251, 2.43678, 1.630541.50039[0.460958, 2.53981]Yes
63.26609, 3.23589, 2.86899, 1.24482, 4.1721, 1.97058, 3.52642, 2.275512.82005[1.78062, 3.85948]Yes
73.2789, 1.31012, 0.778484, 4.46444, 1.59884, 1.83696, 3.52106, 0.5494732.16728[1.12786, 3.20671]Yes
81.94841, 1.38685, 0.485856, 1.20657, 3.43691, 2.96584, -1.30809, 5.369581.93649[0.897063, 2.97592]Yes
90.886605, 3.69259, 0.896441, 1.00305, 1.23726, 1.74526, 2.1706, 5.902242.19176[1.15233, 3.23118]Yes
101.35523, 0.935627, 1.94937, -0.395398, 2.22155, 4.00398, -0.391373, 7.014412.08667[1.04725, 3.1261]Yes
112.45392, 1.51618, 2.00619, 4.45934, -1.37533, 0.754752, 3.91502, 0.702031.80401[0.764586, 2.84344]Yes
122.3616, 1.97117, 0.865305, 3.57084, 0.185172, 1.56461, 3.04802, -0.9179011.5811[0.541674, 2.62053]Yes
131.97943, 1.65591, 2.08807, 1.61595, 2.28695, 3.00654, 1.56046, 1.037171.90381[0.864381, 2.94324]Yes
14-0.40359, 0.995094, 2.39025, 3.07418, 3.6261, 0.0122935, 4.31671, 3.522222.19166[1.15223, 3.23109]Yes
152.39587, 3.46295, 0.235254, 1.24608, 3.76126, 2.47818, 4.70542, 3.879032.77051[1.73108, 3.80993]Yes
162.23797, 4.12205, 4.48604, 4.051, 0.14299, 2.23633, -0.375721, 2.194842.38694[1.34751, 3.42637]Yes
170.543875, 2.62113, 3.01202, 0.944039, 2.13269, 2.26187, -1.39411, 3.142331.65798[0.618553, 2.69741]Yes
182.38296, 0.900644, 0.674948, 1.32291, 3.0563, 4.4221, 3.20713, 1.390362.16967[1.13024, 3.2091]Yes
193.13602, 3.59136, -0.422838, 5.07176, 3.93563, 1.58585, 2.73937, 4.148172.97316[1.93374, 4.01259]Yes
203.18813, 1.90995, 1.2839, 2.255, 0.384163, 2.78901, 1.46473, 4.204722.18495[1.14552, 3.22438]Yes
211.18132, -0.658202, 3.07692, 0.0745426, 4.16757, 2.37307, -0.448357, 2.575311.54277[0.503343, 2.5822]Yes
223.62391, 2.26872, 2.07639, 2.48207, 0.5452, 2.22347, 2.41897, 0.4354192.00927[0.969842, 3.0487]Yes
230.414517, -0.202615, 3.32201, 1.04712, 1.1255, 0.998438, 3.1793, 2.217741.51275[0.473323, 2.55218]Yes
24-2.53737, 1.45541, 3.17531, 2.31494, 1.33247, -0.284611, 1.79253, 4.674091.49034[0.450917, 2.52977]Yes

Assumptions: iid normal observations; σ is known and positive. This model has exact normal coverage at n = 1 as well as larger n. Realized coverage is never forced to match nominal confidence.

Independent Normal(2, 1.5²) observations, known positive sigma. Solid intervals with circles contain the true mean; dashed intervals with crosses miss it. 24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.

Fixed true population mean
2
Known population standard deviation
1.5
Normal critical value
1.959964
Theoretical standard error
0.53033
Interval width
2.078856
Realized finite-run coverage
1
Analytic model coverage (CDF error ≤ 2e−9)
0.95

= exact finite-data/model quantity · ≈ binary64 approximation; empirical results describe this run

from 0.5 to 5, up to 2 decimal places

from 1 to 64, whole numbers only

from 1 to 80, whole numbers only

from 0 to 4294967295, whole numbers only

24 of 24 realized intervals contain the fixed true mean 2; realized coverage ≈ 100%. Nominal confidence is 95%. A fixed realized interval either contains the fixed parameter or misses it.

Xˉ±z1−α/2σn,z≈1.95996\bar X\pm z_{1-\alpha/2}\frac{\sigma}{\sqrt n},\quad z\approx1.95996
Pμ(μ∈I(X))=1−α≈0.95P_\mu(\mu\in I(X))=1-\alpha\approx0.95

Specify the repeated-sampling model

The parameter stays fixed while independent samples vary. Sigma is known; no estimated-sigma or asymptotic small-sample shortcut is used.

Xi∼iidN(μ,σ2)X_i\overset{\mathrm{iid}}{\sim}N(\mu,\sigma^2)

Inspect the actual mathematical steps and replay their immutable states.

Executable reference code

Run the exact mechanics and the NumPy companion. Both use literal assertions on the worked examples; simulations are never conditioned on a favorable coverage or fit outcome.

code/python/statistics_intervals.py
"""Runnable intervals reference, assumptions explicit."""
from statistics import NormalDist
from math import sqrt
mu, sigma, n, confidence = 2., 1.5, 8, .95
# A hand-observed sample; the parameter is fixed, the sample mean is computed.
sample = [1.,2.,3.,1.,2.,3.,1.,3.]
mean = sum(sample)/len(sample)
z = NormalDist().inv_cdf((1+confidence)/2)
lo, hi = mean-z*sigma/sqrt(n), mean+z*sigma/sqrt(n)
assert mean==2 and lo<mu<hi
assert abs((2*NormalDist().cdf(z)-1)-confidence)<1e-14
print((lo,hi), 'contains fixed mu:', lo<=mu<=hi)
code/python/statistics_intervals_numpy.py
"""Runnable intervals reference, assumptions explicit."""
import numpy as np
from statistics import NormalDist
sample=np.array([1.,2.,3.,1.,2.,3.,1.,3.]); mu=2.;sigma=1.5
z=NormalDist().inv_cdf(.975)
interval=sample.mean()+np.array([-1.,1.])*z*sigma/np.sqrt(sample.size)
assert sample.mean()==2 and interval[0]<mu<interval[1]
print(interval, 'sigma known; exact normal model, not an estimated-sigma interval')

Explore

Hold confidence and σ fixed and quadruple n: width halves. Double σ: width doubles. Hold n fixed and change repetitions: the nominal confidence and each interval width stay the same, while the realized coverage proportion can change. Try n=1 and explain why the exact normal assumptions still validate the formula.

Common mistakes and counterexamples

A 95% frequentist interval does not assign 95% posterior probability to the fixed parameter after seeing the data. A posterior statement requires a prior and a Bayesian model. Nor does nominal confidence promise that exactly 95 of the next 100 intervals will cover. Estimated σ needs a different normal-theory procedure using Student’s t; dependent or nonnormal data can invalidate this model’s coverage.

Numerical considerations

The 90%, 95% and 99% normal critical values are explicit binary64 constants, independently checked against Python NormalDist. Endpoints and Box–Muller normal samples are binary64 approximations; the reference-comparison tolerance is 2e−12 times max(1, absolute expected value). Analytic coverage uses the accepted normal CDF with absolute interval-probability error at most 2e−9. The seeded generator consumes two uniforms per observation and discards the sine partner; 1−u is positive so logarithms stay finite. The experiment stores at most 80 samples of 64 observations. Coverage classifications compare the computed endpoints directly; no sample is adjusted to achieve nominal coverage.

Engineering and ML connections

Repeated measurement and model evaluation often report intervals. Their validity depends on the data-generating assumptions and procedure, including selection, dependence and uncertainty in σ. More data narrow a valid interval but do not cure a biased collection process. MAP later introduces posterior inference with a prior; it has a different interpretation.

Exercises

Calculate from observed data and state the assumptions before interpreting a result. Corrective feedback identifies the corresponding misconception.

calculation

Standard error

Known σ=2 and n=16 under iid normal sampling. Give squared standard error.

calculation

Scaling width

With confidence and σ fixed, sample size grows from 4 to 16. Give new width divided by old width.

calculation

Observed coverage

19 of 24 realized intervals contain the fixed parameter. Give finite-run coverage as a fraction.

explanation

Frequentist interpretation

After seeing one 95% interval, which interpretation is valid?

Choose one answer

explanation

Small samples

Why is n=1 valid for this explorer’s normal interval formula?

Choose one answer

Summary and checkpoints

Explain what varies across repetitions, derive the coverage event, distinguish nominal from realized coverage and state the model assumptions. Relate width to σ and n, and reject the posterior-probability interpretation of a fixed frequentist interval.

The map of the book

97 of 97 chapters written · eight Parts

demo Foundation demo Try the live vector example Open as a page

Part I

Mathematical Language

The notation and mental objects everything else uses.

9 of 9 chapters written

  1. I.1 Scalars, quantities, units, powers and roots available
  2. I.2 Coordinates and points available
  3. I.3 Vectors: components, magnitude, and direction reference chapter available
  4. I.4 Algebraic expressions, equations and inequalities available
  5. I.5 Functions as input → transformation → output available
  6. I.6 Essential function families available
  7. I.7 Sets, intervals, and relations available
  8. I.8 Indexed quantities and summation available
  9. I.9 The notation map for ML available

Part II

Linear Algebra

Matrices as transformations: the strongest foundation in the book.

19 of 19 chapters written

  1. II.1 Vector addition and subtraction available
  2. II.2 Scalar multiplication and vector scaling available
  3. II.3 Norms, magnitude, and normalization available
  4. II.4 Dot product, angle, and orthogonality available
  5. II.5 Projection and distance to a direction available
  6. II.6 Linear combinations and span available
  7. II.7 Linear independence, basis, and coordinates available
  8. II.8 Matrices as linear transformations available
  9. II.9 Matrix × vector available
  10. II.10 Matrix × matrix as composition available
  11. II.11 Transpose and orthogonality available
  12. II.12 Determinant: orientation and area/volume scaling available
  13. II.13 Linear systems as intersecting constraints available
  14. II.14 Gaussian elimination and row operations available
  15. II.15 Rank and invertibility available
  16. II.16 Inverse matrices available
  17. II.17 Eigenvalues and eigenvectors available
  18. II.18 Orthogonal bases and least-squares geometry available
  19. II.19 Singular Value Decomposition available

Part III

Calculus

Change, local approximation, and sensitivity made visible.

15 of 15 chapters written

  1. III.1 Limits through approach available
  2. III.2 Continuity and local behavior available
  3. III.3 Derivative as secant → tangent available
  4. III.4 Derivative as rate of change and local linear model available
  5. III.5 Derivative rules available
  6. III.6 Chain rule available
  7. III.7 Multivariable functions and partial derivatives available
  8. III.8 Gradient and directional derivatives available
  9. III.9 Jacobian available
  10. III.10 Computational graphs and automatic differentiation available
  11. III.11 Hessian and curvature available
  12. III.12 Integrals as accumulation available
  13. III.13 Fundamental derivative/integral connection available
  14. III.14 Numerical differentiation available
  15. III.15 Numerical integration available

Part IV

Probability

Uncertainty through sample spaces, evidence, and repetition.

16 of 16 chapters written

  1. IV.1 Random experiments, outcomes, and sample spaces available
  2. IV.2 Events and probability mass available
  3. IV.3 Counting and finite probability where needed available
  4. IV.4 Conditional probability as restricted sample space available
  5. IV.5 Independence available
  6. IV.6 Bayes' theorem as probability-mass update available
  7. IV.7 Random variables available
  8. IV.8 PMF, PDF, and CDF available
  9. IV.9 Bernoulli and Binomial distributions available
  10. IV.10 Uniform and Gaussian distributions available
  11. IV.11 Expectation available
  12. IV.12 Variance and standard deviation available
  13. IV.13 Joint, marginal, and conditional distributions available
  14. IV.14 Covariance and correlation available
  15. IV.15 Law of Large Numbers available
  16. IV.16 Central Limit Theorem available

Part V

Statistics

From observed data to estimates, intervals, and likelihood.

10 of 10 chapters written

  1. V.1 Data summaries: mean, median, mode available
  2. V.2 Spread: variance, standard deviation, robust interpretation available
  3. V.3 Population, sample, and sampling variability available
  4. V.4 Estimators and estimation available
  5. V.5 Confidence intervals through repeated sampling available
  6. V.6 Covariance matrices and multivariate spread available
  7. V.7 Regression fundamentals available
  8. V.8 Likelihood available
  9. V.9 Maximum Likelihood Estimation available
  10. V.10 Maximum A Posteriori estimation available

Part VI

Optimization

Learning as repeated parameter updates governed by an objective.

10 of 10 chapters written

  1. VI.1 Objective functions and optimization landscapes available
  2. VI.2 Local vs global optima and stationary points available
  3. VI.3 Convexity available
  4. VI.4 Gradient descent flagship chapter available
  5. VI.5 Learning rate and convergence behavior available
  6. VI.6 Momentum available
  7. VI.7 Stochastic and mini-batch gradient descent available
  8. VI.8 Adam intuition available
  9. VI.9 Constraints and projected/penalized intuition available
  10. VI.10 Numerical stopping and optimization diagnostics available

Part VII

Information Theory

Logarithms, entropy, and the loss behind token prediction.

8 of 8 chapters written

  1. VII.1 Logarithms and log probabilities in computation available
  2. VII.2 Self-information available
  3. VII.3 Entropy available
  4. VII.4 Cross entropy and negative log-likelihood available
  5. VII.5 KL divergence available
  6. VII.6 Logits and softmax available
  7. VII.7 Numerical stability: log-sum-exp and stable softmax available
  8. VII.8 From token logits to language-model loss available

Part VIII

Numerical Computing

Why equivalent expressions behave differently on real machines.

10 of 10 chapters written

  1. VIII.1 Floating-point representation available
  2. VIII.2 Rounding and representation error available
  3. VIII.3 Error propagation and conditioning available
  4. VIII.4 Catastrophic cancellation available
  5. VIII.5 Overflow and underflow available
  6. VIII.6 Stable algorithms available
  7. VIII.7 Numerical linear algebra realities available
  8. VIII.8 Sparse matrices and sparse structure available
  9. VIII.9 Vectorized computation available
  10. VIII.10 Reproducibility, random seeds, and nondeterminism available