Independence

In probability theory, two events are independent if the occurrence of one does not affect the probability of occurrence of the other. Similarly, two random variables are independent if the realization of one does not affect the probability distribution of the other.

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


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

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


 * $$\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


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

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 $$\mathrm{P}(A)$$ or $$\mathrm{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$$.