
Basu's elephant: the Horvitz-Thompson total is unbiased with exploding variance
Source:R/ledger_scan.R
morie_ht_elephant.RdUnder independent inclusion with probabilities pi, the Horvitz-Thompson
total has mean \(\sum t_i\) (Research.P3.Basu.ht_mean) and variance
\(\sum t_i^2(1-\pi_i)/\pi_i\) (ht_variance). One unit with value
\(t_e\) and inclusion probability \(\pi_e = t_e^2/(2(B + t_e^2))\)
contributes more than any bound \(B\) (elephant_unbounded); the other
units' contribution is bounded without reference to \(\pi_e\)
(ratio_bounded).
Value
A list: mean, variance, terms (per unit) and,
with bound, elephant (its index), pi_elephant and
term_elephant.
Examples
morie_ht_elephant(t = c(1, 2, 3, 100), pi = c(0.5, 0.5, 0.5, 0.01), bound = 1e4)
#> $mean
#> [1] 106
#>
#> $variance
#> [1] 990014
#>
#> $terms
#> [1] 1 4 9 990000
#>
#> $elephant
#> [1] 4
#>
#> $pi_elephant
#> [1] 0.25
#>
#> $term_elephant
#> [1] 30000
#>
#> attr(,"theorem")
#> [1] "Research.P3.Basu.ht_variance"