# Cost-type experiment (PLAN step 3)

Does the container-crowding discount (~4 to 5 percentage points below the textbook threshold formula) depend on *how* a Wolbachia strain pays its cost—before larval crowding (`egg`), after larval crowding (`emergence`), or through adult survival (`adult-female`, `adult-both`)?

## Calibration check

For each nominal cost `sf` in `{0.10, 0.25, 0.40}`, all four modes match the same well-mixed textbook tipping point (`Theory.roots`):

- **egg**: infected females lay `(1 - sf)` as many eggs before density-dependent larval competition.
- **emergence**: infected females lay equal clutches (`1.0`); on day 10 (`emerge`), newly emerged infected adults keep with probability `(1 - sf)`.
- **adult-female**: daily infected female survival `s_i` solves `s_i^2 / (1 - s_i) = (1 - sf) * s_w^2 / (1 - s_w)` (`s_w = 0.90`, maturation day 2, laying cadence every 4 days). Exact roots (`abs_err < 2e-15`): `0.891080`, `0.874201`, `0.850991`. Infected males stay at `s_w = 0.90`.
- **adult-both**: both infected females and infected males carry survival `s_i`.

## Result (tipping-point offset from formula, 50 seeds/pt, MAXDAYS=1500)

| Mode (nearest crowding) | 10% face cost | 25% face cost | 40% face cost |
|---|---|---|---|
| **egg** (pre-crowding) | −3.94 [−4.28, −3.56] | −3.93 [−4.18, −3.67] | −1.48 [−1.92, −1.06] |
| **emergence** (post-crowding) | −2.69 [−3.02, −2.35] | +2.05 [+1.69, +2.39] | +9.35 [+8.58, +10.65] |
| **adult-female** (exact clutch survival) | −4.00 [−4.29, −3.69] | −3.40 [−3.78, −3.03] | −0.08 [−0.42, +0.26] |
| **adult-both** (both sexes survival) | −2.90 [−3.23, −2.53] | +1.73 [+1.40, +2.05] | +9.68 [+8.75, +11.23] |

Well-mixed control (`scattered`): at 25% face cost, `egg` −0.20, `emergence` +2.04, `adult-female` −1.76, `adult-both` +2.46—making the true spatial shift (`nearest - scattered`) **−3.73 pts** (`egg`), **+0.01 pts** (`emergence`), and **−1.64 pts** (`adult-female`).
