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)P(A) → Probability of event A
  • P(BA)P(B \mid A) → Probability of B given A has occurred

The symbol | means “given that”


Conditional Probability Formula

Mathematical Definition

P(BA)=P(AB)P(A),P(A)0P(B \mid A) = \frac{P(A \cap B)}{P(A)}, \quad P(A) \neq 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 ABA \cap B11 / 52

Step 2: Apply Formula

P(BA)=152/452=14P(B \mid A) = \frac{1}{52}/ \frac{4}{52} = \frac{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
ABA \cap B6

Step 2: Calculate

P(A)=36P(AB)=26P(A) = \frac{3}{6} \\[0.5em] P(A \cap B) = \frac{2}{6}
P(BA)=26/36=23P(B \mid A) = {\frac{2}{6}}/{\frac{3}{6}} = \frac{2}{3}

Conditional Probability Formula (Rearranged)

From definition:

P(AB)=P(A)×P(BA)P(A \cap B) = P(A) \times P(B \mid 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(BA)=P(B)P(B \mid A) = P(B)

Meaning:

  • Event A does not affect event B

Example

Coin tosses:

P(Head on 2nd tossHead on 1st toss)=0.5P(\text{Head on 2nd toss} \mid \text{Head on 1st toss}) = 0.5


Liked This Tutorial

Scan QR Code To Leave A Review Or

Click Here To Leave A Review
Scan QR