============================================================================== ABSENCE OF EVIDENCE: HOW MANY SURVEYS BEFORE A SPECIES IS 'GONE' Science Journaling Club - occupancy detection model ============================================================================== master seed : 20240921 numpy version : 2.4.2 python version : 3.12.3 replicates/config : 500,000 convergence run : 2,000,000 target false-absence rate alpha : 0.05 All random draws descend from the master seed via numpy SeedSequence. No field data. Nothing here was observed; everything was computed. ============================================================================== PART 1 MODEL H (constant p). VISITS NEEDED FOR 95% CONFIDENCE ============================================================================== Closed form: P(k blanks | occupied) = (1-p)^k ; k* = ceil(ln 0.05 / ln(1-p)) p k* exact k* int (1-p)^k* exact simulated SE sim-exact z ------------------------------------------------------------------------------ 0.05 58.40 59 0.048494525 0.048618 0.000304 +0.000123 +0.41 0.10 28.43 29 0.047101287 0.047502 0.000300 +0.000401 +1.34 0.15 18.43 19 0.045599448 0.045688 0.000295 +0.000089 +0.30 0.20 13.43 14 0.043980465 0.043912 0.000290 -0.000068 -0.24 0.25 10.41 11 0.042235136 0.041736 0.000284 -0.000499 -1.75 0.30 8.40 9 0.040353607 0.040532 0.000278 +0.000178 +0.64 0.40 5.86 6 0.046656000 0.046162 0.000298 -0.000494 -1.66 0.50 4.32 5 0.031250000 0.030976 0.000246 -0.000274 -1.11 0.60 3.27 4 0.025600000 0.025536 0.000223 -0.000064 -0.29 0.70 2.49 3 0.027000000 0.027070 0.000229 +0.000070 +0.31 0.80 1.86 2 0.040000000 0.039944 0.000277 -0.000056 -0.20 Reading: after k* visits with no detection, an occupied site still produces that record with probability <= 0.05. The 'z' column is the gap between simulation and closed form in Monte Carlo standard errors. ============================================================================== PART 2 VALIDATION GRID, MODEL H. SIMULATION vs (1-p)^k ============================================================================== Every cell with an expected blank count >= 25 is included in the summary statistics. Cells rarer than that are printed but flagged, because a Monte Carlo estimate of a probability near 1e-5 from 500,000 draws carries no useful resolution. p k exact (1-p)^k simulated SE sim-exact z flag ------------------------------------------------------------------------------ 0.05 1 0.950000000 0.949832 0.000308 -0.000168 -0.55 0.05 2 0.902500000 0.902648 0.000420 +0.000148 +0.35 0.05 3 0.857375000 0.857562 0.000495 +0.000187 +0.38 0.05 5 0.773780937 0.773712 0.000592 -0.000069 -0.12 0.05 8 0.663420431 0.664366 0.000668 +0.000946 +1.41 0.05 13 0.513342083 0.513906 0.000707 +0.000564 +0.80 0.05 21 0.340561626 0.340890 0.000670 +0.000328 +0.49 0.05 34 0.174824615 0.174666 0.000537 -0.000159 -0.30 0.05 55 0.059538555 0.059662 0.000335 +0.000123 +0.37 0.10 1 0.900000000 0.900750 0.000424 +0.000750 +1.77 0.10 2 0.810000000 0.810650 0.000555 +0.000650 +1.17 0.10 3 0.729000000 0.729754 0.000629 +0.000754 +1.20 0.10 5 0.590490000 0.591100 0.000695 +0.000610 +0.88 0.10 8 0.430467210 0.431174 0.000700 +0.000707 +1.01 0.10 13 0.254186583 0.254776 0.000616 +0.000589 +0.96 0.10 21 0.109418989 0.109544 0.000441 +0.000125 +0.28 0.10 34 0.027812839 0.028224 0.000233 +0.000411 +1.77 0.10 55 0.003043253 0.003166 0.000078 +0.000123 +1.58 0.15 1 0.850000000 0.849630 0.000505 -0.000370 -0.73 0.15 2 0.722500000 0.722326 0.000633 -0.000174 -0.27 0.15 3 0.614125000 0.614048 0.000688 -0.000077 -0.11 0.15 5 0.443705312 0.444074 0.000703 +0.000369 +0.52 0.15 8 0.272490525 0.272764 0.000630 +0.000273 +0.43 0.15 13 0.120905494 0.121078 0.000461 +0.000173 +0.37 0.15 21 0.032945601 0.033034 0.000252 +0.000088 +0.35 0.15 34 0.003983304 0.004058 0.000089 +0.000075 +0.84 0.15 55 0.000131232 0.000156 0.000016 +0.000025 +1.53 0.20 1 0.800000000 0.800590 0.000566 +0.000590 +1.04 0.20 2 0.640000000 0.640898 0.000679 +0.000898 +1.32 0.20 3 0.512000000 0.512628 0.000707 +0.000628 +0.89 0.20 5 0.327680000 0.328600 0.000664 +0.000920 +1.39 0.20 8 0.167772160 0.167970 0.000528 +0.000198 +0.37 0.20 13 0.054975581 0.054982 0.000322 +0.000006 +0.02 0.20 21 0.009223372 0.009396 0.000135 +0.000173 +1.28 0.20 34 0.000507060 0.000540 0.000032 +0.000033 +1.03 0.20 55 0.000004677 0.000008 0.000003 +0.000003 +1.09 thin 0.25 1 0.750000000 0.749266 0.000612 -0.000734 -1.20 0.25 2 0.562500000 0.560964 0.000702 -0.001536 -2.19 0.25 3 0.421875000 0.421036 0.000698 -0.000839 -1.20 0.25 5 0.237304688 0.236448 0.000602 -0.000857 -1.42 0.25 8 0.100112915 0.099764 0.000424 -0.000349 -0.82 0.25 13 0.023757264 0.023470 0.000215 -0.000287 -1.33 0.25 21 0.002378409 0.002150 0.000069 -0.000228 -3.32 0.25 34 0.000056504 0.000052 0.000011 -0.000005 -0.42 0.25 55 0.000000134 0.000000 0.000001 -0.000000 -0.26 thin 0.30 1 0.700000000 0.699870 0.000648 -0.000130 -0.20 0.30 2 0.490000000 0.489838 0.000707 -0.000162 -0.23 0.30 3 0.343000000 0.343174 0.000671 +0.000174 +0.26 0.30 5 0.168070000 0.167940 0.000529 -0.000130 -0.25 0.30 8 0.057648010 0.057850 0.000330 +0.000202 +0.61 0.30 13 0.009688901 0.009690 0.000139 +0.000001 +0.01 0.30 21 0.000558546 0.000556 0.000033 -0.000003 -0.08 0.30 34 0.000005412 0.000008 0.000003 +0.000003 +0.79 thin 0.30 55 0.000000003 0.000000 0.000000 -0.000000 -0.04 thin 0.40 1 0.600000000 0.599882 0.000693 -0.000118 -0.17 0.40 2 0.360000000 0.359650 0.000679 -0.000350 -0.52 0.40 3 0.216000000 0.215618 0.000582 -0.000382 -0.66 0.40 5 0.077760000 0.077198 0.000379 -0.000562 -1.48 0.40 8 0.016796160 0.016578 0.000182 -0.000218 -1.20 0.40 13 0.001306069 0.001292 0.000051 -0.000014 -0.28 0.40 21 0.000021937 0.000024 0.000007 +0.000002 +0.31 thin 0.40 34 0.000000029 0.000000 0.000000 -0.000000 -0.12 thin 0.40 55 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.50 1 0.500000000 0.500214 0.000707 +0.000214 +0.30 0.50 2 0.250000000 0.249442 0.000612 -0.000558 -0.91 0.50 3 0.125000000 0.124152 0.000468 -0.000848 -1.81 0.50 5 0.031250000 0.030976 0.000246 -0.000274 -1.11 0.50 8 0.003906250 0.003848 0.000088 -0.000058 -0.66 0.50 13 0.000122070 0.000112 0.000016 -0.000010 -0.64 0.50 21 0.000000477 0.000000 0.000001 -0.000000 -0.49 thin 0.50 34 0.000000000 0.000000 0.000000 -0.000000 -0.01 thin 0.50 55 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.60 1 0.400000000 0.399818 0.000693 -0.000182 -0.26 0.60 2 0.160000000 0.159350 0.000518 -0.000650 -1.25 0.60 3 0.064000000 0.063686 0.000346 -0.000314 -0.91 0.60 5 0.010240000 0.010044 0.000142 -0.000196 -1.38 0.60 8 0.000655360 0.000650 0.000036 -0.000005 -0.15 0.60 13 0.000006711 0.000008 0.000004 +0.000001 +0.35 thin 0.60 21 0.000000004 0.000000 0.000000 -0.000000 -0.05 thin 0.60 34 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.60 55 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.70 1 0.300000000 0.299808 0.000648 -0.000192 -0.30 0.70 2 0.090000000 0.090110 0.000405 +0.000110 +0.27 0.70 3 0.027000000 0.027070 0.000229 +0.000070 +0.31 0.70 5 0.002430000 0.002548 0.000070 +0.000118 +1.69 0.70 8 0.000065610 0.000074 0.000011 +0.000008 +0.73 0.70 13 0.000000159 0.000000 0.000001 -0.000000 -0.28 thin 0.70 21 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.70 34 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.70 55 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.80 1 0.200000000 0.200274 0.000566 +0.000274 +0.48 0.80 2 0.040000000 0.039944 0.000277 -0.000056 -0.20 0.80 3 0.008000000 0.007898 0.000126 -0.000102 -0.81 0.80 5 0.000320000 0.000302 0.000025 -0.000018 -0.71 0.80 8 0.000002560 0.000006 0.000002 +0.000003 +1.52 thin 0.80 13 0.000000001 0.000000 0.000000 -0.000000 -0.02 thin 0.80 21 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.80 34 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin 0.80 55 0.000000000 0.000000 0.000000 -0.000000 -0.00 thin ------------------------------------------------------------------------------ usable cells : 76 mean z : +0.0044 (expected 0) sd of z : 0.9997 (expected 1) max |z| : 3.3157 cells with |z| > 3 : 1 of 76 cells with |z| > 2 : 2 of 76 (expect about 3.5) CAUTION ON THE MEAN. The cells in one row of this table all come from the same 500,000 simulated sites, so their z values are strongly positively correlated: a run of sites that happens to miss a little too often pushes every k in that row the same way. Averaging all 76 cells therefore does NOT have standard error 1/sqrt(76). The independent test uses one anchor cell per p value (the largest k with enough resolution). independent anchors : 11 mean anchor z : +0.2692 (SE 0.3015, so 0.89 SE from 0) sd of anchor z : 0.8350 VERDICT: simulation reproduces (1-p)^k within Monte Carlo error. ============================================================================== PART 3 CONVERGENCE OF THE MONTE CARLO ESTIMATE ============================================================================== configuration: p = 0.2, k = 13 exact (1-p)^k = 0.054975581389 replicates running est. error 2 SE |err|/SE inside 2SE ------------------------------------------------------------------------------ 25,000 0.05480000 -0.00017558 0.00288314 0.12 yes 50,000 0.05506000 +0.00008442 0.00203869 0.08 yes 75,000 0.05474667 -0.00022891 0.00166458 0.28 yes 100,000 0.05477000 -0.00020558 0.00144157 0.29 yes 150,000 0.05443333 -0.00054225 0.00117704 0.92 yes 200,000 0.05453500 -0.00044058 0.00101935 0.86 yes 300,000 0.05472333 -0.00025225 0.00083229 0.61 yes 400,000 0.05492250 -0.00005308 0.00072079 0.15 yes 500,000 0.05479800 -0.00017758 0.00064469 0.55 yes 700,000 0.05499143 +0.00001585 0.00054486 0.06 yes 1,000,000 0.05498700 +0.00001142 0.00045587 0.05 yes 1,250,000 0.05504800 +0.00007242 0.00040774 0.36 yes 1,500,000 0.05502533 +0.00004975 0.00037221 0.27 yes 1,750,000 0.05520400 +0.00022842 0.00034460 1.33 yes 2,000,000 0.05513850 +0.00016292 0.00032235 1.01 yes The error shrinks like 1/sqrt(N): a hundredfold increase in replicates buys a tenfold reduction. This is the whole reason the closed form is worth having. ============================================================================== PART 4 MODEL V. DETECTION REDRAWN FROM Beta EVERY VISIT ============================================================================== Claim to test: if p_j ~ Beta(a,b) independently at each visit, the false-absence probability is exactly (1 - pbar)^k, i.e. heterogeneity that reshuffles between visits costs nothing at all. pbar kappa SD(p) k (1-pbar)^k simulated diff z ------------------------------------------------------------------------------ 0.20 2.0 0.2309 1 0.80000000 0.800268 +0.000268 +0.47 0.20 2.0 0.2309 3 0.51200000 0.511508 -0.000492 -0.70 0.20 2.0 0.2309 6 0.26214400 0.262068 -0.000076 -0.12 0.20 2.0 0.2309 10 0.10737418 0.107316 -0.000058 -0.13 0.20 2.0 0.2309 14 0.04398047 0.044292 +0.000312 +1.07 0.20 20.0 0.0873 1 0.80000000 0.800582 +0.000582 +1.03 0.20 20.0 0.0873 3 0.51200000 0.511604 -0.000396 -0.56 0.20 20.0 0.0873 6 0.26214400 0.262258 +0.000114 +0.18 0.20 20.0 0.0873 10 0.10737418 0.107230 -0.000144 -0.33 0.20 20.0 0.0873 14 0.04398047 0.044202 +0.000222 +0.76 0.40 2.0 0.2828 1 0.60000000 0.600130 +0.000130 +0.19 0.40 2.0 0.2828 3 0.21600000 0.215760 -0.000240 -0.41 0.40 2.0 0.2828 6 0.04665600 0.046998 +0.000342 +1.15 0.40 2.0 0.2828 10 0.00604662 0.006074 +0.000027 +0.25 0.40 2.0 0.2828 14 0.00078364 0.000770 -0.000014 -0.34 0.40 20.0 0.1069 1 0.60000000 0.599434 -0.000566 -0.82 0.40 20.0 0.1069 3 0.21600000 0.215822 -0.000178 -0.31 0.40 20.0 0.1069 6 0.04665600 0.047408 +0.000752 +2.52 0.40 20.0 0.1069 10 0.00604662 0.006212 +0.000165 +1.51 0.40 20.0 0.1069 14 0.00078364 0.000840 +0.000056 +1.42 ------------------------------------------------------------------------------ max |z| across Model V cells : 2.521 mean z over all cells : +0.3421 (cells correlated within a row) mean anchor z (4 independent): +0.7294 (SE 0.500, 1.46 SE from 0) Confirmed. Per-visit variation in p is invisible in the false-absence rate. Only the mean matters. That is a result about WHICH kind of heterogeneity you should worry about. ============================================================================== PART 5 MODEL S. ONE p PER SITE, HELD FOR EVERY VISIT ============================================================================== Three independent routes to the same number: (a) simulation, 500,000 sites; (b) closed form E[(1-p)^k] = B(a, b+k) / B(a, b) via lgamma; (c) tanh-sinh (double exponential) quadrature of both the numerator and the normalising integral, using no gamma function at all. Route (c) started life as a Gauss-Legendre scheme with the endpoint singularity substituted away. It disagreed with route (b) by up to 8.6e-01 in the kappa = 100 rows, which is not a finding, it is a bug: the substitution cures a singularity at one end and manufactures an infinite derivative at the other whenever the exponent exceeds 1. The comment block above p_miss_site_quad records the failure. Quadrature self-test: log of the Beta integral against lgamma. a b quadrature lgamma diff ------------------------------------------------------------------------------ 0.20 1.80 1.452979949516 1.452979949516 6.66e-16 0.50 4.50 -0.151952316581 -0.151952316581 1.50e-15 1.00 9.00 -2.197224577336 -2.197224577336 1.33e-15 4.00 36.00 -12.703825187728 -12.703825187728 1.78e-15 10.00 90.00 -32.679547939615 -32.679547939615 3.55e-14 60.00 40.00 -67.968616247482 -67.968616247482 4.26e-14 2.00 3.00 -2.484906649788 -2.484906649788 4.44e-16 pbar kap k closed form quadrature |cf-quad| simulated SE z flag ------------------------------------------------------------------------------ 0.10 2.0 1 0.900000000 0.900000000 5.55e-16 0.899116 0.000424 -2.08 0.10 2.0 3 0.798000000 0.798000000 5.55e-16 0.797756 0.000568 -0.43 0.10 2.0 6 0.719385600 0.719385600 6.66e-16 0.719508 0.000635 +0.19 0.10 2.0 10 0.659878023 0.659878023 1.11e-16 0.659826 0.000670 -0.08 0.10 2.0 20 0.581809751 0.581809751 3.22e-15 0.582044 0.000698 +0.34 0.10 2.0 40 0.509881481 0.509881481 5.55e-15 0.510144 0.000707 +0.37 0.10 2.0 80 0.445395606 0.445395606 4.50e-15 0.445592 0.000703 +0.28 0.10 2.0 150 0.393410555 0.393410555 5.74e-14 0.393296 0.000691 -0.17 0.10 5.0 1 0.900000000 0.900000000 1.89e-15 0.899242 0.000424 -1.79 0.10 5.0 3 0.766071429 0.766071429 4.44e-16 0.765122 0.000599 -1.59 0.10 5.0 6 0.644377790 0.644377790 1.11e-16 0.643392 0.000677 -1.46 0.10 5.0 10 0.546545301 0.546545301 1.11e-16 0.544844 0.000704 -2.42 0.10 5.0 20 0.418986067 0.418986067 1.50e-15 0.418090 0.000698 -1.28 0.10 5.0 40 0.310175068 0.310175068 1.83e-15 0.309450 0.000654 -1.11 0.10 5.0 80 0.224792117 0.224792117 1.93e-14 0.223794 0.000590 -1.69 0.10 5.0 150 0.166132315 0.166132315 1.17e-14 0.165094 0.000526 -1.97 0.10 20.0 1 0.900000000 0.900000000 1.55e-15 0.900316 0.000424 +0.74 0.10 20.0 3 0.740259740 0.740259740 1.89e-15 0.739494 0.000620 -1.23 0.10 20.0 6 0.570000000 0.570000000 2.55e-15 0.569502 0.000700 -0.71 0.10 20.0 10 0.421182266 0.421182266 3.00e-15 0.420752 0.000698 -0.62 0.10 20.0 20 0.230769231 0.230769231 1.25e-15 0.230028 0.000596 -1.24 0.10 20.0 40 0.099941555 0.099941555 4.00e-15 0.099346 0.000424 -1.40 0.10 20.0 80 0.035250464 0.035250464 1.60e-16 0.035188 0.000261 -0.24 0.10 20.0 150 0.012045647 0.012045647 1.18e-16 0.011886 0.000154 -1.03 0.10 100.0 1 0.900000000 0.900000000 5.12e-14 0.900120 0.000424 +0.28 0.10 100.0 3 0.731391963 0.731391963 0.00e+00 0.731362 0.000627 -0.05 0.10 100.0 6 0.540038507 0.540038507 2.69e-14 0.540346 0.000705 +0.44 0.10 100.0 10 0.365417270 0.365417270 1.82e-14 0.364050 0.000681 -2.01 0.10 100.0 20 0.146427529 0.146427529 1.25e-14 0.145380 0.000500 -2.10 0.10 100.0 40 0.029246791 0.029246791 4.16e-16 0.028570 0.000238 -2.84 0.10 100.0 80 0.002162442 0.002162442 7.68e-17 0.002018 0.000066 -2.20 0.10 100.0 150 0.000074101 0.000074101 4.74e-18 0.000054 0.000012 -1.65 0.20 2.0 1 0.800000000 0.800000000 0.00e+00 0.800904 0.000566 +1.60 0.20 2.0 3 0.624000000 0.624000000 1.11e-16 0.624136 0.000685 +0.20 0.20 2.0 6 0.505190400 0.505190400 5.55e-16 0.505950 0.000707 +1.07 0.20 2.0 10 0.424247263 0.424247263 5.55e-17 0.424812 0.000699 +0.81 0.20 2.0 20 0.329255277 0.329255277 1.11e-16 0.329748 0.000665 +0.74 0.20 2.0 40 0.252647147 0.252647147 9.44e-16 0.253180 0.000615 +0.87 0.20 2.0 80 0.192690740 0.192690740 2.83e-15 0.192444 0.000558 -0.44 0.20 2.0 150 0.150301095 0.150301095 1.11e-14 0.149716 0.000505 -1.16 0.20 5.0 1 0.800000000 0.800000000 1.89e-15 0.800016 0.000566 +0.03 0.20 5.0 3 0.571428571 0.571428571 2.22e-16 0.571280 0.000700 -0.21 0.20 5.0 6 0.400000000 0.400000000 1.17e-15 0.399428 0.000693 -0.83 0.20 5.0 10 0.285714286 0.285714286 9.44e-16 0.285686 0.000639 -0.04 0.20 5.0 20 0.166666667 0.166666667 1.11e-16 0.167216 0.000527 +1.04 0.20 5.0 40 0.090909091 0.090909091 4.86e-16 0.091244 0.000407 +0.82 0.20 5.0 80 0.047619048 0.047619048 1.69e-15 0.047758 0.000301 +0.46 0.20 5.0 150 0.025974026 0.025974026 3.00e-15 0.026092 0.000225 +0.52 0.20 20.0 1 0.800000000 0.800000000 0.00e+00 0.799764 0.000566 -0.42 0.20 20.0 3 0.529870130 0.529870130 1.89e-15 0.529518 0.000706 -0.50 0.20 20.0 6 0.306403162 0.306403162 1.05e-15 0.306588 0.000652 +0.28 0.20 20.0 10 0.163193129 0.163193129 0.00e+00 0.163274 0.000523 +0.15 0.20 20.0 20 0.047124047 0.047124047 0.00e+00 0.047200 0.000300 +0.25 0.20 20.0 40 0.008516323 0.008516323 2.43e-16 0.008526 0.000130 +0.07 0.20 20.0 80 0.001029653 0.001029653 6.77e-17 0.001028 0.000045 -0.04 0.20 20.0 150 0.000118188 0.000118188 1.48e-18 0.000104 0.000015 -0.92 0.20 100.0 1 0.800000000 0.800000000 1.14e-14 0.799998 0.000566 -0.00 0.20 100.0 3 0.515783343 0.515783343 2.20e-14 0.515946 0.000707 +0.23 0.20 100.0 6 0.271758886 0.271758886 7.72e-15 0.272114 0.000629 +0.56 0.20 100.0 10 0.119270830 0.119270830 4.25e-15 0.119218 0.000458 -0.12 0.20 100.0 20 0.017464533 0.017464533 7.42e-16 0.017556 0.000185 +0.49 0.20 100.0 40 0.000604779 0.000604779 0.00e+00 0.000598 0.000035 -0.19 0.20 100.0 80 0.000002754 0.000002754 1.95e-20 0.000002 0.000002 -0.32 thin 0.20 100.0 150 0.000000003 0.000000003 1.16e-22 0.000000 0.000000 -0.04 thin 0.40 2.0 1 0.600000000 0.600000000 1.11e-16 0.599706 0.000693 -0.42 0.40 2.0 3 0.352000000 0.352000000 2.78e-16 0.352002 0.000675 +0.00 0.40 2.0 6 0.226969600 0.226969600 0.00e+00 0.226586 0.000592 -0.65 0.40 2.0 10 0.158773076 0.158773076 5.00e-16 0.158662 0.000517 -0.21 0.40 2.0 20 0.094981676 0.094981676 3.05e-16 0.094586 0.000415 -0.95 0.40 2.0 40 0.055718697 0.055718697 3.96e-16 0.055108 0.000324 -1.88 0.40 2.0 80 0.032348937 0.032348937 2.29e-16 0.031876 0.000250 -1.89 0.40 2.0 150 0.019663721 0.019663721 1.14e-16 0.019552 0.000196 -0.57 0.40 5.0 1 0.600000000 0.600000000 5.55e-16 0.599444 0.000693 -0.80 0.40 5.0 3 0.285714286 0.285714286 0.00e+00 0.285532 0.000639 -0.29 0.40 5.0 6 0.133333333 0.133333333 5.55e-17 0.132616 0.000481 -1.49 0.40 5.0 10 0.065934066 0.065934066 3.75e-16 0.066034 0.000351 +0.28 0.40 5.0 20 0.021739130 0.021739130 4.51e-17 0.021718 0.000206 -0.10 0.40 5.0 40 0.006342495 0.006342495 2.26e-17 0.006376 0.000112 +0.30 0.40 5.0 80 0.001721170 0.001721170 1.59e-16 0.001770 0.000059 +0.83 0.40 5.0 150 0.000509295 0.000509295 5.89e-17 0.000538 0.000032 +0.90 0.40 20.0 1 0.600000000 0.600000000 3.22e-15 0.600208 0.000693 +0.30 0.40 20.0 3 0.236363636 0.236363636 4.16e-16 0.237372 0.000601 +1.68 0.40 20.0 6 0.069881423 0.069881423 2.36e-16 0.069918 0.000361 +0.10 0.40 20.0 10 0.017609377 0.017609377 1.25e-16 0.017866 0.000186 +1.38 0.40 20.0 20 0.001228501 0.001228501 4.34e-18 0.001210 0.000050 -0.37 0.40 20.0 40 0.000034085 0.000034085 7.25e-19 0.000034 0.000008 -0.01 thin 0.40 20.0 80 0.000000441 0.000000441 2.98e-20 0.000000 0.000001 -0.47 thin 0.40 20.0 150 0.000000005 0.000000005 3.47e-22 0.000000 0.000000 -0.05 thin 0.40 100.0 1 0.600000000 0.600000000 4.26e-14 0.599506 0.000693 -0.71 0.40 100.0 3 0.220267909 0.220267909 0.00e+00 0.219952 0.000586 -0.54 0.40 100.0 6 0.051324561 0.051324561 7.29e-16 0.051238 0.000312 -0.28 0.40 100.0 10 0.007975577 0.007975577 6.80e-16 0.007954 0.000126 -0.17 0.40 100.0 20 0.000107995 0.000107995 4.61e-18 0.000106 0.000015 -0.14 0.40 100.0 40 0.000000065 0.000000065 2.79e-21 0.000000 0.000000 -0.18 thin 0.40 100.0 80 0.000000000 0.000000000 8.28e-27 0.000000 0.000000 -0.00 thin 0.40 100.0 150 0.000000000 0.000000000 2.24e-32 0.000000 0.000000 -0.00 thin 0.60 2.0 1 0.400000000 0.400000000 1.67e-16 0.400732 0.000693 +1.06 0.60 2.0 3 0.168000000 0.168000000 1.39e-16 0.168388 0.000529 +0.73 0.60 2.0 6 0.084633600 0.084633600 8.33e-17 0.084848 0.000394 +0.54 0.60 2.0 10 0.048879854 0.048879854 6.25e-17 0.048752 0.000305 -0.42 0.60 2.0 20 0.022377298 0.022377298 9.02e-17 0.022356 0.000209 -0.10 0.60 2.0 40 0.009997676 0.009997676 1.25e-16 0.009952 0.000141 -0.32 0.60 2.0 80 0.004409857 0.004409857 1.10e-16 0.004380 0.000094 -0.32 0.60 2.0 150 0.002087059 0.002087059 2.91e-16 0.002126 0.000065 +0.60 0.60 5.0 1 0.400000000 0.400000000 8.88e-16 0.398998 0.000693 -1.45 0.60 5.0 3 0.114285714 0.114285714 2.50e-16 0.112996 0.000450 -2.87 0.60 5.0 6 0.033333333 0.033333333 4.16e-17 0.032904 0.000254 -1.69 0.60 5.0 10 0.010989011 0.010989011 1.91e-17 0.010730 0.000147 -1.76 0.60 5.0 20 0.001976285 0.001976285 6.94e-18 0.001880 0.000063 -1.53 0.60 5.0 40 0.000302024 0.000302024 3.20e-18 0.000306 0.000025 +0.16 0.60 5.0 80 0.000041980 0.000041980 2.46e-18 0.000044 0.000009 +0.22 thin 0.60 5.0 150 0.000006701 0.000006701 6.67e-19 0.000002 0.000004 -1.28 thin 0.60 20.0 1 0.400000000 0.400000000 0.00e+00 0.399748 0.000693 -0.36 0.60 20.0 3 0.077922078 0.077922078 2.78e-16 0.077824 0.000379 -0.26 0.60 20.0 6 0.009689441 0.009689441 3.47e-17 0.009758 0.000139 +0.49 0.60 20.0 10 0.000970943 0.000970943 1.72e-17 0.001038 0.000044 +1.52 0.60 20.0 20 0.000012884 0.000012884 1.83e-19 0.000012 0.000005 -0.17 thin 0.60 20.0 40 0.000000045 0.000000045 3.18e-22 0.000000 0.000000 -0.15 thin 0.60 20.0 80 0.000000000 0.000000000 3.10e-24 0.000000 0.000000 -0.01 thin 0.60 20.0 150 0.000000000 0.000000000 1.04e-26 0.000000 0.000000 -0.00 thin 0.60 100.0 1 0.400000000 0.400000000 5.66e-15 0.399402 0.000693 -0.86 0.60 100.0 3 0.066860804 0.066860804 0.00e+00 0.066470 0.000353 -1.11 0.60 100.0 6 0.005061105 0.005061105 0.00e+00 0.005266 0.000100 +2.04 0.60 100.0 10 0.000192752 0.000192752 1.10e-17 0.000236 0.000020 +2.20 0.60 100.0 20 0.000000114 0.000000114 3.24e-21 0.000000 0.000000 -0.24 thin 0.60 100.0 40 0.000000000 0.000000000 4.23e-26 0.000000 0.000000 -0.00 thin 0.60 100.0 80 0.000000000 0.000000000 6.47e-35 0.000000 0.000000 -0.00 thin 0.60 100.0 150 0.000000000 0.000000000 7.69e-45 0.000000 0.000000 -0.00 thin ------------------------------------------------------------------------------ max |closed form - quadrature| over all cells : 5.740e-14 usable simulation cells : 110 mean z : -0.3161 sd of z : 1.0321 max |z| : 2.8664 cells with |z| > 3 : 0 cells with |z| > 2 : 9 (expect about 5.0) Same caution as Part 2: the eight k values in one configuration share the same 500,000 simulated sites and are correlated, and here the correlation is stronger still, because a site's p is fixed for life, so one unlucky draw of site-level p values tilts the whole row. The mean of all 110 cells is therefore not a 110-fold-precise test. The independent statistic is one anchor cell per configuration. independent anchors : 16 mean anchor z : -0.1415 (SE 0.2500, 0.57 SE from 0) sd of anchor z : 1.1181 VERDICT: all three routes agree. Closed form and quadrature agree to machine precision; the simulation agrees with both inside MC error. ============================================================================== PART 6 HOW MUCH DOES PERSISTENT HETEROGENEITY INFLATE THE EFFORT? ============================================================================== k* is the visits needed for a false-absence rate of 0.05. The naive answer uses the mean detection probability and equation (2). The honest answer inverts equation (4). The ratio is the inflation factor. pbar kappa SD(p) a b k* naive k* Model S inflation ------------------------------------------------------------------------------ 0.10 1.0 0.2121 0.100 0.900 28.43 5.471e+12 1.924e+11 0.10 2.0 0.1732 0.200 1.800 28.43 4.566e+06 160576.28 0.10 5.0 0.1225 0.500 4.500 28.43 1,698.7 59.74 0.10 10.0 0.0905 1.000 9.000 28.43 171.0 6.01 0.10 20.0 0.0655 2.000 18.000 28.43 64.2 2.26 0.10 50.0 0.0420 5.000 45.000 28.43 38.5 1.36 0.10 100.0 0.0299 10.000 90.000 28.43 33.0 1.16 0.10 1000.0 0.0095 100.000 900.000 28.43 28.8 1.01 0.20 1.0 0.2828 0.200 0.800 13.43 1.496e+06 111439.15 0.20 2.0 0.2309 0.400 1.600 13.43 2,369.1 176.47 0.20 5.0 0.1633 1.000 4.000 13.43 76.0 5.66 0.20 10.0 0.1206 2.000 8.000 13.43 29.5 2.19 0.20 20.0 0.0873 4.000 16.000 13.43 19.4 1.45 0.20 50.0 0.0560 10.000 40.000 13.43 15.5 1.15 0.20 100.0 0.0398 20.000 80.000 13.43 14.4 1.07 0.20 1000.0 0.0126 200.000 800.000 13.43 13.5 1.01 0.40 1.0 0.3464 0.400 0.600 5.86 660.7 112.66 0.40 2.0 0.2828 0.800 1.200 5.86 46.0 7.84 0.40 5.0 0.2000 2.000 3.000 5.86 12.0 2.05 0.40 10.0 0.1477 4.000 6.000 5.86 8.2 1.40 0.40 20.0 0.1069 8.000 12.000 5.86 6.9 1.18 0.40 50.0 0.0686 20.000 30.000 5.86 6.3 1.07 0.40 100.0 0.0487 40.000 60.000 5.86 6.1 1.03 0.40 1000.0 0.0155 400.000 600.000 5.86 5.9 1.00 0.60 1.0 0.3464 0.600 0.400 3.27 38.9 11.89 0.60 2.0 0.2828 1.200 0.800 3.27 9.8 3.00 0.60 5.0 0.2000 3.000 2.000 3.27 4.9 1.49 0.60 10.0 0.1477 6.000 4.000 3.27 4.0 1.21 0.60 20.0 0.1069 12.000 8.000 3.27 3.6 1.10 0.60 50.0 0.0686 30.000 20.000 3.27 3.4 1.04 0.60 100.0 0.0487 60.000 40.000 3.27 3.3 1.02 0.60 1000.0 0.0155 600.000 400.000 3.27 3.3 1.00 Why the numbers explode. For large k, B(a,b+k)/B(a,b) behaves like E[(1-p)^k] ~ [Gamma(a+b)/Gamma(b)] * k^(-a), a POWER LAW in k, not a geometric decay. Once the Beta puts real weight near p = 0, a fraction of sites are effectively undetectable and no amount of repeat visiting drives the blank-record probability to zero at the rate the naive formula promises. Asymptotic check against the exact inversion: pbar kappa a k* exact k* asymptotic rel. err ------------------------------------------------------------------------------ 0.10 1.0 0.100 5.471e+12 5.273e+12 -0.0362 0.10 2.0 0.200 4.566e+06 4.566e+06 +0.0000 0.10 5.0 0.500 1,698.7 1,702.9 +0.0025 0.20 1.0 0.200 1.496e+06 1.496e+06 +0.0000 0.20 2.0 0.400 2,369.1 2,370.4 +0.0005 0.20 5.0 1.000 76.0 80.0 +0.0526 0.40 1.0 0.400 660.7 661.0 +0.0005 0.40 2.0 0.800 46.0 47.1 +0.0239 0.40 5.0 2.000 12.0 15.5 +0.2910 ============================================================================== PART 7 WHAT 20 BLANK VISITS ACTUALLY BUY YOU ============================================================================== Survey budgets are finite. Fix k = 20 blank visits and ask what the false-absence probability really is, naive answer beside Model S. pbar kappa naive (1-pbar)^20 Model S closed simulated SE ratio S/naive ------------------------------------------------------------------------------ 0.10 2.0 0.121576655 0.581809751 0.582044 0.000698 4.8 0.10 5.0 0.121576655 0.418986067 0.418090 0.000698 3.4 0.10 20.0 0.121576655 0.230769231 0.230028 0.000596 1.9 0.10 100.0 0.121576655 0.146427529 0.145380 0.000500 1.2 0.20 2.0 0.011529215 0.329255277 0.329748 0.000665 28.6 0.20 5.0 0.011529215 0.166666667 0.167216 0.000527 14.5 0.20 20.0 0.011529215 0.047124047 0.047200 0.000300 4.1 0.20 100.0 0.011529215 0.017464533 0.017556 0.000185 1.5 0.40 2.0 0.000036562 0.094981676 0.094586 0.000415 2597.9 0.40 5.0 0.000036562 0.021739130 0.021718 0.000206 594.6 0.40 20.0 0.000036562 0.001228501 0.001210 0.000050 33.6 0.40 100.0 0.000036562 0.000107995 0.000106 0.000015 3.0 0.60 2.0 0.000000011 0.022377298 0.022356 0.000209 2035203.4 0.60 5.0 0.000000011 0.001976285 0.001880 0.000063 179742.0 0.60 20.0 0.000000011 0.000012884 0.000012 0.000005 1171.8 0.60 100.0 0.000000011 0.000000114 0.000000 0.000000 10.4 ============================================================================== PART 8 CONVERGENCE, MODEL S ============================================================================== configuration: pbar = 0.2, kappa = 5.0 (a = 1.0, b = 4.0), k = 20 closed form = 0.166666666667 quadrature = 0.166666666667 replicates running est. error 2 SE |err|/SE inside 2SE ------------------------------------------------------------------------------ 25,000 0.16468000 -0.00198667 0.00471405 0.84 yes 50,000 0.16702000 +0.00035333 0.00333333 0.21 yes 75,000 0.16748000 +0.00081333 0.00272166 0.60 yes 100,000 0.16710000 +0.00043333 0.00235702 0.37 yes 150,000 0.16664000 -0.00002667 0.00192450 0.03 yes 200,000 0.16569000 -0.00097667 0.00166667 1.17 yes 300,000 0.16659000 -0.00007667 0.00136083 0.11 yes 400,000 0.16669000 +0.00002333 0.00117851 0.04 yes 500,000 0.16658200 -0.00008467 0.00105409 0.16 yes 700,000 0.16642714 -0.00023952 0.00089087 0.54 yes 1,000,000 0.16654500 -0.00012167 0.00074536 0.33 yes 1,250,000 0.16648640 -0.00018027 0.00066667 0.54 yes 1,500,000 0.16643800 -0.00022867 0.00060858 0.75 yes 1,750,000 0.16634400 -0.00032267 0.00056344 1.15 yes 2,000,000 0.16643750 -0.00022917 0.00052705 0.87 yes ============================================================================== PART 9 POSTSCRIPT: FROM 'A BLANK RECORD IS UNLIKELY' TO 'IT IS GONE' ============================================================================== Everything above is conditional on the site being occupied. The statement a conservation manager wants is the other way round. With a prior probability psi that the site is occupied, Bayes gives P(occupied | k blanks) = psi (1-p)^k / [ psi (1-p)^k + (1 - psi) ] Visits needed for P(occupied | k blanks) <= 0.05, by prior: p psi=0.9 psi=0.7 psi=0.5 psi=0.3 psi=0.1 conditional k* ------------------------------------------------------------------------------ 0.05 101 74 58 41 15 59 0.10 49 36 28 20 8 29 0.20 24 17 14 10 4 14 0.30 15 11 9 6 3 9 0.50 8 6 5 4 2 5 0.80 4 3 2 2 1 2 A low prior does most of the work. If you already believed the species was probably gone, a few blanks finish the argument; if you believed it was probably there, no realistic number of blanks will move you. That is not a flaw in the arithmetic, it is what the arithmetic is for. ============================================================================== PART 10 CHECK AGAINST PUBLISHED SURVEY NUMBERS ============================================================================== Kery (2002, J. Wildl. Manage. 66:330-338) surveyed three European snake species over 645 visits to 87 sites and published both the per-visit detection probabilities for small populations and the number of visits needed to infer absence with 95 percent confidence. Those are exactly the two quantities equation (2) links, so his table is a free external test of our arithmetic. We did not fit anything to his data; we put his p into our formula and compare the answer with the number he printed. species p published our k* Kery k* diff p band consistent with Kery k* ------------------------------------------------------------------------------ Vipera aspis (asp viper) 0.23 12 12 +0 0.2209 to 0.2384 Coronella austriaca (smooth snake) 0.09 32 34 -2 0.0843 to 0.0868 Natrix natrix (grass snake) 0.11 26 26 +0 0.1088 to 0.1129 Two of the three land exactly on the published value. The smooth snake is two visits short: our formula at p = 0.09 gives 32, Kery prints 34. Inverting his 34 says the detection probability behind it was somewhere in 0.0843 to 0.0868. The midpoint of that band, 0.0855, rounds to the 0.09 printed in his table. So the two-visit gap is consistent with rounding in the published detection probability rather than a disagreement about the model, but we cannot prove that from the printed table alone, and we would rather show the gap than quietly drop the one row that did not match. ============================================================================== PART 11 FIGURE DATA ============================================================================== [FIG1] false-absence curves (1-p)^k, closed form, k = 0..60 p,0,5,10,15,20,25,30,35,40,45,50,55,60 0.05,1.000000,0.773781,0.598737,0.463291,0.358486,0.277390,0.214639,0.166083,0.128512,0.099440,0.076945,0.059539,0.046070 0.1,1.000000,0.590490,0.348678,0.205891,0.121577,0.071790,0.042391,0.025032,0.014781,0.008728,0.005154,0.003043,0.001797 0.2,1.000000,0.327680,0.107374,0.035184,0.011529,0.003778,0.001238,0.000406,0.000133,0.000044,0.000014,0.000005,0.000002 0.4,1.000000,0.077760,0.006047,0.000470,0.000037,0.000003,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000 0.8,1.000000,0.000320,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000 [FIG2] k* against p (continuous and integer) p,k_star_cont,k_star_int 0.05,58.4040,59 0.075,38.4258,39 0.1,28.4332,29 0.125,22.4347,23 0.15,18.4331,19 0.2,13.4251,14 0.25,10.4133,11 0.3,8.3991,9 0.35,6.9542,7 0.4,5.8645,6 0.5,4.3219,5 0.6,3.2694,4 0.7,2.4882,3 0.8,1.8614,2 [FIG3] convergence, Model H, p=0.20 k=13 exact,0.0549755814 n,estimate,error,se 25000,0.05480000,-0.00017558,0.00144157 50000,0.05506000,+0.00008442,0.00101935 75000,0.05474667,-0.00022891,0.00083229 100000,0.05477000,-0.00020558,0.00072079 150000,0.05443333,-0.00054225,0.00058852 200000,0.05453500,-0.00044058,0.00050967 300000,0.05472333,-0.00025225,0.00041615 400000,0.05492250,-0.00005308,0.00036039 500000,0.05479800,-0.00017758,0.00032235 700000,0.05499143,+0.00001585,0.00027243 1000000,0.05498700,+0.00001142,0.00022793 1250000,0.05504800,+0.00007242,0.00020387 1500000,0.05502533,+0.00004975,0.00018611 1750000,0.05520400,+0.00022842,0.00017230 2000000,0.05513850,+0.00016292,0.00016117 [FIG3b] convergence, Model S, pbar=0.20 kappa=5 k=20 exact,0.1666666667 n,estimate,error,se 25000,0.16468000,-0.00198667,0.00235702 50000,0.16702000,+0.00035333,0.00166667 75000,0.16748000,+0.00081333,0.00136083 100000,0.16710000,+0.00043333,0.00117851 150000,0.16664000,-0.00002667,0.00096225 200000,0.16569000,-0.00097667,0.00083333 300000,0.16659000,-0.00007667,0.00068041 400000,0.16669000,+0.00002333,0.00058926 500000,0.16658200,-0.00008467,0.00052705 700000,0.16642714,-0.00023952,0.00044544 1000000,0.16654500,-0.00012167,0.00037268 1250000,0.16648640,-0.00018027,0.00033333 1500000,0.16643800,-0.00022867,0.00030429 1750000,0.16634400,-0.00032267,0.00028172 2000000,0.16643750,-0.00022917,0.00026352 [FIG4] Model S survival curves, pbar = 0.20, k = 0..60 kappa,k,closed_form,simulated 2.0,0,1.000000,1.000000 2.0,5,0.535808,0.536506 2.0,10,0.424247,0.424812 2.0,15,0.366438,0.367170 2.0,20,0.329255,0.329748 2.0,25,0.302626,0.303370 2.0,30,0.282276,0.283294 2.0,35,0.266030,0.266736 2.0,40,0.252647,0.253180 2.0,45,0.241359,0.241670 2.0,50,0.231659,0.231818 2.0,55,0.223199,0.223198 2.0,60,0.215731,0.215572 5.0,0,1.000000,1.000000 5.0,5,0.444444,0.444148 5.0,10,0.285714,0.285686 5.0,15,0.210526,0.210972 5.0,20,0.166667,0.167216 5.0,25,0.137931,0.138648 5.0,30,0.117647,0.118318 5.0,35,0.102564,0.103078 5.0,40,0.090909,0.091244 5.0,45,0.081633,0.081864 5.0,50,0.074074,0.074156 5.0,55,0.067797,0.067816 5.0,60,0.062500,0.062516 20.0,0,1.000000,1.000000 20.0,5,0.364766,0.364608 20.0,10,0.163193,0.163274 20.0,15,0.083578,0.083562 20.0,20,0.047124,0.047200 20.0,25,0.028552,0.028660 20.0,30,0.018294,0.018452 20.0,35,0.012256,0.012332 20.0,40,0.008516,0.008526 20.0,45,0.006100,0.006152 20.0,50,0.004484,0.004488 20.0,55,0.003369,0.003364 20.0,60,0.002580,0.002562 100.0,0,1.000000,1.000000 100.0,5,0.335702,0.336480 100.0,10,0.119271,0.119218 100.0,15,0.044596,0.044452 100.0,20,0.017465,0.017556 100.0,25,0.007133,0.007250 100.0,30,0.003028,0.003106 100.0,35,0.001331,0.001308 100.0,40,0.000605,0.000598 100.0,45,0.000283,0.000306 100.0,50,0.000136,0.000150 100.0,55,0.000067,0.000070 100.0,60,0.000034,0.000038 inf,0,1.000000,1.000000 inf,5,0.327680,0.328600 inf,10,0.107374,0.107450 inf,15,0.035184,0.035314 inf,20,0.011529,0.011728 inf,25,0.003778,0.003812 inf,30,0.001238,0.001248 inf,35,0.000406,0.000430 inf,40,0.000133,0.000178 inf,45,0.000044,0.000048 inf,50,0.000014,0.000018 inf,55,0.000005,0.000008 inf,60,0.000002,0.000002 [FIG5] inflation factor k*(Model S) / k*(naive) against kappa pbar,kappa,sd,k_naive,k_site,inflation 0.1,1.0,0.21213,28.4332,5470958715752.391,192414734962.45065 0.1,2.0,0.17321,28.4332,4565690.867126431,160576.27991034798 0.1,5.0,0.12247,28.4332,1698.6688960101453,59.74253186624551 0.1,10.0,0.09045,28.4332,171.0000000000018,6.0141049106883 0.1,20.0,0.06547,28.4332,64.205803907586,2.258131231434497 0.1,50.0,0.04201,28.4332,38.53945349885957,1.3554404476183177 0.1,100.0,0.02985,28.4332,32.9806654216737,1.159936736083354 0.1,1000.0,0.00948,28.4332,28.84851199101911,1.0146080563230206 0.2,1.0,0.28284,13.4251,1496085.6719932472,111439.1539143868 0.2,2.0,0.23094,13.4251,2369.0907451185335,176.46681144313854 0.2,5.0,0.16330,13.4251,76.00000000000038,5.661023199433239 0.2,10.0,0.12060,13.4251,29.45062581829189,2.1936931051996984 0.2,20.0,0.08729,13.4251,19.449215166972035,1.4487165561973283 0.2,50.0,0.05601,13.4251,15.486544836977309,1.153548547384094 0.2,100.0,0.03980,13.4251,14.405946641395682,1.0730578703518143 0.2,1000.0,0.01264,13.4251,13.519026503262753,1.006993719325301 0.4,1.0,0.34641,5.8645,660.6947905163979,112.66021048138796 0.4,2.0,0.28284,5.8645,45.95777871677718,7.836618507983626 0.4,5.0,0.20000,5.8645,12.000000000000046,2.0462133880607722 0.4,10.0,0.14771,5.8645,8.221922640051941,1.4019840151395155 0.4,20.0,0.10690,5.8645,6.908493188039823,1.178020937724473 0.4,50.0,0.06860,5.8645,6.253996665593751,1.066417642168776 0.4,100.0,0.04875,5.8645,6.0548722448305705,1.0324633875308207 0.4,1000.0,0.01548,5.8645,5.883148093118792,1.0031813660069857 0.6,1.0,0.34641,3.2694,38.85899838163852,11.885621549474038 0.6,2.0,0.28284,3.2694,9.796186903731952,2.9963142390383535 0.6,5.0,0.20000,3.2694,4.872307611316926,1.4902701241033118 0.6,10.0,0.14771,3.2694,3.9639629129062213,1.2124389454468347 0.6,20.0,0.10690,3.2694,3.593809690425358,1.0992218966048182 0.6,50.0,0.06860,3.2694,3.394098699628888,1.0381372224049052 0.6,100.0,0.04875,3.2694,3.3309419698397207,1.0188197664786316 0.6,1000.0,0.01548,3.2694,3.2754934197748184,1.0018599757226792 [FIG6] Bayesian posterior P(occupied | k blanks), psi = 0.5 p,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 0.05,0.500000,0.474376,0.448886,0.423662,0.398829,0.374506,0.350801,0.327810,0.305617,0.284290,0.263886,0.244447,0.226000,0.208560,0.192133,0.176710,0.162277,0.148809,0.136277,0.124647,0.113878 0.1,0.500000,0.447514,0.396172,0.347020,0.300928,0.258533,0.220230,0.186177,0.156333,0.130506,0.108398,0.089649,0.073874,0.060690,0.049732,0.040667,0.033197,0.027060,0.022032,0.017921,0.014566 0.2,0.500000,0.390244,0.290579,0.207697,0.143669,0.096963,0.064301,0.042128,0.027377,0.017696,0.011398,0.007325,0.004700,0.003013,0.001931,0.001236,0.000792,0.000507,0.000324,0.000208,0.000133 0.4,0.500000,0.264706,0.114731,0.044576,0.016519,0.006010,0.002172,0.000783,0.000282,0.000102,0.000037,0.000013,0.000005,0.000002,0.000001,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000 0.8,0.500000,0.038462,0.001597,0.000064,0.000003,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000 ============================================================================== SUMMARY ============================================================================== p = 0.05 -> 59 blank visits for 95% confidence (exact k* = 58.40); simulated miss rate 0.04862 vs 0.04849 exact, z = +0.41 p = 0.1 -> 29 blank visits for 95% confidence (exact k* = 28.43); simulated miss rate 0.04750 vs 0.04710 exact, z = +1.34 p = 0.15 -> 19 blank visits for 95% confidence (exact k* = 18.43); simulated miss rate 0.04569 vs 0.04560 exact, z = +0.30 p = 0.2 -> 14 blank visits for 95% confidence (exact k* = 13.43); simulated miss rate 0.04391 vs 0.04398 exact, z = -0.24 p = 0.25 -> 11 blank visits for 95% confidence (exact k* = 10.41); simulated miss rate 0.04174 vs 0.04224 exact, z = -1.75 p = 0.3 -> 9 blank visits for 95% confidence (exact k* = 8.40); simulated miss rate 0.04053 vs 0.04035 exact, z = +0.64 p = 0.4 -> 6 blank visits for 95% confidence (exact k* = 5.86); simulated miss rate 0.04616 vs 0.04666 exact, z = -1.66 p = 0.5 -> 5 blank visits for 95% confidence (exact k* = 4.32); simulated miss rate 0.03098 vs 0.03125 exact, z = -1.11 p = 0.6 -> 4 blank visits for 95% confidence (exact k* = 3.27); simulated miss rate 0.02554 vs 0.02560 exact, z = -0.29 p = 0.7 -> 3 blank visits for 95% confidence (exact k* = 2.49); simulated miss rate 0.02707 vs 0.02700 exact, z = +0.31 p = 0.8 -> 2 blank visits for 95% confidence (exact k* = 1.86); simulated miss rate 0.03994 vs 0.04000 exact, z = -0.20 Model H validation : max |z| = 3.316 over 76 cells; mean anchor z = +0.2692 over 11 independent anchors (0.89 SE from 0) Model V validation : max |z| = 2.521; mean anchor z = +0.7294 (1.46 SE from 0). Per-visit heterogeneity costs nothing, as predicted. Model S validation : closed form vs quadrature max diff 5.74e-14; simulation max |z| = 2.866; mean anchor z = -0.1415 (0.57 SE from 0) Headline: at p = 0.20 a clean run of 14 blanks is 95% evidence under Model H. Let detection vary between sites with kappa = 5 (SD 0.163) and the same standard needs 76.0 visits, an inflation of 5.7x. total runtime: 26.1 s ==============================================================================