100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

How to Solve Basic Conditional Probability Problems

Learn conditional probability with the shrink-the-sample-space method, the two-child family trap, and worked examples with answers.

mediumQ163 of 225 in Aptitude Est. time: 5 minsLast updated:
Open Code Lab

Expected Interview Answer

Conditional probability P(A|B) = P(A and B) / P(B) measures the chance of event A given that event B has already happened, which shrinks the sample space from everything down to just the outcomes where B is true.

The key mental shift is that B becomes the new, smaller universe β€” instead of dividing by all outcomes, you divide by only the outcomes consistent with B. In a two-child-family style problem, 'given that at least one child is a boy' eliminates the all-girls case, leaving a reduced sample space over which you recount favorable outcomes. Conditional probability is distinct from independence: A and B are independent exactly when P(A|B) = P(A), meaning knowing B happened gives no information about A. Most interview-level conditional problems are solved by explicitly listing the reduced sample space rather than blindly plugging into the formula, since listing prevents subtle miscounting.

  • Reframing B as the new sample space avoids formula misapplication
  • Explicit listing catches classic miscounting traps (like the two-child problem)
  • Distinguishing independence from conditioning clarifies when P(A|B) simplifies to P(A)

AI Mentor Explanation

Asking 'what is the chance a randomly chosen wicket is a bowled dismissal' is unconditional, using all wickets in the sample space. Asking 'what is the chance it was bowled, given it happened in the last 5 overs’ is conditional β€” you first shrink the sample space to only last-5-over wickets, then find how many of those were bowled, dividing by that smaller total rather than all wickets in the match. That shrink-then-recount is exactly P(A|B) = P(A and B)/P(B).

Worked example (two-child family)

Step-by-Step Explanation

  1. Step 1

    Identify A and B

    A is the event asked about; B is the given condition.

  2. Step 2

    Shrink the sample space to B

    List or count only outcomes consistent with B having occurred.

  3. Step 3

    Count favorable outcomes within B

    Find how many of B's outcomes also satisfy A.

  4. Step 4

    Divide within the shrunk space

    P(A|B) = (outcomes satisfying A and B) / (outcomes satisfying B).

What Interviewer Expects

  • Correct formula P(A|B) = P(A and B)/P(B)
  • Explicit listing of the reduced sample space to avoid miscounting
  • Clear distinction between conditional probability and independence
  • Recognition of classic traps like the two-child family problem

Common Mistakes

  • Dividing by the full sample space instead of the reduced one given B
  • Assuming P(A|B) = P(A) without checking independence
  • Miscounting the two-child problem as 1/2 instead of 1/3
  • Confusing P(A|B) with P(B|A) β€” these are generally different values

Best Answer (HR Friendly)

β€œConditional probability means the given information shrinks my sample space β€” I stop dividing by everything and start dividing only by the outcomes consistent with what I am told already happened. I find that explicitly listing the reduced sample space, rather than jumping straight to the formula, avoids classic traps like the two-child family problem.”

Follow-up Questions

  • How does P(A|B) differ from P(B|A)?
  • When does P(A|B) equal P(A), and what does that tell you about A and B?
  • How would you extend conditional probability to three events?
  • How does Bayes' theorem build on conditional probability?

MCQ Practice

1. A family has two children. Given at least one is a girl, what is P(both are girls)?

Sample space {BB,BG,GB,GG} shrinks to {BG,GB,GG} given at least one girl; favorable GG is 1 of 3.

2. If P(A and B) = 0.2 and P(B) = 0.5, what is P(A|B)?

P(A|B) = P(A and B)/P(B) = 0.2/0.5 = 0.4.

3. If P(A|B) = P(A), what can be concluded about A and B?

When knowing B occurred does not change the probability of A, A and B are independent by definition.

Flash Cards

Conditional probability formula? β€” P(A|B) = P(A and B) / P(B).

What does β€œgiven B” do to the sample space? β€” Shrinks it to only outcomes where B is true.

Independence test using conditional probability? β€” A and B are independent iff P(A|B) = P(A).

Classic conditional probability trap? β€” Two-child family: P(both boys | at least one boy) = 1/3, not 1/2.

1 / 4

Continue Learning