In probability theory, a pairwise independent collection of random variables is a set of random variables any two of which are independent. Any collection of mutually independent random variables is pairwise independent, but some pairwise independent collections are not independent.
Example
Here is perhaps the simplest example. Suppose X, Y, and Z have the following joint probability distribution:
Then
X and Y are independent, and
X and Z are independent, and
Y and Z are independent, but
X, Y, and Z are not independent (since the values of any two determine the value of the third).
Any one of these three random variables is just the mod 2 sum of the other two, and so is completely determined by the other two. That is as far from independence as one can get.
Similarly, two random variables are independent if the conditional probability distribution of either given the observed value of the other is the same as if the other's value had not been observed.
If any two of a collection of random variables are independent, they may nonetheless fail to be mutually independent; this is called pairwiseindependence.
Independence can be seen as a special kind of conditional independence, since probability can be seen as a kind of conditional probability given no events.