📊 Conditional Probability

Last Updated: Jan 2026


Conditional Probability measures the probability of an event when another event has already occurred.

It answers questions like:

  • What is the chance of B, given A has happened?
  • How probability changes when conditions are applied

This concept is core to:

  • Bayes’ Theorem
  • Machine Learning (Naive Bayes)
  • Statistics & Data Science

🗣 Hinglish Tip: Conditional Probability = condition lagne ke baad probability nikalna

Basic Notation

  • A, B → Events
  • P(A) → Probability of event A
  • P(B | A) → Probability of B given A has occurred

The symbol | means “given that”


Conditional Probability Formula

Mathematical Definition

P(B | A) = P(A ∩ B) / P(A),  P(A) ≠ 0

Meaning

  • Numerator → Probability of both A and B
  • Denominator → Probability of A
  • Sample space becomes restricted to A

Conceptual Understanding (Very Important)

When condition A happens:

  • We discard outcomes where A did not occur
  • Probability is recalculated within event A only

🗣 Hinglish Tip: Condition lagte hi sample space chhota ho jaata hai

Example 1: Cards (Classic College Example)

A card is drawn from a standard deck of 52 cards.

  • Event A: Card is a King
  • Event B: Card is a Heart

Step 1: Find probabilities

EventFavorable OutcomesProbability
King (A)44 / 52
King of Hearts (A ∩ B)11 / 52

Step 2: Apply Formula

P(B | A) = (1/52) / (4/52) = 1/4
Probability that the card is a Heart given it is a King = 1/4

Example 2: Dice (Independent vs Conditional)

A fair die is rolled.

  • A: Number is even
  • B: Number is greater than 3

Step 1: Identify sample spaces

EventOutcomes
A (Even)6
B (>3)6
A ∩ B6

Step 2: Calculate

P(A) = 3/6
P(A ∩ B) = 2/6
P(B | A) = (2/6) / (3/6) = 2/3

Conditional Probability Formula (Rearranged)

From definition:

P(A ∩ B) = P(A) × P(B | A)

This is used heavily in:

  • Joint probability
  • Bayes’ theorem
  • ML models

Conditional Probability vs Independent Events

Independent Events Rule

If A and B are independent:

P(B | A) = P(B)

Meaning:

  • Event A does not affect event B

Example

Coin tosses:

P(Head on 2nd toss | Head on 1st toss) = 0.5