Statistics & Probability: lesson 4 of 5

Statistics & Probability

PATH 01MODULE 06LESSON 04 OF 05Next: Probability Distributions for Data Science

Probability Fundamentals and Conditional Probability

Reason about uncertain events, conditional risk, and how new evidence updates a Data Science question.

Beginner15 min readprobabilityconditional-probabilityriskclassification

Concept

Probability represents uncertainty on a scale from 0 to 1. An event is an outcome of interest; the sample space is the set of possible outcomes. A probability of 0 means impossible under the model, and 1 means certain.

Why It Matters

Fraud, churn, conversion, and model predictions are uncertain. Probability gives a language for describing risk without pretending every outcome can be known in advance.

Fundamentals

If 8 of 100 customers churned last month, the observed churn rate is 8 / 100 = 0.08. The complement is the probability of not churning: 1 - 0.08 = 0.92. Mutually exclusive events cannot occur together on one trial, such as an order being both refunded and not refunded. Independent events do not change each other's probability; do not assume independence without evidence.

Conditional Probability

P(A | B) reads “probability of A given B.” For example, P(churn | monthly contract) asks about churn among customers with monthly contracts, not among all customers.

P(fraud | international transaction) differs from P(international transaction | fraud). The first asks risk within international transactions; the second asks how common international transactions are among known fraud. Reversing them can lead to poor risk decisions.

Formula and Example

When useful, conditional probability can be written:

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

If 20 of 200 international transactions were fraud, then P(fraud | international) = 20 / 200 = 0.10. This does not tell you the overall fraud rate or whether being international causes fraud.

Bayes Intuition

Bayes' idea is that new evidence updates a prior belief. If fraud is rare overall but an event has suspicious evidence, the estimated risk can increase. In medical testing and fraud detection, the base rate matters: a highly accurate signal can still produce false positives when the event is uncommon.

Failure Signals

Common Mistakes

  1. Reversing P(A | B) and P(B | A).
  2. Treating observed frequency as a guarantee for one outcome.
  3. Assuming events are independent without checking context.
  4. Ignoring the base rate in classification decisions.

Best Practices

State the population and condition clearly, use counts alongside probabilities, and compare risk with the cost of errors. Validate probabilities on current data rather than relying on intuition alone.

Data Science Perspective

Conditional probability supports risk segmentation, classification metrics, A/B tests, and anomaly detection. Model probabilities should be interpreted alongside thresholds, base rates, and consequences of false positives and false negatives.

Interview Perspective

Question: What is the difference between P(A | B) and P(B | A)? A strong answer: they condition on different populations and are generally not equal.

Practice Questions

  1. State the complement of a 0.15 churn probability.
  2. Explain P(fraud | international) in plain language.
  3. Why does a rare-fraud base rate matter for alerts?

Quick Quiz

  1. What range can probability take? Answer: 0 to 1.
  2. What does the vertical bar mean in P(A | B)? Answer: given B.
  3. Are mutually exclusive events able to happen together? Answer: no.

Worked Example: Fraud Alerts

Consider 10,000 transactions where 1% are fraud. An alert that finds 90% of fraud but incorrectly flags 2% of legitimate transactions catches 90 fraud cases and flags about 198 legitimate cases. This distinguishes P(alert | fraud) from P(fraud | alert): the first measures how often fraud triggers an alert; the second measures the actual risk among alerts. Analysts need the second question when deciding how many cases to review, along with the costs of a missed fraud and a disrupted legitimate customer.

When to Use Conditional Thinking

Use conditional probability whenever a subgroup changes the reference population: churn among monthly-contract customers, conversion after an email, or defects from a production line. Show counts alongside rates because a percentage based on a handful of cases can change sharply. Probability describes uncertainty from data and a model; it does not establish that the condition caused the outcome. A high churn rate in one contract group is a reason to investigate, not proof of causation.

Practical Threshold Decisions

Probabilities often become decisions through a threshold. A model that gives 0.70 fraud risk is not saying fraud will certainly happen; it gives a score that must be combined with review capacity and error costs. Lowering a threshold catches more possible fraud but can increase false alerts. Raising it reduces alerts but can miss cases. Conditional probability and base rates help teams discuss that trade-off with evidence rather than intuition.

Comparing Groups Fairly

When comparing conditional risks, keep definitions consistent. Use the same churn window, the same customer eligibility rules, and comparable observation periods for each segment. A monthly-contract group may appear riskier simply because it includes newer customers. Examine possible confounders before recommending a policy change.

Key Takeaway

Key Takeaways

Probability describes uncertain events, and conditional probability changes the reference group. Clear conditioning and base-rate awareness are essential for risk reasoning.

Next Lesson

Next, learn the probability distributions that model common Data Science outcomes.

Finish this lesson on your terms

Mark it complete when you have worked through the material and are ready to move on.