Mathematical Foundations

IV.10 · Probability

What changes when probability is spread evenly or concentrated near a center?

Compare a normalized rectangle with a Gaussian curve using the same interval. Read probability as area, then standardize location and scale without changing the question.

Compare flat and Gaussian densities

PDF comparison · solid selected, dashed alternative
PDF comparison · solid selected, dashed alternativeGaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.0.458784-4-114

x · density has inverse-x units · drawn tails are truncated, total Gaussian mass is analytically one

CDF · accumulated area
CDF · accumulated areaGaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.1-404

F(x) = area to the left · approaches zero and one in the tails

Gaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.

Selected interval area
0.682689
CDF at lower bound
0.158655
CDF at upper bound
0.841345
Density at Gaussian mean
0.398942
Any exact point probability
0
Standardized lower bound
−1
Standardized upper bound
1

= exact model quantity · ≈ numerical companion or observed estimate

from −10 to 10, up to 2 decimal places

from −10 to 10, up to 2 decimal places

from −5 to 5, up to 2 decimal places

from 0.1 to 5, up to 2 decimal places

from −20 to 35, up to 2 decimal places

from −20 to 35, up to 2 decimal places

A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero.
f(x)=1σ2πexp⁡ ⁣(−(x−μ)22σ2)f(x)=\frac1{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)
P(ℓ≤X≤u)=Φ(zu)−Φ(zℓ)≈0.682689P(\ell\le X\le u)=\Phi(z_u)-\Phi(z_\ell)\approx 0.682689

Specify a normalized density

The Gaussian density is normalized analytically over the full real line, not over the displayed window.

f(x)=1σ2πexp⁡ ⁣(−(x−μ)22σ2)f(x)=\frac1{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)

Compare Uniform(−2, 2) and Normal(0, 1) on interval [−1, 1]. One probability is exactly 1/2; the other is approximately 0.682689492137.

Predict the uniform density from its support width. Switch to normal mode and explain why equal interval widths need not contain equal mass.

Intuition: shape controls area

A uniform distribution assigns the same density across a finite support. Equal-width subintervals inside that support receive equal probabilities. A Gaussian concentrates density near its mean and decreases smoothly into both tails. Equal-width intervals at different locations generally have different probabilities.

Neither density gives positive probability to a single point. A shaded interval has area; a solitary density height describes concentration per unit of value. This distinction remains true at the highest point of the Gaussian curve.

Definition

For a<ba<b, the continuous uniform density is f(x)=1/(b−a)f(x)=1/(b-a) inside [a,b][a,b] and zero outside. Its CDF is zero below aa, (x−a)/(b−a)(x-a)/(b-a) within the support, and one above bb. Endpoint density choices do not affect any interval probability.

A Gaussian, or normal, distribution with finite mean μ\mu and positive standard deviation σ\sigma has density

f(x)=1σ2πexp⁡ ⁣(−(x−μ)22σ2).f(x)=\frac{1}{\sigma\sqrt{2\pi}} \exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right).

Its mathematical support is the whole real line. The standard normal has μ=0\mu=0 and σ=1\sigma=1; write its CDF as Φ\Phi. The density integrates to one over the whole line. A zero-width uniform support or nonpositive Gaussian σ\sigma is invalid for these continuous formulas; a point-mass model would be a separate definition.

Mechanics: separate model and viewport

Choose uniform or normal mode, change its parameters, and move the interval bounds. The highlighted area, CDF difference, inspector, formula, and integration trace all describe the same state. In uniform mode, only the part of the interval inside the support contributes area.

In normal mode, the drawn curve is sampled most densely over μ±4σ\mu\pm4\sigma, with extra points at interval and viewport bounds. The viewport also includes the uniform support for comparison. These finite samples make a readable approximation; they do not define the distribution’s support or renormalize its CDF. The numerical integration uses a separate positive-tail cutoff at 88 standard deviations.

Derivation: normalize and standardize

Uniform normalization requires density times support width to equal one. Thus interval probability is the overlap width divided by b−ab-a:

P(ℓ≤X≤u)=max⁡(0,min⁡(u,b)−max⁡(ℓ,a))b−a,ℓ≤u.P(\ell\le X\le u) =\frac{\max(0,\min(u,b)-\max(\ell,a))}{b-a},\qquad \ell\le u.

For the Gaussian, set Z=(X−μ)/σZ=(X-\mu)/\sigma. The substitution dx=σ dzdx=\sigma\,dz cancels the density’s 1/σ1/\sigma factor, yielding the standard-normal density. Therefore

P(ℓ≤X≤u)=Φ ⁣(u−μσ)−Φ ⁣(ℓ−μσ).P(\ell\le X\le u) =\Phi\!\left(\frac{u-\mu}{\sigma}\right) -\Phi\!\left(\frac{\ell-\mu}{\sigma}\right).

The positive scale preserves endpoint order. Because these models are continuous, including or excluding finite endpoints gives the same probability.

Worked examples

Uniform(−2,2)(-2,2) has support width 44 and density 1/41/4. Its interval [−1,1][-1,1] has width 22, so the area is exactly 1/21/2. The interval [−3,3][-3,3] overlaps the full support and has probability 11, rather than 6×1/46\times1/4.

Worked example: Compare flat and Gaussian densities

PDF comparison · solid selected, dashed alternative
PDF comparison · solid selected, dashed alternativeGaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.0.458784-4-114

x · density has inverse-x units · drawn tails are truncated, total Gaussian mass is analytically one

CDF · accumulated area
CDF · accumulated areaGaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.1-404

F(x) = area to the left · approaches zero and one in the tails

Gaussian mean 0, standard deviation 1. Selected closed interval [-1, 1]. A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero. Numerical CDF absolute error budget 1e-9; interval budget 2e-9. The finite drawing does not prove normalization.

Selected interval area
0.682689
CDF at lower bound
0.158655
CDF at upper bound
0.841345
Density at Gaussian mean
0.398942
Any exact point probability
0
Standardized lower bound
−1
Standardized upper bound
1

= exact model quantity · ≈ numerical companion or observed estimate

from −10 to 10, up to 2 decimal places

from −10 to 10, up to 2 decimal places

from −5 to 5, up to 2 decimal places

from 0.1 to 5, up to 2 decimal places

from −20 to 35, up to 2 decimal places

from −20 to 35, up to 2 decimal places

A PDF height is density, with inverse-value units. Interval probability is area: approximately 0.682689. A single continuous point has probability zero.
f(x)=1σ2πexp⁡ ⁣(−(x−μ)22σ2)f(x)=\frac1{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)
P(ℓ≤X≤u)=Φ(zu)−Φ(zℓ)≈0.682689P(\ell\le X\le u)=\Phi(z_u)-\Phi(z_\ell)\approx 0.682689

Specify a normalized density

The Gaussian density is normalized analytically over the full real line, not over the displayed window.

f(x)=1σ2πexp⁡ ⁣(−(x−μ)22σ2)f(x)=\frac1{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)

Reproduce the half-area uniform interval, then switch to the standard normal and compare its one-sigma area. Changing the curve shape changes the probability.

For X∼N(0,1)X\sim\mathcal N(0,1),

P(−1≤X≤1)=Φ(1)−Φ(−1)≈0.682689492137.P(-1\le X\le1)=\Phi(1)-\Phi(-1)\approx0.682689492137.

For X∼N(2,9)X\sim\mathcal N(2,9), the second parameter here denotes variance, so σ=3\sigma=3. Interval [−1,5][-1,5] standardizes to [−1,1][-1,1] and has the same probability. Always state whether a normal notation or software API uses variance or standard deviation as its scale parameter.

Executable reference code

The exact uniform reference uses Fraction overlap widths. Its independent Gaussian CDF uses standard-library math.erfc, with Φ(z)=12erfc⁡(−z/2)\Phi(z)=\tfrac12\operatorname{erfc}(-z/\sqrt2). It also demonstrates the positive-tail Simpson calculation and compares it with that independent CDF over a deterministic sweep and several intervals.

The NumPy program exposes density arrays, an evenly spaced 2049-point grid, and Simpson weights 1,4,2,4,…,2,4,11,4,2,4,\ldots,2,4,1. It uses installed NumPy plus the standard library, without SciPy. Both references include assertions for literal areas, invalid parameters, and the stated CDF and interval error budgets.

code/python/probability_continuous.py
"""Exact uniform areas and Gaussian erfc cross-checks of Simpson integration.

The Gaussian drawing stops at +/-4 sigma. Integration uses the positive tail
to 8 sigma and 2048 Simpson subdivisions. Omitted one-sided mass is <6.4e-16.
CDF absolute-error budget: 1e-9; two-CDF interval budget: 2e-9.
"""
from fractions import Fraction as F
from math import erfc, exp, fsum, isfinite, pi, sqrt


def uniform_interval(a, b, lower, upper):
    if any(not isinstance(x, (int, F)) or isinstance(x, bool) for x in (a, b, lower, upper)):
        raise ValueError("Use integer or Fraction endpoints")
    if a >= b or lower > upper:
        raise ValueError("Require a < b and lower <= upper")
    overlap = max(F(0), min(F(b), F(upper)) - max(F(a), F(lower)))
    return overlap / (F(b) - F(a))


def standardize(x, mu=0, sigma=1):
    if not all(isfinite(v) for v in (x, mu, sigma)) or sigma <= 0:
        raise ValueError("Use finite x, mu and positive finite sigma")
    return (x - mu) / sigma


def normal_cdf(x, mu=0, sigma=1):
    return 0.5 * erfc(-standardize(x, mu, sigma) / sqrt(2))


def simpson_cdf(x, mu=0, sigma=1):
    z = standardize(x, mu, sigma)
    start = abs(z)
    if start >= 8:
        return 1.0 if z > 0 else 0.0
    n = 2048
    h = (8 - start) / n
    def density(t):
        return exp(-t*t/2) / sqrt(2*pi)
    odd = fsum(density(start + j*h) for j in range(1, n, 2))
    even = fsum(density(start + j*h) for j in range(2, n, 2))
    tail = h/3 * (density(start) + density(8) + 4*odd + 2*even)
    return 1 - tail if z >= 0 else tail


def normal_interval(lower, upper, mu=0, sigma=1):
    low, high = normal_cdf(lower, mu, sigma), normal_cdf(upper, mu, sigma)
    if lower > upper:
        raise ValueError("Interval endpoints must be ordered")
    return high - low


def main():
    assert uniform_interval(-2, 2, -1, 1) == F(1, 2)
    assert uniform_interval(-2, 2, -3, 3) == 1
    assert uniform_interval(-2, 2, 2, 3) == 0
    assert uniform_interval(-2, 2, 0, 0) == 0
    assert standardize(-1, 2, 3) == -1 and standardize(5, 2, 3) == 1
    assert abs(normal_interval(-1, 1) - 0.682689492137) < 1e-12
    assert normal_cdf(0) == 0.5
    assert 0.5 * erfc(8 / sqrt(2)) < 6.4e-16
    points = [j/8 for j in range(-80, 81)]
    errors = [abs(simpson_cdf(z) - normal_cdf(z)) for z in points]
    assert max(errors) <= 1e-9
    for lower, upper in ((-1, 1), (-4, 4), (-8, -7), (7, 8), (-2.3, 0.7), (0, 0)):
        estimate = simpson_cdf(upper) - simpson_cdf(lower)
        assert abs(estimate - normal_interval(lower, upper)) <= 2e-9
    assert abs(normal_interval(-1, 5, 2, 3) - 0.682689492137) < 1e-12
    for args in ((0, 0, 0), (0, 0, -1), (float('nan'), 0, 1), (0, float('inf'), 1)):
        try:
            normal_cdf(*args)
        except ValueError:
            pass
        else:
            raise AssertionError("Invalid Gaussian parameters accepted")
    for args in ((2, 2, 0, 1), (-2, 2, 1, -1)):
        try:
            uniform_interval(*args)
        except ValueError:
            pass
        else:
            raise AssertionError("Invalid uniform parameters accepted")
    try:
        normal_interval(1, -1)
    except ValueError:
        pass
    else:
        raise AssertionError("Reversed Gaussian interval accepted")
    print("Uniform[-2,2] density = 1/4, P([-1,1]) =", uniform_interval(-2, 2, -1, 1))
    print("Standard normal P([-1,1]) ≈", normal_interval(-1, 1))
    print("Largest sampled Simpson CDF error against erfc:", max(errors))
    print("Omitted drawn +/-4 sigma tail mass ≈", erfc(4 / sqrt(2)))


if __name__ == "__main__":
    main()
code/python/probability_continuous_numpy.py
"""Array mechanics for densities and positive-tail Simpson, without SciPy."""
from math import erfc, sqrt
import numpy as np


def normal_pdf(x, mu=0, sigma=1):
    x = np.asarray(x, dtype=float)
    if not np.all(np.isfinite(x)) or not np.isfinite(mu) or not np.isfinite(sigma) or sigma <= 0:
        raise ValueError("Use finite points, finite mu and positive finite sigma")
    z = (x - mu) / sigma
    return np.exp(-z*z/2) / (sigma * np.sqrt(2*np.pi))


def simpson_cdf(x, mu=0, sigma=1):
    if not all(np.isfinite(v) for v in (x, mu, sigma)) or sigma <= 0:
        raise ValueError("Use finite x, mu and positive finite sigma")
    z = (x - mu) / sigma
    start = abs(z)
    if start >= 8:
        return 1.0 if z > 0 else 0.0
    grid = np.linspace(start, 8, 2049)
    weights = np.ones(2049)
    weights[1:-1:2] = 4
    weights[2:-1:2] = 2
    tail = ((8 - start) / 2048) / 3 * np.dot(weights, normal_pdf(grid))
    return 1 - tail if z >= 0 else tail


def uniform_interval(a, b, lower, upper):
    if not all(np.isfinite(v) for v in (a, b, lower, upper)) or a >= b or lower > upper:
        raise ValueError("Require finite ordered endpoints and a < b")
    return max(0, min(b, upper) - max(a, lower)) / (b - a)


def main():
    assert uniform_interval(-2, 2, -1, 1) == 0.5
    assert uniform_interval(-2, 2, -3, 3) == 1
    assert uniform_interval(-2, 2, 2, 3) == 0
    np.testing.assert_allclose(normal_pdf([0, 1, -1]), [0.3989422804014327, 0.24197072451914337, 0.24197072451914337], rtol=0, atol=1e-12)
    points = np.linspace(-10, 10, 161)
    estimates = np.array([simpson_cdf(float(z)) for z in points])
    independent = np.array([0.5 * erfc(-float(z) / sqrt(2)) for z in points])
    np.testing.assert_allclose(estimates, independent, rtol=0, atol=1e-9)
    assert np.all(np.diff(estimates) >= 0)
    for lower, upper in ((-1, 1), (-4, 4), (-8, -7), (7, 8), (-2.3, .7), (0, 0)):
        area = simpson_cdf(upper) - simpson_cdf(lower)
        oracle = 0.5 * (erfc(-upper/sqrt(2)) - erfc(-lower/sqrt(2)))
        np.testing.assert_allclose(area, oracle, rtol=0, atol=2e-9)
    np.testing.assert_allclose(simpson_cdf(1) - simpson_cdf(-1), 0.682689492137, rtol=0, atol=2e-9)
    np.testing.assert_allclose(simpson_cdf(5, 2, 3) - simpson_cdf(-1, 2, 3), 0.682689492137, rtol=0, atol=2e-9)
    for args in ((0, 0, 0), (0, 0, -1), (np.nan, 0, 1), (0, np.inf, 1)):
        for function in (normal_pdf, simpson_cdf):
            try:
                function(*args)
            except ValueError:
                pass
            else:
                raise AssertionError("Invalid Gaussian parameters accepted")
    for args in ((2, 2, 0, 1), (-2, 2, 1, -1), (-2, 2, np.nan, 1)):
        try:
            uniform_interval(*args)
        except ValueError:
            pass
        else:
            raise AssertionError("Invalid uniform parameters accepted")
    print("Gaussian interval [-1,1] ≈", simpson_cdf(1) - simpson_cdf(-1))
    print("Largest sampled CDF error:", np.max(np.abs(estimates - independent)))
    print("CDF budget 1e-9; two-CDF interval budget 2e-9; plotted +/-4σ omits tails")


if __name__ == "__main__":
    main()

Explore

In uniform mode, move a fixed-width interval entirely within the support. Predict the unchanged area, then move it across an edge and predict the decrease. Collapse the interval bounds to one point: area becomes zero while the density at that point can remain positive.

In normal mode, compare intervals one standard deviation wide near the mean and far into a tail. Change μ\mu while shifting the interval by the same amount. Then scale σ\sigma and the interval’s distances from μ\mu together. Standardized bounds explain why those coordinated changes preserve probability.

Common mistakes and counterexamples

Uniform means equal density within the support, not over the entire real line. Extending a constant positive height forever would give infinite area. Gaussian does not mean every symmetric interval has the same probability: its location and width relative to μ\mu and σ\sigma matter.

For a normal density, substituting variance for σ\sigma changes both height and width. A curve drawn within four standard deviations also does not capture exactly all mass: about 0.0000633424840.000063342484 lies beyond the two drawing limits in total.

Numerical considerations

The Gaussian model integrates the positive tail from ∣z∣|z| to 88 using composite Simpson’s rule with 2048 subdivisions, then uses symmetry to obtain a CDF value. Beyond 88 standard deviations it truncates the one-sided tail approximately; that omitted mass is less than 6.4×10−166.4\times10^{-16}, not mathematically zero.

The absolute CDF error budget is 10−910^{-9} against independent math.erfc values. An interval subtracts two approximate CDFs, so its absolute budget is 2×10−92\times10^{-9}. This is not a promise of relative accuracy for tiny intervals or extreme tails. The ±4σ\pm4\sigma drawn curve is not claimed to have exactly normalized area.

Engineering and ML connections

Uniform models describe deliberate random choices over bounded ranges. Gaussian models describe a specified noise or uncertainty shape with location and scale. A bell-shaped drawing alone does not establish that observed data are Gaussian. The interval calculation is conditional on the chosen model, and density values must be interpreted with their measurement units.

Exercises

Use exact fractions for uniform calculations and signed numbers for standardized endpoints. The Gaussian choices use approximate values explicitly.

calculation

Measure uniform area

X is uniform on [−2, 2]. Give its density inside the support and P(−1 ≤ X ≤ 1).

calculation

Intersect the interval with the support

For Uniform(−2, 2), find P(−3 ≤ X ≤ 3).

calculation

Translate a Gaussian interval

X is normal with μ = 2 and σ = 3. Standardize interval [−1, 5] using z = (x − μ)/σ. Give the two z endpoints.

prediction

Predict a one-sigma probability

For a standard normal, which probability corresponds to interval [−1, 1]?

Choose one answer

explanation

Distinguish a viewport from the distribution

The Gaussian curve is drawn only between μ − 4σ and μ + 4σ. How should its area be described?

Choose one answer

Summary and checkpoints

Uniform probability is normalized overlap width; Gaussian probability is a standardized CDF difference. Check that you can obtain the uniform half-area exactly, standardize [−1,5][-1,5] under μ=2\mu=2, σ=3\sigma=3, and explain both the numerical error budgets and the positive tails beyond a finite drawing.

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