Lesson Β· β± 7 min read
π² Probability and distributions
EnglishHinglish
π Real-life example
The weather app says '70% chance of rain'. That doesn't mean it rains for 70% of the day. It means that on days like this, it rained 7 times out of 10. AI models talk the same way: '92% likely spam' is a probability, not a certainty.
π‘ In simple words
Probability is a number from 0 (impossible) to 1 (certain) that says how likely something is. A distribution describes how likely each possible value is. The normal distribution, or bell curve, is common: heights, exam scores and measurement errors cluster around the average and thin out at the extremes. Many ML models output probabilities, and you choose a threshold, say 0.5, to turn them into decisions. Conditional probability, P(A given B), is the chance of A when you already know B happened.
πͺ Step by step
- Probability is a number from 0 (impossible) to 1 (certain). A fair coin landing heads is 0.5.
- Combine events: 'and' for independent events multiplies (two heads = 0.5 Γ 0.5 = 0.25); 'or' for exclusive events adds.
- Conditional probability: P(fraud | flagged) is the chance it's fraud given it was flagged. It can be very different from P(flagged | fraud).
- Distributions describe how values spread: the normal (bell curve) for heights or errors; skewed ones for income or waiting times.
- Models output probabilities (0.83 chance of churn). You choose a threshold to turn them into decisions.
π Key terms
- Probability
- How likely something is, from 0 to 1.
- Normal distribution
- The bell-shaped curve where most values sit near the average.
- Threshold
- The cut-off that turns a probability into a yes/no decision.
π See it in action
Model says: P(fraud) = 0.83 for this UPI transaction
Threshold 0.5 β flag it β
Threshold 0.9 β let it pass
Lower threshold = catch more fraud, but annoy more honest customers.Choosing a threshold is a business decision, not just a maths one.
β οΈ Common mistakes to avoid
- Ignoring the base rate: a 95% accurate test for a rare disease still produces mostly false alarms.
- The gambler's fallacy: after five heads, tails is not 'due'. Independent events have no memory.
β Quick check
A model says an email is 'spam with probability 0.6'. What does that mean?
- 60% of the email is spam
- It's more likely spam than not, but not certain
- It is definitely spam
Show answer
B. It's more likely spam than not, but not certain: 0.6 means that out of many similar emails, about 6 in 10 would be spam. It's likely, not certain.
π Questions learners ask
How much probability do I need for AI jobs?
For most engineering roles: basic probability, conditional probability and the idea of distributions. Research roles need much more.
Is a model's 0.9 score really a 90% chance?
Only if the model is calibrated. Many models are over-confident; you can check calibration by comparing predicted scores with how often things actually happened.
π Remember
Model outputs are usually probabilities, and you pick the threshold.
Learn this as part of a full course
Track your progress, take the quick checks and follow the lessons in the right order. This lesson is part of:
Continue in the course