============================================================================== WHEN MOST PEOPLE INFECT NOBODY: OVERDISPERSION IN A BRANCHING-PROCESS OUTBREAK ============================================================================== Science Journaling Club, Volume 1 Issue 2, Winter 2025 Master seed : 20251217 Mean reproduction number R : 2.50 Dispersion grid (k), 17 values : 0.01, 0.02, 0.05, 0.1, 0.16, 0.3, 0.5, 1, 2, 5, 10, 30, 100, 300, 1000, 3000, 10000 Replicates per dispersion cell : 40000 Large-outbreak cutoff (main) : 5000 cumulative cases numpy : 2.4.2 python : 3.12.3 ============================================================================== PART 1. THE DISPERSION SWEEP: EXTINCTION, FINAL SIZE, CONCENTRATION ============================================================================== k q_analytic p_sim SE diff z | n_extinct unresolv ------------------------------------------------------------------------------ 0.01 0.984068 0.984025 0.000627 -0.000043 -0.068 | 39361 0 0.02 0.968633 0.968400 0.000875 -0.000233 -0.266 | 38736 0 0.05 0.925098 0.925050 0.001317 -0.000048 -0.036 | 37002 0 0.1 0.860685 0.861075 0.001729 0.000390 0.225 | 34443 0 0.16 0.794519 0.792450 0.002028 -0.002069 -1.020 | 31698 0 0.3 0.674836 0.673700 0.002344 -0.001136 -0.485 | 26948 0 0.5 0.558258 0.553325 0.002486 -0.004933 -1.984 | 22133 0 1 0.400000 0.399350 0.002449 -0.000650 -0.265 | 15974 0 2 0.275305 0.276300 0.002236 0.000995 0.445 | 11052 0 5 0.179170 0.180325 0.001922 0.001155 0.601 | 7213 0 10 0.143741 0.147750 0.001774 0.004009 2.259 | 5910 0 30 0.119533 0.122400 0.001639 0.002867 1.749 | 4896 0 100 0.111010 0.110800 0.001569 -0.000210 -0.134 | 4432 0 300 0.108573 0.109800 0.001563 0.001227 0.785 | 4392 0 1000 0.107721 0.104850 0.001532 -0.002871 -1.874 | 4194 0 3000 0.107477 0.107200 0.001547 -0.000277 -0.179 | 4288 0 10000 0.107392 0.105125 0.001534 -0.002267 -1.478 | 4205 0 Largest |z| across all 17 dispersion cells: 2.259 Cells with |z| > 3: 0 of 17 (expect roughly 0.05 by chance at this count) Poisson (k -> infinity) analytic extinction root : 0.10735525 (26 iterations) Largest-k NB row (k = 10000) analytic root : 0.10739178 Absolute difference : 3.65e-05 Relative difference : 3.40e-04 ============================================================================== PART 1b. FINAL SIZE AND TRANSMISSION CONCENTRATION ============================================================================== Final outbreak size is measured only among replicates that went extinct on their own (a well-defined finite random variable); replicates that escaped the 5000-case cutoff are excluded from this table, not treated as size 5000. k n_ext mean_final var_final top10%sh top20%sh P(X=0)sim P(X=0)exact ------------------------------------------------------------------------------ 0.01 39361 1.97+/-0.07 211.8+/- 45.0 100.0000% 100.0000% 0.94633 0.94624 0.02 38736 1.98+/-0.05 101.1+/- 18.2 100.0000% 100.0000% 0.90761 0.90781 0.05 37002 1.93+/-0.03 36.4+/- 3.7 94.4967% 100.0000% 0.82142 0.82153 0.1 34443 1.89+/-0.02 18.6+/- 1.5 81.9054% 96.5253% 0.72203 0.72194 0.16 31698 1.91+/-0.02 13.8+/- 1.1 71.1660% 90.3273% 0.63826 0.63779 0.3 26948 1.83+/-0.02 7.1+/- 0.4 56.9579% 78.8764% 0.51186 0.51167 0.5 22133 1.77+/-0.01 4.5+/- 0.2 47.1134% 69.1801% 0.40829 0.40825 1 15974 1.67+/-0.01 2.6+/- 0.1 37.2924% 58.0482% 0.28585 0.28571 2 11052 1.56+/-0.01 1.5+/- 0.1 30.8539% 49.9682% 0.19751 0.19753 5 7213 1.47+/-0.01 1.0+/- 0.1 26.0321% 43.8309% 0.13196 0.13169 10 5910 1.41+/-0.01 0.8+/- 0.0 24.2148% 41.3918% 0.10712 0.10737 30 4896 1.42+/-0.01 0.8+/- 0.1 23.0285% 39.6925% 0.09082 0.09060 100 4432 1.38+/-0.01 0.8+/- 0.1 22.6454% 39.0821% 0.08458 0.08465 300 4392 1.38+/-0.01 0.8+/- 0.0 22.5241% 38.9085% 0.08267 0.08294 1000 4194 1.37+/-0.01 0.7+/- 0.1 22.4957% 38.8610% 0.08250 0.08234 3000 4288 1.35+/-0.01 0.6+/- 0.0 22.4950% 38.8616% 0.08244 0.08217 10000 4205 1.36+/-0.01 0.7+/- 0.0 22.4705% 38.8266% 0.08182 0.08211 ============================================================================== PART 2. MONTE CARLO CONVERGENCE (k = 0.1, reusing its Part 1 replicates) ============================================================================== Analytic root at k = 0.1: 0.860685 n_used running_p run_SE z ------------------------------------------------------------------------------ 100 0.870000 0.033630 0.277 130 0.861538 0.030292 0.028 168 0.875000 0.025516 0.561 218 0.857798 0.023655 -0.122 283 0.855124 0.020923 -0.266 368 0.855978 0.018303 -0.257 477 0.876310 0.015074 1.037 619 0.882068 0.012963 1.649 804 0.881841 0.011384 1.858 1043 0.876318 0.010194 1.534 1353 0.869919 0.009145 1.010 1756 0.862756 0.008212 0.252 2278 0.860404 0.007261 -0.039 2956 0.857578 0.006428 -0.483 3836 0.859228 0.005615 -0.259 4977 0.859353 0.004928 -0.270 6458 0.857851 0.004345 -0.652 8380 0.861098 0.003778 0.109 10874 0.863987 0.003287 1.004 14110 0.860312 0.002918 -0.128 18309 0.861325 0.002554 0.250 23757 0.864251 0.002222 1.604 30827 0.862296 0.001963 0.821 40000 0.861075 0.001729 0.225 ============================================================================== PART 3. CONTROL COMPARISON AT MATCHED EFFORT (k0 = 0.1) ============================================================================== Baseline: R0 = 2.50, dispersion k0 = 0.10 (order of magnitude reported for SARS-CoV and SARS-CoV-2 by Lloyd-Smith et al. 2005 and Endo et al. 2020). Effort e is the fraction of the UNCONTROLLED mean transmission R0 removed, defined identically for both strategies so the comparison is at equal cost in that one specific currency (see docstring for what this does not claim). Strategy A, MEAN reduction : thin every case's transmission uniformly by retention (1-e). This is a binomial thinning of a NegBin(k0,.) variable, which is itself NegBin(k0,.) with the same k0 and mean R0*(1-e) -- thinning leaves the SHAPE of the heterogeneity untouched and only scales it down. Strategy B, VARIANCE reduction : cap any one case's secondary infections at a threshold C(e), solved numerically so E[min(X,C)] = R0*(1-e) exactly, same target mean as Strategy A at the same e, by construction. Uncontrolled (e=0) analytic extinction probability: 0.860685 effort R_eff qA_theory | pA_sim SE_A cap_C | meanB pB_sim SE_B | A-B z ------------------------------------------------------------------------------ 0.00 2.5000 0.860685 | 0.858700 0.002463 200000.00 | 2.5000 0.864000 0.002424 | -0.0053 -1.53 0.05 2.3750 0.867335 | 0.865750 0.002411 49.08 | 2.3750 0.863450 0.002428 | 0.0023 0.67 0.10 2.2500 0.874464 | 0.877850 0.002315 35.57 | 2.2500 0.859200 0.002459 | 0.0187 5.52 0.15 2.1250 0.882138 | 0.882550 0.002277 28.01 | 2.1250 0.863350 0.002429 | 0.0192 5.77 0.20 2.0000 0.890440 | 0.892800 0.002188 22.86 | 2.0000 0.860650 0.002449 | 0.0322 9.79 0.25 1.8750 0.899468 | 0.897150 0.002148 19.00 | 1.8750 0.863300 0.002429 | 0.0339 10.44 0.30 1.7500 0.909349 | 0.902300 0.002099 15.96 | 1.7500 0.867500 0.002397 | 0.0348 10.92 0.35 1.6250 0.920239 | 0.922950 0.001886 13.48 | 1.6250 0.875650 0.002333 | 0.0473 15.77 0.40 1.5000 0.932342 | 0.931750 0.001783 11.39 | 1.5000 0.881200 0.002288 | 0.0505 17.43 0.45 1.3750 0.945928 | 0.948150 0.001568 9.62 | 1.3750 0.896400 0.002155 | 0.0518 19.42 0.50 1.2500 0.961358 | 0.961000 0.001369 8.07 | 1.2500 0.914850 0.001974 | 0.0461 19.21 0.55 1.1250 0.979139 | 0.977600 0.001046 6.74 | 1.1250 0.947850 0.001572 | 0.0298 15.75 0.60 1.0000 0.999999 | 0.991800 0.000638 5.57 | 1.0000 0.985950 0.000832 | 0.0059 5.58 0.65 0.8750 1.000000 | 0.999150 0.000206 4.54 | 0.8750 0.999800 0.000100 | -0.0007 -2.84 Cells (excluding e=0) where A beats B by >2 SE : 11 Cells (excluding e=0) where B beats A by >2 SE : 1 Effort at which Strategy A alone drives R_eff to 1 (guaranteed eventual extinction regardless of dispersion): e = 1 - 1/R0 = 0.6000 ============================================================================== PART 4. OFFSPRING DISTRIBUTION SNAPSHOTS (same mean R = 2.50, two k) ============================================================================== k = 0.1 P(X=0..10): 0.7219, 0.0694, 0.0367, 0.0247, 0.0184, 0.0145, 0.0119, 0.0099, 0.0085, 0.0073, 0.0064 [P(X>10) = 0.0702] k = 10000 P(X=0..10): 0.0821, 0.2052, 0.2565, 0.2137, 0.1336, 0.0668, 0.0278, 0.0099, 0.0031, 0.0009, 0.0002 [P(X>10) = 0.0001] ============================================================================== HEADLINE NUMBERS (for the article; all read directly from the tables above) ============================================================================== R0 fixed at : 2.50 k = 0.1 (SARS/SARS-CoV-2-like) simulated extinction : 0.8611 +/- 0.0017 k = 0.1 analytic root : 0.860685 k = 10000 (near-Poisson) simulated extinction : 0.1051 +/- 0.0015 k = 10000 analytic root vs true Poisson root, abs diff : 3.65e-05 k = 0.01 (extreme) simulated extinction : 0.9840 +/- 0.0006 k = 0.1 top-10%-of-cases transmission share : 81.91% k = 0.1 top-20%-of-cases transmission share : 96.53% k = 0.1 P(a case infects exactly nobody) : 72.20% k = 10000 P(a case infects exactly nobody) : 8.18% k = 1 top-10% share : 37.29% Control comparison at effort e = 0.30: A - B = 0.0348 (z = 10.92) ============================================================================== DONE ============================================================================== Total replicates, main sweep : 680000 Total replicates, control sweep : 560000 Total wall-clock time : 45.1 s Seed: 20251217. Every number above is reproducible by rerunning this file. ==============================================================================