Conditional sampling inside a union of masks #
Let P and Q be independent random masks of rates p and q. Their union S has rate
p + q - p q, and conditionally on S, the difference P \ Q selects each coordinate of S
independently with rate conditionalSamplingRate p q = p (1 - q) / (p + q - p q)
(bernoulliAverage_union_difference). The law is stated as an equality of finite expectations for
any rate r with (p + q - p q) r = p (1 - q), so it avoids conditioning on events of probability
zero and covers degenerate rates. This is the coordinate-sampling step of Korten's proof of the
mirror-set lemma [Kor26].
Main definitions #
Cslib.BitString.conditionalSamplingRate: the conditional rate ofP \ QinsideP ∪ Q.
Main results #
Cslib.BitString.bernoulliAverage_union_difference: the joint law ofP ∪ QandP \ Q.Cslib.BitString.bernoulliAverage_union_difference_subtype: the same, with the difference as a mask on the coordinates of the union.Cslib.BitString.conditionalSamplingRate_nonneg,Cslib.BitString.conditionalSamplingRate_le_one,Cslib.BitString.conditionalSamplingRate_le_div: the conditional rate is a probability, at mostp / q.
References #
The rate p (1 - q) / (p + q - p q) at which the difference P \ Q of independent masks of
rates p and q selects the coordinates of their union P ∪ Q.
Instances For
For p ≥ 0 and 0 ≤ q ≤ 1, the conditional rate is nonnegative.
For p ≥ 0 and 0 < q ≤ 1, the conditional rate is at most one.
For p ≥ 0 and 0 < q ≤ 1, the conditional rate is at most p / q.
The joint law of P ∪ Q and P \ Q: for independent masks P and Q of rates p and
q, the union and the difference are distributed as a mask S of rate p + q - p q and the
part inside S of an independent mask of rate r, when (p + q - p q) r = p (1 - q).
The joint law of P ∪ Q and P \ Q, with the difference as a mask on the coordinates of the
union.