Pairwise independent events (source code)

= Pairwise independent events
{title2=$\mathbb P(A_i\cap A_j)=\mathbb P(A_i)\mathbb P(A_j),\ i\ne j$}

= Pairwise independence
{synonym}

<Pairwise independent events> describe a subtle kind of uncertainty: learning that one <event> occurred leaves each other <event>'s <probability> unchanged, yet learning that two occurred can reveal a third completely. Checking every pair therefore answers a weaker question than checking the whole collection. The <parity construction of pairwise independent bits> makes this distinction visible with just four equally likely outcomes.

A family of <events> $A_i$ is pairwise independent when
$$
\mathbb P(A_i\cap A_j)=\mathbb P(A_i)\mathbb P(A_j)\qquad(i\ne j).
$$
If $\mathbb P(A_j)>0$, this is equivalent to the <conditional probability> identity $\mathbb P(A_i\mid A_j)=\mathbb P(A_i)$. The product definition also handles <events> of <probability> zero. <Independent events>, meaning mutually independent <events>, require the same product rule for every finite subfamily, including triples. For three <events>, the three pair equations and the triple equation are four separate requirements. https://www.randomservices.org/random/prob/Independence.html[Kyle Siegrist, Random Services: independence of two events and general independence of events]{ref}.

For a worked example, take <independent> fair <bits> $U,V$: the <sample space> is $\{00,01,10,11\}$ with <probability> $1/4$ per outcome. Set $X=U$, $Y=V$, and $Z=U\mathbin\oplus V$, using <exclusive or>, which is one precisely when its inputs differ. The <events> $A=\{X=1\}$, $B=\{Y=1\}$, and $C=\{Z=1\}$ each contain two outcomes. Their pair <intersections> are
$$
A\cap B=\{11\},\qquad A\cap C=\{10\},\qquad B\cap C=\{01\}.
$$
Thus each <event> has <probability> $1/2$ and each pair <intersection> has <probability> $1/4=(1/2)^2$: these are <pairwise independent events>. But $X=Y=1$ forces $Z=0$, so
$$
A\cap B\cap C=\varnothing,\qquad
\mathbb P(A\cap B\cap C)=0\ne\frac18=\mathbb P(A)\mathbb P(B)\mathbb P(C).
$$
The three are not <independent events>. This is the complementary-third-event version of the two-toss example in https://ocw.mit.edu/courses/res-6-012-introduction-to-probability-spring-2018/09ea15bdcd65f91318c38285884983f9_MITRES_6_012S18_L03.pdf[Tsitsiklis and Jaillet, MIT Introduction to Probability, Lecture 3, slides 7–8].

\Image[/pairwise-independent-parity-table.png]
{title=Four outcomes give three pairwise independent bits with a joint parity constraint}
{description=Each row has <probability> $1/4$. Each pair's <joint probability mass function> contains all four value combinations with <probability> $1/4$, although only four of the eight triple combinations can occur.}

Another useful diagnostic preserves a special common-<intersection> case. Suppose three <events> have common <probability> $s$ and every pair and triple intersect in the same <event>, of <probability> $q$. <Pairwise independence> requires $q=s^2$, while mutual <independence> additionally requires $q=s^3$. Both hold only for $s=0$ or $s=1$. For a concrete nontrivial instance, assign <probability> $1/4$ to each of four outcomes, let all three <events> contain the first outcome, and give each <event> one different additional outcome. Then $s=1/2$ and $q=1/4$: the pair equations hold, while the triple equation fails. Unlike the <exclusive or> example above, this triple <intersection> is nonempty.