Let (Ω,F,P)\left(\Omega,\mathcal{F},\mathbb{P}\right) be a probability space and A,B∈FA,B\in\mathcal{F} be events with P(B)>0.\mathbb{P}\left(B\right)>0. The conditional probability of AA given BB is the probability of the joint event divided by the probability of B.B.

P(A∣B):=P(A∩B)P(B)\mathbb{P}\left(A\mid B\right):=\frac{\mathbb{P}\left(A\cap B\right)}{\mathbb{P}\left(B\right)}

The conditional probability of AA given BB is the probability that AA occurs given that BB has occurred. Conditional probability has the following properties:

  • for fixed B,B, the function A↦P(A∣B)A\mapsto\mathbb{P}\left(A\mid B\right) is a probability measure on (Ω,F);\left(\Omega,\mathcal{F}\right);
  • conditioning on BB is equivalent to reducing the sample space to B,B, replacing each event by its intersection with BB and rescaling probabilities by P(B);\mathbb{P}\left(B\right);
  • in general P(A∣B)≠P(B∣A).\mathbb{P}\left(A\mid B\right)\neq\mathbb{P}\left(B\mid A\right).

Let (Ω,F,P)\left(\Omega,\mathcal{F},\mathbb{P}\right) be a probability space and A,B∈FA,B\in\mathcal{F} be events with P(B)>0.\mathbb{P}\left(B\right)>0. The events AA and BB are independent if and only if conditioning on BB does not change the probability of A.A.

P(A∣B)=P(A)\mathbb{P}\left(A\mid B\right)=\mathbb{P}\left(A\right)

This holds since, when AA and BB are independent, P(A∣B)=P(A) P(B)P(B)=P(A),\mathbb{P}\left(A\mid B\right)=\frac{\mathbb{P}\left(A\right)\,\mathbb{P}\left(B\right)}{\mathbb{P}\left(B\right)}=\mathbb{P}\left(A\right), and conversely P(A∣B)=P(A)\mathbb{P}\left(A\mid B\right)=\mathbb{P}\left(A\right) rearranges to P(A∩B)=P(A) P(B).\mathbb{P}\left(A\cap B\right)=\mathbb{P}\left(A\right)\,\mathbb{P}\left(B\right).

Let (Ω,F,P)\left(\Omega,\mathcal{F},\mathbb{P}\right) be a probability space and A,B,C∈FA,B,C\in\mathcal{F} be events with P(C)>0.\mathbb{P}\left(C\right)>0. The notation P(A∣B,C)\mathbb{P}\left(A\mid B,C\right) denotes P(A∣B∩C).\mathbb{P}\left(A\mid B\cap C\right). The events AA and BB are conditionally independent given C,C, written A⊥ ⁣ ⁣ ⁣⊥B∣C,A\perp\!\!\!\perp B\mid C, if and only if their joint conditional probability given CC is the product of their conditional probabilities given C.C.

P(A∩B∣C)=P(A∣C) P(B∣C)\mathbb{P}\left(A\cap B\mid C\right)=\mathbb{P}\left(A\mid C\right)\,\mathbb{P}\left(B\mid C\right)

Equivalently, when P(B∩C)>0,\mathbb{P}\left(B\cap C\right)>0, the events AA and BB are conditionally independent given CC if and only if

P(A∣B,C)=P(A∣C).\mathbb{P}\left(A\mid B,C\right)=\mathbb{P}\left(A\mid C\right).

Let (Ω,F,P)\left(\Omega,\mathcal{F},\mathbb{P}\right) be a probability space, E1,…,Ek∈FE_1,\ldots,E_k\in\mathcal{F} be a partition of Ω\Omega with P(Ei)>0\mathbb{P}\left(E_i\right)>0 for all ii and A∈FA\in\mathcal{F} be an event. The theorem of total probability states that the probability of AA is the sum of its conditional probabilities given each part, weighted by the probabilities of the parts.

P(A)=∑i=1kP(A∣Ei) P(Ei)\mathbb{P}\left(A\right)=\sum_{i=1}^k \mathbb{P}\left(A\mid E_i\right)\,\mathbb{P}\left(E_i\right)

Let (Ω,F,P)\left(\Omega,\mathcal{F},\mathbb{P}\right) be a probability space, E1,…,Ek∈FE_1,\ldots,E_k\in\mathcal{F} be a partition of Ω\Omega with P(Ei)>0\mathbb{P}\left(E_i\right)>0 for all ii and A∈FA\in\mathcal{F} be an event with P(A)>0.\mathbb{P}\left(A\right)>0. Bayes’ theorem states that the conditional probability of a part given AA is the conditional probability of AA given the part, multiplied by the probability of the part and divided by the probability of A.A.

P(Ei∣A)=P(A∣Ei) P(Ei)P(A)=P(A∣Ei) P(Ei)∑j=1kP(A∣Ej) P(Ej)\begin{align*} \mathbb{P}\left(E_i\mid A\right)&=\frac{\mathbb{P}\left(A\mid E_i\right)\,\mathbb{P}\left(E_i\right)}{\mathbb{P}\left(A\right)}\\ &=\frac{\mathbb{P}\left(A\mid E_i\right)\,\mathbb{P}\left(E_i\right)}{\sum_{j=1}^k \mathbb{P}\left(A\mid E_j\right)\,\mathbb{P}\left(E_j\right)} \end{align*}

The second form follows from the theorem of total probability.