Worked examples: HAVING provenance and probability on a three-occurrence group #
Two fully computed examples on a group with three occurrences.
SUM(a) ā„ 5collapse inš¹[X]. With attribute valuesa = (3, 2, 2)and annotations the distinct variablesxā, xā, xā, the valid non-empty worlds are{1,2},{1,3}and{1,2,3}, and the possible-world provenance sums their world annotations. Sinceš¹[X]is absorptive, this collapses to theā-sum over the two minimal valid worlds{1,2}and{1,3}alone (the general statement isHaving.sum_ge_collapse); both sides compute ā by kernel evaluation on all2³valuations ā toxā ā§ (xā ⨠xā).Poisson-binomial
COUNT(*) ā„ 2. With independent contributors of marginalspā = 1/2,pā = 1/4,pā = 1/3, the point masses computed by the recurrence (HavingProbability.countMass_insert_zero/countMass_insert_succ) areĻā(2) = 1/4andĻā(3) = 1/24, and the CDF assembly (HavingProbability.funcProb_count_filter) givesPr[COUNT(*) ā„ 2] = 1/4 + 1/24 = 7/24.
The SUM(a) ā„ 5 collapse in š¹[X] #
Attribute values of the three occurrences: a(uā) = 3, a(uā) = a(uā) = 2.
Instances For
Dependency graph
Annotations: the distinct Boolean variables xā, xā, xā of š¹[X].
Equations
Instances For
Dependency graph
The Poisson-binomial COUNT(*) ā„ 2 example #
Independent contributor marginals pā = 1/2, pā = 1/4, pā = 1/3.
Equations
Instances For
Dependency graph
Per-contributor variable supports: contributor i depends on xįµ¢ only.
Equations
- HavingExample.S i = {i}