Menu

Conditional Probability and Independence

Conditional Probability and Independence

Conditional probability is the chance of an event after you already know that another event has happened. Extra information changes the odds.

Conditional Probability

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

  • P(A | B): the probability of A given that B has already happened. Read the bar as “given”.
  • P(A and B): the probability that both events happen together.
  • P(B): the probability of the event you know occurred. Dividing by it narrows the focus to only the cases where B is true.

Example: A company emails 200 customers. 80 opened the email, and 20 of those 80 made a purchase. Across all 200 customers, 40 made a purchase. Does opening the email change the chance of buying?

  1. P(opened) = 80 / 200 = 0.40
  2. P(opened and purchased) = 20 / 200 = 0.10
  3. P(purchase | opened) = 0.10 / 0.40 = 0.25
  4. P(purchase) overall = 40 / 200 = 0.20

Among people who opened the email, 25% bought, against 20% overall. Opening the email is linked to a higher chance of buying.

Independence

Two events are independent when knowing one tells you nothing about the other. Either of these conditions confirms it:

  • P(A | B) = P(A)
  • P(A and B) = P(A) × P(B)

In the example above, P(opened) × P(purchase) = 0.40 × 0.20 = 0.08, but P(opened and purchased) is 0.10. Since the two numbers differ, the events are not independent.


Probability and Statistics for Data Science

AP

Abhishek Pati



Learn via Video Course

Probability and Statistics for Data Science Logo

Probability and Statistics for Data Science

4 hrs



Get in Touch For Details