Finding a good sample #
Two estimates for finding, by uniform sampling, a point of a finite type at which a function is large.
Reverse averaging. If f ≤ 1 has average μ, then f ≤ θ + (1 - θ) 𝟙[θ ≤ f] pointwise, so
μ ≤ θ + (1 - θ) dens {θ ≤ f} (Fintype.expect_le_add_mul_dens_filter): f is at least θ on
a set of density at least (μ - θ) / (1 - θ) when θ < 1
(Fintype.expect_sub_div_le_dens_filter), and at least μ - θ when 0 ≤ θ
(Fintype.expect_sub_le_dens_filter). This is the reverse of Markov's inequality
Fintype.mul_dens_filter_le_expect, for functions bounded above instead of below.
Repeated trials. k independent uniform samples all miss a set of density p with probability
(1 - p) ^ k (Fintype.dens_filter_forall_apply_notMem), so some sample lands in it with
probability 1 - (1 - p) ^ k (Fintype.dens_filter_exists_apply_mem). This is at least 1 / 2
once k p ≥ 1 (Fintype.half_le_dens_filter_exists_apply_mem): by Bernoulli's inequality
(1 + p) ^ k ≥ 1 + k p ≥ 2, while (1 - p) ^ k (1 + p) ^ k = (1 - p ^ 2) ^ k ≤ 1
(one_sub_pow_le_half).
Main results #
Fintype.expect_le_add_mul_dens_filter,Fintype.expect_sub_div_le_dens_filter,Fintype.expect_sub_le_dens_filter: reverse averaging.Fintype.dens_filter_forall_apply_notMem,Fintype.dens_filter_exists_apply_mem,Fintype.cast_dens_filter_exists_apply_mem: the exact law of repeated trials.Fintype.one_sub_pow_le_dens_filter_exists_apply_mem,Fintype.half_le_dens_filter_exists_apply_mem: lower bounds for repeated trials.one_sub_pow_le_half:ktrials of success probabilityp ≥ 1 / kall fail with probability at most1 / 2.
If 0 ≤ p ≤ 1 and k p ≥ 1, then (1 - p) ^ k ≤ 1 / 2: k independent trials, each
succeeding with probability p, all fail with probability at most 1 / 2.
Reverse averaging #
Reverse averaging. A function bounded above by 1 averages to at most θ plus 1 - θ
times the density of the set where it is at least θ.
Reverse averaging. If θ < 1, a function bounded above by 1 with average μ is at
least θ on a set of density at least (μ - θ) / (1 - θ).
Reverse averaging. If 0 ≤ θ, a function bounded above by 1 with average μ is at least
θ on a set of density at least μ - θ.
Repeated trials #
Repeated trials. card ι independent uniform samples all miss s with probability
dens sᶜ ^ card ι.
Repeated trials. Some of card ι independent uniform samples lands in s with
probability 1 - (1 - dens s) ^ card ι.
Repeated trials, in a field: some of card ι independent uniform samples lands in s
with probability 1 - (1 - dens s) ^ card ι.
Repeated trials. If a uniform sample lands in s with probability at least q, some of
card ι independent uniform samples lands in s with probability at least
1 - (1 - q) ^ card ι.
Repeated trials. If a uniform sample lands in s with probability at least q ≥ 0 and
card ι * q ≥ 1, some of card ι independent uniform samples lands in s with probability at
least 1 / 2.