Conditional Probability Calculator -P(A|B) Calculator

Conditional Probability Calculator

Calculate P(A|B) – the probability of event A given that event B has occurred

Calculator

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

What is Conditional Probability?

Conditional probability is the probability of an event occurring given that another event has already occurred. It answers the question: “What is the probability of event A happening, knowing that event B has happened?”

The basic formula for conditional probability is:

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

Where:

  • P(A|B) = Probability of A given B
  • P(A ∩ B) = Probability of both A and B occurring
  • P(B) = Probability of B occurring
Note: P(B) must be greater than 0 for conditional probability to be defined.

Common Examples and Applications

Card Drawing Example

Consider drawing cards from a standard deck. What’s the probability of drawing a red card on the second draw, given that the first card drawn was red?

  • After drawing one red card: 25 red cards remain out of 51 total cards
  • P(Red on 2nd | Red on 1st) = 25/51 ≈ 0.49 or 49%

Medical Testing Example

The probability of having breast cancer for women aged 40-50 is about 1%. However, if a mammogram is positive, this probability increases to approximately 8.3%.

Weather and Traffic Example

If there’s a 5% chance of rain on any given day, but a 75% chance of coughing when sick, we can calculate various conditional probabilities based on observed conditions.

Key Properties and Rules

Multiplication Rule

From the conditional probability formula, we can derive the multiplication rule:

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

Independence

Two events A and B are independent if P(A|B) = P(A), which means knowing that B occurred doesn’t change the probability of A.

Bayes’ Theorem

Bayes’ theorem allows us to reverse conditional probabilities:

P(A|B) = [P(B|A) × P(A)] / P(B)

Practical Applications

  • Medical Diagnosis: Calculating disease probability given test results
  • Quality Control: Probability of defective products given certain conditions
  • Finance: Risk assessment and portfolio management
  • Machine Learning: Classification algorithms and prediction models
  • Marketing: Customer behavior prediction based on demographics
  • Weather Forecasting: Probability of rain given atmospheric conditions

Common Mistakes to Avoid

  • Confusing P(A|B) with P(B|A): These are generally different values
  • Assuming independence: Not all events are independent
  • Forgetting the condition: P(B) must be greater than 0
  • Misinterpreting causation: Conditional probability doesn’t imply causation
Scroll to Top