Lesson 26 — Splitting a change in the average into two pieces UNIT 5 CORE

One equation for the whole thing. It adds nothing new — it names the quantity you have been computing since Lesson 3.

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: how the average moves

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:

Controls

0.40
42

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

The same individuals, now sorted into groups. Each one pays for its own trait and receives according to its group's average. Two covariances appear at once, and they do not have to agree.

Δz̄  =  cov(Wk, Zk)  +  Ek[ cov(wi, zi | k) ]
            between groups        within groups

Every individual, coloured by group

between:  |  within:  |  Δz̄:

The two terms, to scale

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

Prediction

Q. Helping costs the helper and benefits its group. Set the cost above zero. The within-group term will be:

Controls

0.30
0.90
0.15

R code — one identity, run twice

Zk <- tapply(z, grp, mean)          # each group's mean traitWk <- tapply(w, grp, mean)          # each group's mean fitness# between: the identity, with groups as the individualsbetween <- cov(Wk, Zk)# within: the identity inside each group, averagedwithin  <- mean(tapply(seq_along(z), grp, function(i) cov(w[i], z[i])))(between + within) / mean(w)

C — The diagnostic: which level is selection at?

Sweep how much the groups differ from each other, and watch the two terms trade places. Somewhere in that sweep the sum crosses zero.

Both terms, across the whole sweep

groups differ (measured):  |  crossing at:
Your neurons cooperate because they're nearly genetically identical. The cost to a neuron to help another nearly identical neuron isn't actually a cost — genetically speaking. That's why thought is possible.— 202_lec30_03

Prediction

Q. Keep the cost and the benefit fixed. Make the groups differ from each other more and more. The level that ends up carrying the change is:

Controls

0.30
0.90

D — The same diagnostic, three times down the stack

Nothing new is introduced here. Stage C's two terms are computed at three places where a part and a whole are in competition. Only the biology changes, and only the dial changes with it.

The two terms, to scale

between (the whole):  |  within (the parts):
bigger term:  |  the trait:

Prediction

Q. Three different pieces of biology, three different dials. The thing that stays the same across all three is:

Controls

0.50

E — The rule you already have

Nothing is swapped in and nothing is added. The fitness rule has been the altruism one since Stage B — pay for your own trait, receive according to your group. Read the crossing off Stage C's sweep and put it beside the two dials.

At the crossing

how much the groups differ, at the crossing:
that, times the benefit:
the cost:

Where the boundary sits, across every benefit

I help a stranger have 500 more kids; I'm 1/1000 related, so I "got" half a kid. I help my sister have 500 more kids; I'm 1/2 related, so I got 250. That scaling — relatedness times benefit against cost — is Hamilton's rule. It's a derivative of the Price equation.— 202_lec30_04

Prediction

Q. You met a rule for when helping spreads back in Lesson 17, with its own three dials. Against the boundary this two-level accounting produces, that rule will be:

Controls

0.30
0.90

R code — nothing new added

w <- 1 - c*z + b*Zk[grp]        # the fitness rule since Stage B# sweep how much the groups differ, find where (between + within) crosses 0r_star <- uniroot(function(r) dz(r, b, c), c(0.02, 0.95))$rootr_star * b            # and compare it with c