Two events A and B with P[A] > 0 and P[B] > 0 are independent if and only if
In general,
So A and B are independent if
Three events A, B and C are independent if
The first line of the four is necessary but not sufficient; we also require pairwise independence.
For an arbitrary number of events Ai, i = 1, n we
require for all combinations of 1 i < j < k < ...
n
Consider as an example an urn containing 30 balls, which are either black or white, either light or heavy, and numbered with a number which is either odd or even. There are 10 black balls and 20 white balls. Of the black balls, 5 are light and 5 are heavy. Of the white balls, 10 are light and 10 are heavy. Of the 5 black light balls, 2 are even and 3 are odd. Of the 5 black heavy balls, none are even and 5 are odd. Of the 10 white light balls, 6 are even and 4 are odd. Of the 10 white heavy balls, 4 are even and 6 are odd. We define P[A] as the probability that a ball is black, P[B] as the probability that a ball is light, and P[C] as the probability that a ball is numbered with an even number. Show that A and B are independent, but that C is dependent on both A and B.
We proceed to check the pairwise independence.
We conclude that A and B are independent of each other, but that C is dependent on both A and B.