# Independence (probability theory)

Independence is a fundamental notion in probability theory, as in statistics and the theory of stochastic processes.

Two events are independent, statistically independent, or stochastically independent[1] if the occurrence of one does not affect the probability of occurrence of the other (equivalently, does not affect the odds). Similarly, two random variables are independent if the realization of one does not affect the probability distribution of the other.

When dealing with collections of more than two events, a weak and a strong notion of independence need to be distinguished. The events are called pairwise independent if any two events in the collection are independent of each other, while saying that the events are mutually independent (or collectively independent) intuitively means that each event is independent of any combination of other events in the collection. A similar notion exists for collections of random variables.

The name "mutual independence" (same as "collective independence") seems the outcome of a pedagogical choice, merely to distinguish the stronger notion from "pairwise independence" which is a weaker notion. In the advanced literature of probability theory, statistics, and stochastic processes, the stronger notion is simply named independence with no modifier. It is stronger since independence implies pairwise independence, but not the other way around.

## Definition

### For events

#### Two events

Two events ${\displaystyle A}$  and ${\displaystyle B}$  are independent (often written as ${\displaystyle A\perp B}$  or ${\displaystyle A\perp \!\!\!\perp B}$ ) if and only if their joint probability equals the product of their probabilities:[2]:p. 29[3]:p. 10

${\displaystyle \mathrm {P} (A\cap B)=\mathrm {P} (A)\mathrm {P} (B)}$

(Eq.1)

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

${\displaystyle \mathrm {P} (A\cap B)=\mathrm {P} (A)\mathrm {P} (B)\iff \mathrm {P} (A)={\frac {\mathrm {P} (A\cap B)}{\mathrm {P} (B)}}=\mathrm {P} (A\mid B)}$ .

and similarly

${\displaystyle \mathrm {P} (A\cap B)=\mathrm {P} (A)\mathrm {P} (B)\iff \mathrm {P} (B)=\mathrm {P} (B\mid A)}$ .

Thus, the occurrence of ${\displaystyle B}$  does not affect the probability of ${\displaystyle 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 ${\displaystyle \mathrm {P} (A)}$  or ${\displaystyle \mathrm {P} (B)}$  are 0. Furthermore, the preferred definition makes clear by symmetry that when ${\displaystyle A}$  is independent of ${\displaystyle B}$ , ${\displaystyle B}$  is also independent of ${\displaystyle A}$ .

#### Log probability and information content

Stated in terms of log probability, two events are independent if and only if the log probability of the joint event is the sum of the log probability of the individual events:

${\displaystyle \log \mathrm {P} (A\cap B)=\log \mathrm {P} (A)+\log \mathrm {P} (B)}$

In information theory, negative log probability is interpreted as information content, and thus two events are independent if and only if the information content of the combined event equals the sum of information content of the individual events:

${\displaystyle \mathrm {I} (A\cap B)=\mathrm {I} (A)+\mathrm {I} (B)}$

See Information content § Additivity of independent events for details.

#### Odds

Stated in terms of odds, two events are independent if and only if the odds ratio of ${\displaystyle A}$  and ${\displaystyle B}$  is unity (1). Analogously with probability, this is equivalent to the conditional odds being equal to the unconditional odds:

${\displaystyle O(A\mid B)=O(A){\text{ and }}O(B\mid A)=O(B),}$

or to the odds of one event, given the other event, being the same as the odds of the event, given the other event not occurring:

${\displaystyle O(A\mid B)=O(A\mid \neg B){\text{ and }}O(B\mid A)=O(B\mid \neg A).}$

The odds ratio can be defined as

${\displaystyle O(A\mid B):O(A\mid \neg B),}$

or symmetrically for odds of ${\displaystyle B}$  given ${\displaystyle A}$ , and thus is 1 if and only if the events are independent.

#### More than two events

A finite set of events ${\displaystyle \{A_{i}\}_{i=1}^{n}}$  is pairwise independent if every pair of events is independent[4]—that is, if and only if for all distinct pairs of indices ${\displaystyle m,k}$ ,

${\displaystyle \mathrm {P} (A_{m}\cap A_{k})=\mathrm {P} (A_{m})\mathrm {P} (A_{k})}$

(Eq.2)

A finite set of events is mutually independent if every event is independent of any intersection of the other events[4][3]:p. 11—that is, if and only if for every ${\displaystyle k\leq n}$  and for every ${\displaystyle k}$ -element subset of events ${\displaystyle \{B_{i}\}_{i=1}^{k}}$  of ${\displaystyle \{A_{i}\}_{i=1}^{n}}$ ,

${\displaystyle \mathrm {P} \left(\bigcap _{i=1}^{k}B_{i}\right)=\prod _{i=1}^{k}\mathrm {P} (B_{i})}$

(Eq.3)

This is called the multiplication rule for independent events. Note that it is not a single condition involving only the product of all the probabilities of all single events (see below for a counterexample); it must hold true for all subsets of events.

For more than two events, a mutually independent set of events is (by definition) pairwise independent; but the converse is not necessarily true (see below for a counterexample).[2]:p. 30

### For real valued random variables

#### Two random variables

Two random variables ${\displaystyle X}$  and ${\displaystyle Y}$  are independent if and only if (iff) the elements of the π-system generated by them are independent; that is to say, for every ${\displaystyle x}$  and ${\displaystyle y}$ , the events ${\displaystyle \{X\leq x\}}$  and ${\displaystyle \{Y\leq y\}}$  are independent events (as defined above in Eq.1). That is, ${\displaystyle X}$  and ${\displaystyle Y}$  with cumulative distribution functions ${\displaystyle F_{X}(x)}$  and ${\displaystyle F_{Y}(y)}$ , are independent iff the combined random variable ${\displaystyle (X,Y)}$  has a joint cumulative distribution function[3]:p. 15

${\displaystyle F_{X,Y}(x,y)=F_{X}(x)F_{Y}(y)\quad {\text{for all }}x,y}$

(Eq.4)

or equivalently, if the probability densities ${\displaystyle f_{X}(x)}$  and ${\displaystyle f_{Y}(y)}$  and the joint probability density ${\displaystyle f_{X,Y}(x,y)}$  exist,

${\displaystyle f_{X,Y}(x,y)=f_{X}(x)f_{Y}(y)\quad {\text{for all }}x,y}$ .

#### More than two random variables

A finite set of ${\displaystyle n}$  random variables ${\displaystyle \{X_{1},\ldots ,X_{n}\}}$  is pairwise independent if and only if every pair of random variables is independent. Even if the set of random variables is pairwise independent, it is not necessarily mutually independent as defined next.

A finite set of ${\displaystyle n}$  random variables ${\displaystyle \{X_{1},\ldots ,X_{n}\}}$  is mutually independent if and only if for any sequence of numbers ${\displaystyle \{x_{1},\ldots ,x_{n}\}}$ , the events ${\displaystyle \{X_{1}\leq x_{1}\},\ldots ,\{X_{n}\leq x_{n}\}}$  are mutually independent events (as defined above in Eq.3). This is equivalent to the following condition on the joint cumulative distribution function ${\displaystyle F_{X_{1},\ldots ,X_{n}}(x_{1},\ldots ,x_{n})}$ . A finite set of ${\displaystyle n}$  random variables ${\displaystyle \{X_{1},\ldots ,X_{n}\}}$  is mutually independent if and only if[3]:p. 16

${\displaystyle F_{X_{1},\ldots ,X_{n}}(x_{1},\ldots ,x_{n})=F_{X_{1}}(x_{1})\cdot \ldots \cdot F_{X_{n}}(x_{n})\quad {\text{for all }}x_{1},\ldots ,x_{n}}$

(Eq.5)

Notice that it is not necessary here to require that the probability distribution factorizes for all possible ${\displaystyle k-}$ element subsets as in the case for ${\displaystyle n}$  events. This is not required because e.g. ${\displaystyle F_{X_{1},X_{2},X_{3}}(x_{1},x_{2},x_{3})=F_{X_{1}}(x_{1})\cdot F_{X_{2}}(x_{2})\cdot F_{X_{3}}(x_{3})}$  implies ${\displaystyle F_{X_{1},X_{3}}(x_{1},x_{3})=F_{X_{1}}(x_{1})\cdot F_{X_{3}}(x_{3})}$ .

The measure-theoretically inclined may prefer to substitute events ${\displaystyle \{X\in A\}}$  for events ${\displaystyle \{X\leq x\}}$  in the above definition, where ${\displaystyle 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).

### For real valued random vectors

Two random vectors ${\displaystyle \mathbf {X} =(X_{1},...,X_{m})^{T}}$  and ${\displaystyle \mathbf {Y} =(Y_{1},...,Y_{n})^{T}}$  are called independent if[5]:p. 187

${\displaystyle F_{\mathbf {X,Y} }(\mathbf {x,y} )=F_{\mathbf {X} }(\mathbf {x} )\cdot F_{\mathbf {Y} }(\mathbf {y} )\quad {\text{for all }}\mathbf {x} ,\mathbf {y} }$

(Eq.6)

where ${\displaystyle F_{\mathbf {X} }(\mathbf {x} )}$  and ${\displaystyle F_{\mathbf {Y} }(\mathbf {y} )}$  denote the cumulative distribution functions of ${\displaystyle \mathbf {X} }$  and ${\displaystyle \mathbf {Y} }$  and ${\displaystyle F_{\mathbf {X,Y} }(\mathbf {x,y} )}$  denotes their joint cumulative distribution function. Independence of ${\displaystyle \mathbf {X} }$  and ${\displaystyle \mathbf {Y} }$  is often denoted by ${\displaystyle \mathbf {X} \perp \!\!\!\perp \mathbf {Y} }$ . Written component-wise, ${\displaystyle \mathbf {X} }$  and ${\displaystyle \mathbf {Y} }$  are called independent if

${\displaystyle F_{X_{1},\ldots ,X_{m},Y_{1},\ldots ,Y_{n}}(x_{1},\ldots ,x_{m},y_{1},\ldots ,y_{n})=F_{X_{1},\ldots ,X_{m}}(x_{1},\ldots ,x_{m})\cdot F_{Y_{1},\ldots ,Y_{n}}(y_{1},\ldots ,y_{n})\quad {\text{for all }}x_{1},\ldots ,x_{m},y_{1},\ldots ,y_{n}}$ .

### For stochastic processes

#### For one stochastic process

The definition of independence may be extended from random vectors to a stochastic process. Thereby it is required for an independent stochastic process that the random variables obtained by sampling the process at any ${\displaystyle n}$  times ${\displaystyle t_{1},\ldots ,t_{n}}$  are independent random variables for any ${\displaystyle n}$ .[6]:p. 163

Formally, a stochastic process ${\displaystyle \left\{X_{t}\right\}_{t\in {\mathcal {T}}}}$  is called independent, if and only if for all ${\displaystyle n\in \mathbb {N} }$  and for all ${\displaystyle t_{1},\ldots ,t_{n}\in {\mathcal {T}}}$

${\displaystyle F_{X_{t_{1}},\ldots ,X_{t_{n}}}(x_{1},\ldots ,x_{n})=F_{X_{t_{1}}}(x_{1})\cdot \ldots \cdot F_{X_{t_{n}}}(x_{n})\quad {\text{for all }}x_{1},\ldots ,x_{n}}$

(Eq.7)

where ${\displaystyle F_{X_{t_{1}},\ldots ,X_{t_{n}}}(x_{1},\ldots ,x_{n})=\mathrm {P} (X(t_{1})\leq x_{1},\ldots ,X(t_{n})\leq x_{n})}$ . Independence of a stochastic process is a property within a stochastic process, not between two stochastic processes.

#### For two stochastic processes

Independence of two stochastic processes is a property between two stochastic processes ${\displaystyle \left\{X_{t}\right\}_{t\in {\mathcal {T}}}}$  and ${\displaystyle \left\{Y_{t}\right\}_{t\in {\mathcal {T}}}}$  that are defined on the same probability space ${\displaystyle (\Omega ,{\mathcal {F}},P)}$ . Formally, two stochastic processes ${\displaystyle \left\{X_{t}\right\}_{t\in {\mathcal {T}}}}$  and ${\displaystyle \left\{Y_{t}\right\}_{t\in {\mathcal {T}}}}$  are said to be independent if for all ${\displaystyle n\in \mathbb {N} }$  and for all ${\displaystyle t_{1},\ldots ,t_{n}\in {\mathcal {T}}}$ , the random vectors ${\displaystyle (X(t_{1}),\ldots ,X(t_{n}))}$  and ${\displaystyle (Y(t_{1}),\ldots ,Y(t_{n}))}$  are independent,[7]:p. 515 i.e. if

${\displaystyle F_{X_{t_{1}},\ldots ,X_{t_{n}},Y_{t_{1}},\ldots ,Y_{t_{n}}}(x_{1},\ldots ,x_{n},y_{1},\ldots ,y_{n})=F_{X_{t_{1}},\ldots ,X_{t_{n}}}(x_{1},\ldots ,x_{n})\cdot F_{Y_{t_{1}},\ldots ,Y_{t_{n}}}(y_{1},\ldots ,y_{n})\quad {\text{for all }}x_{1},\ldots ,x_{n}}$

(Eq.8)

### Independent σ-algebras

The definitions above (Eq.1 and Eq.2) are both generalized by the following definition of independence for σ-algebras. Let ${\displaystyle (\Omega ,\Sigma ,\mathrm {P} )}$  be a probability space and let ${\displaystyle {\mathcal {A}}}$  and ${\displaystyle {\mathcal {B}}}$  be two sub-σ-algebras of ${\displaystyle \Sigma }$ . ${\displaystyle {\mathcal {A}}}$  and ${\displaystyle {\mathcal {B}}}$  are said to be independent if, whenever ${\displaystyle A\in {\mathcal {A}}}$  and ${\displaystyle B\in {\mathcal {B}}}$ ,

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

Likewise, a finite family of σ-algebras ${\displaystyle (\tau _{i})_{i\in I}}$ , where ${\displaystyle I}$  is an index set, is said to be independent if and only if

${\displaystyle \forall \left(A_{i}\right)_{i\in I}\in \prod \nolimits _{i\in I}\tau _{i}\ :\ \mathrm {P} \left(\bigcap \nolimits _{i\in I}A_{i}\right)=\prod \nolimits _{i\in I}\mathrm {P} \left(A_{i}\right)}$

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 ${\displaystyle E\in \Sigma }$  is, by definition,
${\displaystyle \sigma (\{E\})=\{\emptyset ,E,\Omega \setminus E,\Omega \}.}$
• Two random variables ${\displaystyle X}$  and ${\displaystyle Y}$  defined over ${\displaystyle \Omega }$  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 ${\displaystyle X}$  taking values in some measurable space ${\displaystyle S}$  consists, by definition, of all subsets of ${\displaystyle \Omega }$  of the form ${\displaystyle X^{-1}(U)}$ , where ${\displaystyle U}$  is any measurable subset of ${\displaystyle S}$ .

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

## Properties

### Self-independence

Note that an event is independent of itself if and only if

${\displaystyle \mathrm {P} (A)=\mathrm {P} (A\cap A)=\mathrm {P} (A)\cdot \mathrm {P} (A)\Leftrightarrow \mathrm {P} (A)=0{\text{ or }}\mathrm {P} (A)=1}$ .

Thus an event is independent of itself if and only if it almost surely occurs or its complement almost surely occurs; this fact is useful when proving zero–one laws.[8]

### Expectation and covariance

If ${\displaystyle X}$  and ${\displaystyle Y}$  are independent random variables, then the expectation operator ${\displaystyle \operatorname {E} }$  has the property

${\displaystyle \operatorname {E} [XY]=\operatorname {E} [X]\operatorname {E} [Y],}$

and the covariance ${\displaystyle \operatorname {cov} [X,Y]}$  is zero, as follows from

${\displaystyle \operatorname {cov} [X,Y]=\operatorname {E} [XY]-\operatorname {E} [X]\operatorname {E} [Y]}$ .

The converse does not hold: if two random variables have a covariance of 0 they still may be not independent. See uncorrelated.

Similarly for two stochastic processes ${\displaystyle \left\{X_{t}\right\}_{t\in {\mathcal {T}}}}$  and ${\displaystyle \left\{Y_{t}\right\}_{t\in {\mathcal {T}}}}$ : If they are independent, then they are uncorrelated.[9]:p. 151

### Characteristic function

Two random variables ${\displaystyle X}$  and ${\displaystyle Y}$  are independent if and only if the characteristic function of the random vector ${\displaystyle (X,Y)}$  satisfies

${\displaystyle \varphi _{(X,Y)}(t,s)=\varphi _{X}(t)\cdot \varphi _{Y}(s)}$ .

In particular the characteristic function of their sum is the product of their marginal characteristic functions:

${\displaystyle \varphi _{X+Y}(t)=\varphi _{X}(t)\cdot \varphi _{Y}(t),}$

though the reverse implication is not true. Random variables that satisfy the latter condition are called subindependent.

## Examples

### Rolling dice

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 trial 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 not independent, because a deck that has had a red card removed has proportionately fewer red cards.

### Pairwise and mutual independence

Pairwise independent, but not mutually independent, events.

Mutually independent events.

Consider the two probability spaces shown. In both cases, ${\displaystyle \mathrm {P} (A)=\mathrm {P} (B)=1/2}$  and ${\displaystyle \mathrm {P} (C)=1/4}$ . The random variables in the first space are pairwise independent because ${\displaystyle \mathrm {P} (A|B)=\mathrm {P} (A|C)=1/2=\mathrm {P} (A)}$ , ${\displaystyle \mathrm {P} (B|A)=\mathrm {P} (B|C)=1/2=\mathrm {P} (B)}$ , and ${\displaystyle \mathrm {P} (C|A)=\mathrm {P} (C|B)=1/4=\mathrm {P} (C)}$ ; but the three random variables are not mutually independent. The random variables in the second space are both pairwise independent and mutually independent. To illustrate the difference, consider conditioning on two events. In the pairwise independent case, although any one event is independent of each of the other two individually, it is not independent of the intersection of the other two:

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

In the mutually independent case, however,

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

### Mutual independence

It is possible to create a three-event example in which

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

and yet no two of the three events are pairwise independent (and hence the set of events are not mutually independent).[10] This example shows that mutual independence involves requirements on the products of probabilities of all combinations of events, not just the single events as in this example.

## Conditional independence

### For events

The events ${\displaystyle A}$  and ${\displaystyle B}$  are conditionally independent given an event ${\displaystyle C}$  when

${\displaystyle \mathrm {P} (A\cap B\mid C)=\mathrm {P} (A\mid C)\cdot \mathrm {P} (B\mid C)}$ .

### For random variables

Intuitively, two random variables ${\displaystyle X}$  and ${\displaystyle Y}$  are conditionally independent given ${\displaystyle Z}$  if, once ${\displaystyle Z}$  is known, the value of ${\displaystyle Y}$  does not add any additional information about ${\displaystyle X}$ . For instance, two measurements ${\displaystyle X}$  and ${\displaystyle Y}$  of the same underlying quantity ${\displaystyle Z}$  are not independent, but they are conditionally independent given ${\displaystyle 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 ${\displaystyle X}$ , ${\displaystyle Y}$ , and ${\displaystyle Z}$  are discrete random variables, then we define ${\displaystyle X}$  and ${\displaystyle Y}$  to be conditionally independent given ${\displaystyle Z}$  if

${\displaystyle \mathrm {P} (X\leq x,Y\leq y\;|\;Z=z)=\mathrm {P} (X\leq x\;|\;Z=z)\cdot \mathrm {P} (Y\leq y\;|\;Z=z)}$

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

${\displaystyle f_{XY|Z}(x,y|z)=f_{X|Z}(x|z)\cdot f_{Y|Z}(y|z)}$

for all real numbers ${\displaystyle x}$ , ${\displaystyle y}$  and ${\displaystyle z}$  such that ${\displaystyle f_{Z}(z)>0}$ .

If discrete ${\displaystyle X}$  and ${\displaystyle Y}$  are conditionally independent given ${\displaystyle Z}$ , then

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

for any ${\displaystyle x}$ , ${\displaystyle y}$  and ${\displaystyle z}$  with ${\displaystyle \mathrm {P} (Z=z)>0}$ . That is, the conditional distribution for ${\displaystyle X}$  given ${\displaystyle Y}$  and ${\displaystyle Z}$  is the same as that given ${\displaystyle 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.