Mathematics.

foundations of probability

Conditional Probability

Probability30 minDifficulty4 out of 10

You should know: sample space

Overview

In probability theory, conditional probability is a measure of the probability of an event occurring, given that another event (by assumption, presumption, assertion, or evidence) is already known to have occurred. This particular method relies on event A occurring with some sort of relationship with another event B. If the event of interest is A and the event B is known or assumed to have occurred, 'the conditional probability of A given B', or 'the probability of A under the condition B', is written as P(A|B). This can also be understood as the fraction of probability of B that intersects with A — the ratio of the probability of both events happening to the probability of the given event happening.

Intuition

Conditioning is about narrowing the sample space. Before you know anything, all of Ω is in play. Once you learn that event B occurred, every outcome outside of B is ruled out — the 'new universe' is just B itself, and A can only happen within the part of B that overlaps with A. So P(A|B) is really just 'what fraction of B is also in A?' — you're re-normalizing so that B has total probability 1, and asking how much of that renormalized probability landed inside A.

Formal Definition

Definition

For events A and B with P(B) > 0, the conditional probability of A given B is defined as:

P(AB)=P(AB)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

The probability of A within the reduced sample space B

Definition
P(AB)=P(AB)P(B)=P(BA)P(A)P(A \cap B) = P(A \mid B) \, P(B) = P(B \mid A) \, P(A)

Rearranging the definition gives the joint probability of A and B

Multiplication rule

Notation

NotationMeaning
P(AB)P(A \mid B)The conditional probability of A given B
P(AB)P(A \cap B)The joint probability that both A and B occur
ABA \perp BA and B are independent

Derivation

The multiplication rule for n events follows by repeatedly applying the definition of conditional probability:

P(A1A2An)=P(A1)P(A2A1)P(A3A1A2)P(AnA1An1)P(A_1 \cap A_2 \cap \cdots \cap A_n) = P(A_1)\,P(A_2\mid A_1)\,P(A_3 \mid A_1 \cap A_2)\cdots P(A_n \mid A_1 \cap \cdots \cap A_{n-1})

Chain rule of probability, obtained by repeated substitution of P(A∩B) = P(A|B)P(B)

Properties

Independence

P(AB)=P(A)P(A \mid B) = P(A)

Condition: if and only if A and B are independent (equivalently, P(A \cap B) = P(A)P(B))

Law of total probability

P(A)=iP(ABi)P(Bi)P(A) = \sum_i P(A \mid B_i)\,P(B_i)

Condition: for a partition {B_i} of the sample space

Conditional probability is a probability measure

P(B) satisfies all three axioms of probability on the reduced space BP(\cdot \mid B) \text{ satisfies all three axioms of probability on the reduced space } B

Applications

Bayesian networks encode conditional probabilities between variables to model complex dependency structures for inference.

Worked Examples

  1. Let B = 'even' = {2,4,6}, A = 'greater than 3' = {4,5,6}. The reduced sample space is B.

    AB={4,6}A \cap B = \{4,6\}
  2. Apply the definition of conditional probability.

    P(AB)=P(AB)P(B)=2/63/6=23P(A \mid B) = \frac{P(A\cap B)}{P(B)} = \frac{2/6}{3/6} = \frac{2}{3}

Answer: P(A|B) = 2/3.

Practice Problems

Difficulty 3/10

P(A) = 0.5, P(B) = 0.4, P(A ∩ B) = 0.2. Find P(A | B) and P(B | A).

Difficulty 4/10

Which condition confirms that events A and B are independent?

Difficulty 6/10

A structure survives an earthquake only if BOTH independent systems hold: the foundation (P = 0.98) and the frame (P = 0.95). What is the probability the structure survives?

Common Mistakes

Common Mistake

Confusing P(A|B) with P(B|A) — assuming they're equal.

In general P(A|B) ≠ P(B|A); they're related by Bayes' theorem, not equality. E.g. P(rain | clouds) is high, but P(clouds | rain) can be very different from P(rain | clouds).

Common Mistake

Treating mutually exclusive events as independent.

If A and B are mutually exclusive (A ∩ B = ∅) and both have positive probability, they are NOT independent — in fact P(A|B) = 0 ≠ P(A), since knowing B occurred tells you A definitely did not.

Quiz

The conditional probability P(A | B) is defined as:
Events A and B are independent exactly when:
For a system that works only if two INDEPENDENT components both work (series reliability), the success probability is:

Summary

  • P(A|B) = P(A ∩ B) / P(B) is the probability of A within the reduced sample space where B has occurred.
  • The multiplication rule P(A ∩ B) = P(A|B)P(B) = P(B|A)P(A) follows directly from the definition.
  • Events A and B are independent exactly when P(A|B) = P(A), equivalently P(A ∩ B) = P(A)P(B).
  • The law of total probability expresses P(A) as a weighted sum of conditional probabilities over a partition of the sample space.
  • Conditional probability underlies Bayes' theorem, Bayesian networks, and virtually all probabilistic inference.

References