Lesson 26 — The Price equation: splitting Δz̄ into two covariances UNIT 5 CORE
BIO 202, Spring 2026, draft v1. The master equation. It does not introduce a new idea — it names the one you have been computing since Lesson 3. Stage A is live; Stages B–D preview the two-level machinery the rest of Unit 5 unlocks.
Selection is the correlation. Drift is the scatter around it. There's the deterministic part — the amount to which the trait covaries with fitness, with differential reproduction. And there's the random error. Because no matter how much your trait covaries with fitness, there's going to be random stuff where things get struck by lightning. You might have a gene that makes your heart great. That doesn't help you if a tiger ate you.
— 202_lec11_01
A — One level: Δz̄ = cov(w, z) / w̄
Each dot is an individual: trait z on the x-axis, fitness w (expected copies in the next generation) on the y-axis. Set how steeply fitness depends on the trait, and watch the mean trait move.
Locked — confirm your name above to begin.
Δz̄ = cov(w, z) / w̄
Fitness vs trait (with the fitted line)
cov(w, z):— |
w̄:— |
slope of w on z = cov/var:—
Δz̄ from Price (cov/w̄):— |
Δz̄ measured directly (reweight by w):—
Many things in biology are just linear regressions. That's why I hammer linear regressions. Way more things in the world are linear regressions than people realize.— 202_lec20_01
Prediction
Q. As you make fitness depend more steeply on the trait (a steeper line of w on z), the mean trait shift Δz̄ will:
Try at least 4 different fitness slopes. 0/4
Controls
R code — selection as a covariance
set.seed(42)z <- rnorm(600) # traitw <- pmax(0.01, 1 + 0.40*z) # fitness = line of w on zcov(w, z) / mean(w) # Δz̄ — the Price equation, one levelcoef(lm(w ~ z))[2] # the same covariance, as a slope (Lesson 3)
B — Two levels: between and within
Assemble individuals into groups. Now there are two covariances at once.
Δz̄ = cov(Wk, Zk) + Ek[ cov(wi, zi | k) ] between groups within groups
Selection operates at the species level, the individual level, the cellular level, the genomic level — all manifesting at the same time. The unit of selection depends on the scope.— 202_lec29_03
Preview. The full two-level simulator — sliders for within-group selection, between-group selection, assortment r, and policing — splits Δz̄ into the two covariances above and shows a stacked bar of which term dominates. It is the same one-level engine from Stage A, run once between groups and once within. Built out alongside Lessons 27–33.
C — The diagnostic: which level is selection at?
The ratio of the between-group covariance to the within-group covariance is the diagnostic. When it crosses 1, the group becomes the unit of selection.
unit = "group" ⇔ cov(Wk, Zk) / Ek[ cov(wi, zi | k) ] > 1
Fitness is not the number of children you have. It's the number of copies of yourself in the next generation. Self is your genes, not just your body.— 461_lec28_04
Preview. The test is the Lesson 5 shuffle, one level up: permute group membership and see how often the between-group covariance beats the within-group covariance by chance. The tail fraction is the P-value for "selection is acting at the higher level." Same permutation null, different scope.
D — Re-derive Hamilton's rule
Swap the fitness function for the altruism form w(z) = 1 − c·z + b·z̄k and recompute both Price terms.
altruism favored ⇔ b · r > c
Preview. With the altruism fitness plugged into the two-level engine, Lesson 17's r·b > c falls straight out of the algebra — the kin-selection rule is the Price equation read at the relatedness scope, not a separate theory.