📖 Chapter 4 of 12 · AI for New Learner- Senior 1 · Class 9
Chapter 4: Probability & Confidence
In this chapter
- Ishika from Ranchi — IOAI bronze medallist.
- Probability basics: P always between 0 and 1.
- Why AI gives confidence scores (not just answers).
- Bayes’ theorem — how AI updates its mind with new evidence.
- Calibration: when 90% confidence is actually wrong 30% of the time.
The Big Idea
AI doesn’t say ‘spam’ or ‘not spam’. It says ‘I am 87% sure this is spam’. That 87% is a PROBABILITY — and knowing how to read it, trust it, and challenge it is what separates a real engineer from a button-pusher. Probability is also the language of Bayes — how AI changes its mind when it sees new evidence.
Did you know?
The International Olympiad in Artificial Intelligence (IOAI) is the highest school-level AI competition. India won multiple medals in 2024 and 2025. Most winners started with probability — exactly what you are about to learn.
Builder Profile: Ishika
Ranchi, Jharkhand · Ishika, age 14
Ishika lives in Ranchi. She did not have access to coaching. She did have a phone, a free school laptop, and Khan Academy’s probability videos.
Every evening for 8 months she solved one probability problem. Then two. Then she started competing online — Kaggle Indian competitions for students. Her first model failed. The next one was better. By month 10, she qualified for the Indian AI Olympiad selection. By month 14, she won bronze at IOAI.
She still keeps her first failed model in a folder called ‘thank you’. “That model taught me everything,” she says. “Failure is not failure. Failure is feedback. And feedback is the only way AI — and humans — improve.”
⊕ MATH MINUTE The Three Rules of Probability
Every probability P is between 0 and 1. If something cannot happen, P = 0. If it MUST happen, P = 1. And when you list all possible outcomes for one event, their probabilities ALWAYS sum to exactly 1.
0 ≤ P ≤ 1 and Σ P(all outcomes) = 1
WHY THIS MATTERS
Every spam filter, every fraud detector, every UPI safety check uses Bayes. The bank starts with a PRIOR (you usually pay Rs 500 in the evening), sees evidence (Rs 50,000 at 2 AM), and updates to a POSTERIOR (this might be fraud). Bayes is alive in your phone.
✍ WORKED EXAMPLE Is This Email Spam?
Problem: 10% of emails are spam (prior). The word ‘WINNER’ appears in 60% of spam emails but only 1% of normal emails. An email says ‘WINNER’. What is the probability it is spam?
- Write Bayes: P(spam | WINNER) = P(WINNER | spam) × P(spam) ÷ P(WINNER).
- Top of fraction: 0.60 × 0.10 = 0.06.
- Bottom: P(WINNER) = (0.60 × 0.10) + (0.01 × 0.90) = 0.06 + 0.009 = 0.069.
- Divide: 0.06 ÷ 0.069 ≈ 0.869.
- Interpret: about 87% chance this email is spam. Bayes started at 10% and updated to 87% after seeing one clue — AI changed its mind based on evidence, like a good detective.
Show answer
✓ Answer: P(spam | ‘WINNER’) ≈ 87%. AI moved from 10% to 87% with one piece of evidence.
⚠ COMMON MISTAKE
✗ Mistake: ‘My AI has 99% accuracy!’ — but the AI ALWAYS predicts ‘not spam’ and only 1% of real emails are spam. The 99% is LYING because the data is imbalanced; the AI never catches a single spam.
✓ Fix: ALWAYS check sub-group accuracy and the confusion matrix. Report precision and recall separately, not just one accuracy number. Real engineers ask: ‘What is the accuracy on the MINORITY class?’
Solved illustrations
1. What does a probability of 0 or 1 mean?
Show answer
Answer: P = 0 means the event cannot happen; P = 1 means it must happen. Everything real sits between. A weather app saying ‘70% rain’ means P = 0.7.
2. In one sentence, what does Bayes’ theorem do?
Show answer
Answer: It updates a prior belief into a new (posterior) belief after seeing evidence — moving spam from a 10% prior to an 87% posterior after one clue.
3. What is calibration and why must engineers care?
Show answer
Answer: Calibration is how honest a model’s confidence is. A well-calibrated ‘90% sure’ is right 90% of the time. Many deployed AIs are over-confident, so Indian banks now require calibration alongside accuracy for loan decisions.
4. Why is ‘99% accuracy’ sometimes misleading?
Show answer
Answer: If only 1% of emails are spam, an AI that always says ‘not spam’ is 99% accurate while catching zero spam. Accuracy hides failure on the minority class — check precision and recall.
5. Give one real Indian AI that uses Bayes-style updating.
Show answer
Answer: UPI fraud detection: it holds a prior about your normal behaviour and updates to flag a transaction when the evidence (new device, odd amount, late hour) shifts the probability toward fraud.
Questions — Chapter 4
A. Compute
- You roll a fair 6-sided die. P(rolling a 4)? P(rolling odd)? P(rolling 7)?
- P(rain tomorrow) = 0.3. P(no rain tomorrow) = ?
- 5% of users are scammers. A test flags 80% of scammers but also 2% of honest users. By Bayes, given a user is flagged, what is P(scammer)?
- A weather app says ‘70% chance of rain’ 100 times. How many times should a well-calibrated app actually see rain?
B. Short answers
- In one sentence, what does Bayes’ theorem do?
- What is calibration and why must AI engineers care?
- Why is ‘99% accuracy’ sometimes a misleading claim?
- Give one real Indian AI that uses Bayes-style updating.
Ship-It Challenge
Track weather forecasts for 7 days. Note ‘60% rain’ days. Was it well-calibrated?
Check your understanding — Chapter 4
Tap an answer to check it instantly. These are for practice — nothing is saved or sent.
Q1. What must always be true about a probability P?
- It can be any number
- It is always between 0 and 1, and all outcomes of one event sum to exactly 1
- It is always more than 1
Show answer
B. It is always between 0 and 1, and all outcomes of one event sum to exactly 1
Q2. In one sentence, what does Bayes' theorem do?
- It sorts a list
- It updates a belief (prior) into a new belief (posterior) after seeing evidence
- It measures speed
Show answer
B. It updates a belief (prior) into a new belief (posterior) after seeing evidence
Q3. What is calibration?
- Making a model faster
- How honest a model's confidence is — a well-calibrated '90% sure' should be right 90% of the time
- The size of the dataset
Show answer
B. How honest a model's confidence is — a well-calibrated '90% sure' should be right 90% of the time
Q4. Why can '99% accuracy' be a misleading claim?
- 99% is always bad
- If only 1% of emails are spam, an AI that always says 'not spam' scores 99% while catching zero spam
- Accuracy is never useful
Show answer
B. If only 1% of emails are spam, an AI that always says 'not spam' scores 99% while catching zero spam