Probability identities for HAVING aggregate comparisons under independence #
This file formalises the algebraic identities for evaluating
HAVING-style aggregate comparisons when the contributors are
independent. Given a B[X]-instance in which each contributor
i : ι carries an annotation α i : BoolFunc X and the annotations
have pairwise disjoint variable supports (so the contributors are
independent Bernoullis with marginals p i = P.funcProb (α i)), we
give closed-form / recurrence expressions for the probability that the
aggregate-comparison atom holds on the contributors of a single group:
- MAX / MIN factorisation
(
funcProb_maxLeOnNonempty,funcProb_minGeOnNonempty):Pr[max ≤ C on nonempty] = (∏_{t i > C}(1 - p i)) · (1 - ∏_{t i ≤ C}(1 - p i))and the dual formin. - COUNT (Poisson-binomial) recurrence
(
countMass_insert_succ,countMass_insert_zero):ρ_{J ⊔ {i}}(j+1) = (1 - p i) · ρ_J(j+1) + p i · ρ_J(j),ρ_{J ⊔ {i}}(0) = (1 - p i) · ρ_J(0). - SUM (weighted Poisson-binomial) recurrence
(
sumMass_insert):σ_{J ⊔ {i}}(s) = (1 - p i) · σ_J(s) + p i · σ_J(s - t i)(with the convention thatσ_Jat a negative-shifted index is0).
All four results follow the same template: the underlying event factors
as a Boolean combination of the per-contributor indicators, and the
disjoint-supports hypothesis turns that combination into a product of
marginal probabilities via ProbAssignment.funcProb_mul_disjoint.
The constant 0 Boolean function depends on the empty support
(equivalently on any support).
The constant 1 Boolean function depends on the empty support
(equivalently on any support).
A variable depends on the singleton of its index.
Finset.prod of BoolFuncs depends on the biUnion of the per-factor
supports.
Iterated independence: if (β i) depends on S i and the supports are
pairwise disjoint, then the probability of ∏ i ∈ J, β i factors as the
product of the marginal probabilities P.funcProb (β i).
Common setup for the four results #
We fix a probability assignment P over Boolean variables X, a finite
type ι of contributors, an annotation α : ι → BoolFunc X, supports
S : ι → Finset X that are pairwise disjoint, and a hypothesis
hdep : ∀ i, (α i).DependsOn (S i). The contributor marginal is
p i := P.funcProb (α i).
Pointwise evaluation of a Finset product of BoolFuncs: the product
evaluates to true iff every factor does.
MAX factorisation #
"Random world contains no contributor with value > C": the AND over the
indicators 1 - α i for all contributors with t i > C. Evaluates to true
iff every such contributor's annotation is false.
Equations
- HavingProbability.maxNoneAbove α t C = ∏ i : ι with C < t i, (1 - α i)
Instances For
"Random world contains some contributor with value ≤ C": the OR over
the indicators α i for all contributors with t i ≤ C, expressed as
1 - ∏ (1 - α i).
Equations
- HavingProbability.someAtMost α t C = 1 - ∏ i : ι with t i ≤ C, (1 - α i)
Instances For
"Random world is nonempty and max_{i ∈ world} t i ≤ C": the conjunction
of the two pieces above. The semantic meaning is recorded in
maxLeOnNonempty_eval_iff.
Equations
Instances For
Semantic reading of maxNoneAbove.
Semantic reading of someAtMost.
Full semantic reading: the BoolFunc maxLeOnNonempty α t C evaluates to
true at v iff the random world {i : α i v = true} is nonempty and its
maximum-of-t is at most C.
Probability of maxNoneAbove: by iterated independence applied to
(1 - α i)'s, this is the product of (1 - p i) over contributors above C.
Probability of someAtMost: the complement of the product.
MAX factorisation under independence. The probability of the
"max ≤ C on a nonempty world" event factors as a product of an "all
above-C contributors are absent" term and a "some at-most-C contributor
is present" term.
MIN factorisation #
"Random world contains no contributor with value < C": the AND over the
indicators 1 - α i for all contributors with t i < C.
Equations
- HavingProbability.minNoneBelow α t C = ∏ i : ι with t i < C, (1 - α i)
Instances For
"Random world contains some contributor with value ≥ C".
Equations
- HavingProbability.someAtLeast α t C = 1 - ∏ i : ι with C ≤ t i, (1 - α i)
Instances For
"Random world is nonempty and min_{i ∈ world} t i ≥ C".
Equations
Instances For
MIN factorisation under independence.
COUNT (Poisson-binomial) recurrence #
countEqIndicator α J j depends on ⋃ i ∈ J, S i: its value at v
only references α i v for i ∈ J.
Decomposition for j = 0: at most 0 of the indices in insert i J
have α k v = true iff α i v = false and at most 0 of the indices in
J have α k v = true.
Decomposition for j = j' + 1: exactly j' + 1 indices in insert i J
have α k v = true iff either α i v = true and exactly j' indices in
J do, or α i v = false and exactly j' + 1 indices in J do.
COUNT Poisson-binomial recurrence (succ case). For i ∉ J and
j : ℕ, the probability that exactly j + 1 of the contributors in
insert i J are present factors as (1 − p i) · ρ_J(j+1) + p i · ρ_J(j).
COUNT Poisson-binomial recurrence (zero case). For i ∉ J, the
probability that exactly 0 contributors in insert i J are present is
(1 − p i) · ρ_J(0).
SUM (weighted Poisson-binomial) recurrence #
Support lemma for sumEqIndicator.
Decomposition when the new contributor's weight exceeds the target: if
t i > s, the sum cannot reach s once i is included, so the only way to
hit s is to leave i out.
Decomposition when the new contributor's weight fits: if t i ≤ s, the
target sum is reachable either without i (target stays s) or with i
(target becomes s − t i on the remaining contributors).
SUM weighted Poisson-binomial recurrence (weight fits). For i ∉ J
and t i ≤ s, the probability that the weighted sum over insert i J
equals s factors as (1 − p i) · σ_J(s) + p i · σ_J(s − t i).
SUM weighted Poisson-binomial recurrence (weight too large). For
i ∉ J and s < t i, the probability collapses to the keep-out branch:
σ_{insert i J}(s) = (1 − p i) · σ_J(s).