### Statistical Independence

In probability theory, to say that two events are independent (alternatively called statistically independent or stochastically independent )[1] means that the occurrence of one does not affect the probability of the other. Similarly, two random variables are independent if the realization of one does not affect the probability distribution of the other.

The concept of independence extends to dealing with collections of more than two events or random variables.

## Definition

### For events

#### Two events

Two events A and B are independent if and only if their joint probability equals the product of their probabilities:

$\mathrm\left\{P\right\}\left(A \cap B\right) = \mathrm\left\{P\right\}\left(A\right)\mathrm\left\{P\right\}\left(B\right)$.

Why this defines independence is made clear by rewriting with conditional probabilities:

\begin\left\{align\right\}

\mathrm{P}(A \cap B) = \mathrm{P}(A)\mathrm{P}(B) &\Leftrightarrow \mathrm{P}(A) = \frac{\mathrm{P}(A \cap B)}{\mathrm{P}(B)} \\ &\Leftrightarrow \mathrm{P}(A) = \mathrm{P}(A\mid B) \end{align}

and similarly

$\mathrm\left\{P\right\}\left(A \cap B\right) = \mathrm\left\{P\right\}\left(A\right)\mathrm\left\{P\right\}\left(B\right) \Leftrightarrow \mathrm\left\{P\right\}\left(B\right) = \mathrm\left\{P\right\}\left(B\mid A\right)$.

Thus, the occurrence of B does not affect the probability of A, and vice versa. Although the derived expressions may seem more intuitive, they are not the preferred definition, as the conditional probabilities may be undefined if P(A) or P(B) are 0. Furthermore, the preferred definition makes clear by symmetry that when A is independent of B, B is also independent of A.

#### More than two events

A finite set of events {Ai} is pairwise independent iff every pair of events is independent.[2] That is, if and only if for all distinct pairs of indices m, n

$\mathrm\left\{P\right\}\left(A_m \cap A_n\right) = \mathrm\left\{P\right\}\left(A_m\right)\mathrm\left\{P\right\}\left(A_n\right)$.

A finite set of events is mutually independent if and only if every event is independent of any intersection of the other events.[2] That is, iff for every subset {An}

$\mathrm\left\{P\right\}\left\left(\bigcap_\left\{i=1\right\}^n A_i\right\right)=\prod_\left\{i=1\right\}^n \mathrm\left\{P\right\}\left(A_i\right).$

This is called the multiplication rule for independent events.

For more than two events, a mutually independent set of events is (by definition) pairwise independent, but the converse is not necessarily true.

### For random variables

#### Two random variables

Two random variables X and Y are independent iff the π-system generated by them are independent; that is to say, for every a and b, the events {Xa} and {Yb} are independent events (as defined above). That is, X and Y with cumulative distribution functions $F_X\left(x\right)$ and $F_Y\left(y\right)$, and probability densities $f_X\left(x\right)$ and $f_Y\left(y\right)$, are independent iff the combined random variable (X, Y) has a joint cumulative distribution function

$F_\left\{X,Y\right\}\left(x,y\right) = F_X\left(x\right) F_Y\left(y\right),$

or equivalently, a joint density

$f_\left\{X,Y\right\}\left(x,y\right) = f_X\left(x\right) f_Y\left(y\right).$

#### More than two random variables

A set of random variables is pairwise independent iff every pair of random variables is independent.

A set of random variables is mutually independent iff for any finite subset $X_1, \ldots, X_n$ and any finite sequence of numbers $a_1, \ldots, a_n$, the events $\\left\{X_1 \le a_1\\right\}, \ldots, \\left\{X_n \le a_n\\right\}$ are mutually independent events (as defined above).

The measure-theoretically inclined may prefer to substitute events {XA} for events {Xa} in the above definition, where A is any Borel set. That definition is exactly equivalent to the one above when the values of the random variables are real numbers. It has the advantage of working also for complex-valued random variables or for random variables taking values in any measurable space (which includes topological spaces endowed by appropriate σ-algebras).

#### Conditional independence

Intuitively, two random variables X and Y are conditionally independent given Z if, once Z is known, the value of Y does not add any additional information about X. For instance, two measurements X and Y of the same underlying quantity Z are not independent, but they are conditionally independent given Z (unless the errors in the two measurements are somehow connected).

The formal definition of conditional independence is based on the idea of conditional distributions. If X, Y, and Z are discrete random variables, then we define X and Y to be conditionally independent given Z if

$\mathrm\left\{P\right\}\left(X \le x, Y \le y\;|\;Z = z\right) = \mathrm\left\{P\right\}\left(X \le x\;|\;Z = z\right) \cdot \mathrm\left\{P\right\}\left(Y \le y\;|\;Z = z\right)$

for all x, y and z such that P(Z = z) > 0. On the other hand, if the random variables are continuous and have a joint probability density function p, then X and Y are conditionally independent given Z if

$p_\left\{XY|Z\right\}\left(x, y | z\right) = p_\left\{X|Z\right\}\left(x | z\right) \cdot p_\left\{Y|Z\right\}\left(y | z\right)$

for all real numbers x, y and z such that pZ(z) > 0.

If X and Y are conditionally independent given Z, then

$\mathrm\left\{P\right\}\left(X = x | Y = y, Z = z\right) = \mathrm\left\{P\right\}\left(X = x | Z = z\right)$

for any x, y and z with P(Z = z) > 0. That is, the conditional distribution for X given Y and Z is the same as that given Z alone. A similar equation holds for the conditional probability density functions in the continuous case.

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.

### Independent σ-algebras

The definitions above are both generalized by the following definition of independence for σ-algebras. Let (Ω, Σ, Pr) be a probability space and let A and B be two sub-σ-algebras of Σ. A and B are said to be independent if, whenever A ∈ A and B ∈ B,

$\mathrm\left\{P\right\}\left(A \cap B\right) = \mathrm\left\{P\right\}\left(A\right) \mathrm\left\{P\right\}\left(B\right).$

Likewise, a finite family of σ-algebras $\left(\tau_i\right)_\left\{i\in I\right\}$ is said to be independent if and only if for all

and an infinite family of σ-algebras is said to be independent if all its finite subfamilies are independent.

The new definition relates to the previous ones very directly:

• Two events are independent (in the old sense) if and only if the σ-algebras that they generate are independent (in the new sense). The σ-algebra generated by an event E ∈ Σ is, by definition,
$\sigma\left(E\right) = \\left\{ \emptyset, E, \Omega \setminus E, \Omega \\right\}.$
• Two random variables X and Y defined over Ω are independent (in the old sense) if and only if the σ-algebras that they generate are independent (in the new sense). The σ-algebra generated by a random variable X taking values in some measurable space S consists, by definition, of all subsets of Ω of the form X−1(U), where U is any measurable subset of S.

Using this definition, it is easy to show that if X and Y are random variables and Y is constant, then X and Y are independent, since the σ-algebra generated by a constant random variable is the trivial σ-algebra {∅, Ω}. Probability zero events cannot affect independence so independence also holds if Y is only Pr-almost surely constant.

## Properties

### Self-dependence

Note that an event is independent of itself iff

$\mathrm\left\{P\right\}\left(A\right) = \mathrm\left\{P\right\}\left(A \cap A\right) = \mathrm\left\{P\right\}\left(A\right) \cdot \mathrm\left\{P\right\}\left(A\right) \Rightarrow \mathrm\left\{P\right\}\left(A\right) = 0 \text\left\{ or \right\} 1$.

Thus if an event or its complement almost surely occurs, it is independent of itself. For example, if A is choosing any number but 0.5 from a uniform distribution on the unit interval, A is independent of itself, even though, tautologically, A fully determines A.

### Expectation and covariance

If X and Y are independent, then the expectation operator E has the property

$E\left[X Y\right] = E\left[X\right] E\left[Y\right],$

and for the covariance since we have

$\text\left\{cov\right\}\left[X, Y\right] = E\left[X Y\right] - E\left[X\right] E\left[Y\right],$

the covariance cov(X, Y) is zero. (The converse of these, i.e. the proposition that if two random variables have a covariance of 0 they must be independent, is not true. See uncorrelated.)

### Characteristic function

Two independent random variables X and Y have the property that the characteristic function of their sum is the product of their marginal characteristic functions:

$\varphi_\left\{X+Y\right\}\left(t\right) = \varphi_X\left(t\right)\cdot\varphi_Y\left(t\right),$

but the reverse implication is not true (see subindependence).

## Examples

### Rolling a die

The event of getting a 6 the first time a die is rolled and the event of getting a 6 the second time are independent. By contrast, the event of getting a 6 the first time a die is rolled and the event that the sum of the numbers seen on the first and second trials is 8 are not independent.

### Drawing cards

If two cards are drawn with replacement from a deck of cards, the event of drawing a red card on the first trial and that of drawing a red card on the second trial are independent. By contrast, if two cards are drawn without replacement from a deck of cards, the event of drawing a red card on the first trial and that of drawing a red card on the second trial are again not independent.

### Pairwise and mutual independence

Consider the two probability spaces shown. In both cases, P(A) = P(B) = 1/2 and P(C) = 1/4 The first space is pairwise independent but not mutually independent. The second space is mutually independent. To illustrate the difference, consider conditioning on two events. In the pairwise independent case, although, for example, A is independent of both B and C, it is not independent of BC:

$\mathrm\left\{P\right\}\left(A|BC\right) = \frac\left\{\frac\left\{4\right\}\left\{40\right\}\right\}\left\{\frac\left\{4\right\}\left\{40\right\} + \frac\left\{1\right\}\left\{40\right\}\right\} = \tfrac\left\{4\right\}\left\{5\right\} \ne \mathrm\left\{P\right\}\left(A\right)$
$\mathrm\left\{P\right\}\left(B|AC\right) = \frac\left\{\frac\left\{4\right\}\left\{40\right\}\right\}\left\{\frac\left\{4\right\}\left\{40\right\} + \frac\left\{1\right\}\left\{40\right\}\right\} = \tfrac\left\{4\right\}\left\{5\right\} \ne \mathrm\left\{P\right\}\left(B\right)$
$\mathrm\left\{P\right\}\left(C|AB\right) = \frac\left\{\frac\left\{4\right\}\left\{40\right\}\right\}\left\{\frac\left\{4\right\}\left\{40\right\} + \frac\left\{6\right\}\left\{40\right\}\right\} = \tfrac\left\{2\right\}\left\{5\right\} \ne \mathrm\left\{P\right\}\left(C\right)$

In the mutually independent case however:

$\mathrm\left\{P\right\}\left(A|BC\right) = \frac\left\{\frac\left\{1\right\}\left\{16\right\}\right\}\left\{\frac\left\{1\right\}\left\{16\right\} + \frac\left\{1\right\}\left\{16\right\}\right\} = \tfrac\left\{1\right\}\left\{2\right\} = \mathrm\left\{P\right\}\left(A\right)$
$\mathrm\left\{P\right\}\left(B|AC\right) = \frac\left\{\frac\left\{1\right\}\left\{16\right\}\right\}\left\{\frac\left\{1\right\}\left\{16\right\} + \frac\left\{1\right\}\left\{16\right\}\right\} = \tfrac\left\{1\right\}\left\{2\right\} = \mathrm\left\{P\right\}\left(B\right)$
$\mathrm\left\{P\right\}\left(C|AB\right) = \frac\left\{\frac\left\{1\right\}\left\{16\right\}\right\}\left\{\frac\left\{1\right\}\left\{16\right\} + \frac\left\{3\right\}\left\{16\right\}\right\} = \tfrac\left\{1\right\}\left\{4\right\} = \mathrm\left\{P\right\}\left(C\right)$

$\mathrm\left\{P\right\}\left(A \cap B \cap C\right) = \mathrm\left\{P\right\}\left(A\right)\mathrm\left\{P\right\}\left(B\right)\mathrm\left\{P\right\}\left(C\right),$

and yet no two of the three events are pairwise independent.