Two-stage sampling in finite products #
Draw a uniformly from a finite type α and then b uniformly from β. Suppose a ρ₁
fraction of the a are good, and for each good a a ρ₂ fraction of the b satisfy q a b.
Then a ρ₁ ρ₂ fraction of the pairs satisfy q. The event on the second coordinate may depend
on the first, unlike in Cslib.Probability.dens_filter_fst_and_snd, where the two events are
independent.
The count form Cslib.Probability.mul_le_card_filter_product works over finsets s ×ˢ t, so
that the first stage may range over a subset such as powersetCard; the density form over a
whole product type is derived from it. Conversely, Cslib.Probability.dens_prod_le_add_of_good
gives the complementary union-tail upper bound δ + p when ¬ good a has density at most δ
and each good a has conditional failure density at most p.
Main results #
Cslib.Probability.mul_le_card_filter_product: if at leastρ₁elements ofsare good and each goodahas at leastρ₂partnersb ∈ twithq a b, then at leastρ₁ ρ₂pairs ofs ×ˢ tsatisfyq.Cslib.Probability.mul_le_dens_filter_prod: the lower boundρ₁ ρ₂on the density of pairs.Cslib.Probability.dens_prod_le_add_of_good: union-tail upper boundδ + pover a two-stage product space when the first stage failsgoodwith density≤ δand each good fiber fails with density≤ p.
Two-stage counting. If at least ρ₁ elements of s are good, and each good a has at
least ρ₂ partners b ∈ t with q a b, then at least ρ₁ ρ₂ pairs of s ×ˢ t satisfy q.
Two-stage sampling. If a ρ₁ fraction of the a are good, and for each good a a ρ₂
fraction of the b satisfy q a b, then a ρ₁ ρ₂ fraction of the pairs satisfy q.
Two-stage union-tail bound. Over a product space α × β ([Nonempty α]), when the first
coordinate violates good with density at most δ and every a satisfying good a has
conditional fiber failure density dens {b : β | bad (a, b)} ≤ p (0 ≤ p), the joint event
bad has density at most δ + p.