Canonical: https://knowlpedia.com/probability/conditional-probability/

# Conditional probability

[Probability of an event](https://knowlpedia.com/probability/event-probability/) given another event or a sigma-algebra representing available information

A **conditional probability** is the probability of an event after restricting to information in another event or in a sub-[sigma-algebra](https://knowlpedia.com/measure-theory/sigma-algebra/).  On a [probability space](https://knowlpedia.com/probability/probability-space/) \((\Omega,\mathcal F,\mathbb P)\), for events \(A,B\in\mathcal F\) with \(\mathbb P(B)>0\), the conditional probability of \(A\) given \(B\) is
\[
\mathbb P(A\mid B)\;=\;\frac{\mathbb P(A\cap B)}{\mathbb P(B)}.
\]

More generally, for a sub-\(\sigma\)-algebra \(\mathcal G\subseteq\mathcal F\), the conditional probability of \(A\) given \(\mathcal G\) is the \(\mathcal G\)-measurable [random variable](https://knowlpedia.com/probability/random-variable/) defined by
\[
\mathbb P(A\mid \mathcal G)\;=\;\mathbb E[\mathbf 1_A\mid \mathcal G],
\]

where \(\mathbb E[\cdot\mid \mathcal G]\) denotes [conditional expectation](https://knowlpedia.com/probability/conditional-expectation/).

## Remarks

Conditioning on \(\sigma(B)=\{\varnothing,B,B^c,\Omega\}\) records both sides of the partition: when \(0<\mathbb P(B)<1\),
\[
\mathbb P(A\mid\sigma(B))
=\mathbb P(A\mid B)\mathbf 1_B+\mathbb P(A\mid B^c)\mathbf 1_{B^c}
\quad\text{almost surely}.
\]
Thus the event-conditioned number \(\mathbb P(A\mid B)\) is the value of this random variable on \(B\), not the entire conditional random variable.

## Examples

- If a fair die is rolled, \(A=\{\text{even}\}\) and \(B=\{\text{roll}>3\}\), then \(\mathbb P(A\mid B)=\frac{2/6}{3/6}=\frac{2}{3}\).
- If \(A\) and \(B\) are [independent events](https://knowlpedia.com/probability/independence-events/) with \(\mathbb P(B)>0\), then \(\mathbb P(A\mid B)=\mathbb P(A)\).
- For a sub-\(\sigma\)-algebra \(\mathcal G\), if \(A\in\mathcal G\) then \(\mathbb P(A\mid \mathcal G)=\mathbf 1_A\) almost surely, while if \(\mathcal G=\{\varnothing,\Omega\}\) then \(\mathbb P(A\mid \mathcal G)=\mathbb P(A)\).
