Data science

Stage 2 · Lesson 3 of 8

Conditional probability and base rates

Statistics and probability you actually use

is the chance of something given that something else happened, written P(A|B). Bayes' rule lets you flip it: P(A|B) equals P(B|A) times P(A), divided by P(B). The piece people forget is the base rate, how common A is to begin with.

If 1% of orders are fraud and a flag catches 99% of fraud but also flags 5% of normal orders, most flagged orders are still normal, because there are so many more normal orders. This reasoning appears in fraud, medical tests, spam filters and every classifier you will build.

Common trapconfusing P(A|B) with P(B|A): "most fraud gets flagged" is not the same as "most flagged orders are fraud".

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • VideoFree
    StatQuest with Josh Starmer

    StatQuest · Beginner

    Free: short, clear videos on each concept, from the normal distribution to p-values and power

  • CourseFree
    Khan Academy Statistics and Probability

    Khan Academy · Beginner

    Free: the probability, sampling distributions, confidence intervals and significance tests units, with practice

Practise

  • Free textbook with end-of-chapter exercises on real data, and labs in R

  • Free: statistics taught through Python code on real datasets, with notebooks you can run

Keep handy

Also worth your time

Mark this stage as not done?