Probability inside an AI decision
“Scab — 98% confident.” “Scab — 52% confident.” Same word. Should the uncle spray both trees?
- Read a confidence score as a probability
- Find where the mistakes cluster
- Set a line for when a person checks
Probability inside an AI decision
“Scab — 98% confident.” “Scab — 52% confident.” Same word. Should the uncle spray both trees?
- Read a confidence score as a probability
- Find where the mistakes cluster
- Set a line for when a person checks
Story
Learn it
A classifier never just says "scab". It says "scab, 98%" or "scab, 52%", and those are very different answers. The number is a confidence score: the probability from Lesson 3.3, produced by a machine. The scores across all classes add to 100%, so the model must always pick something; it has no way to say "I can't tell". That makes the score the place to look for doubt: mistakes cluster where confidence is low.
Words to know
the model's probability for its answer, like Scab 98%. It is not a verdict and not the model's accuracy.
the scores for every class. With two classes they add to 100%, so the lowest a "winning" answer can be is just over 50%.
a range of scores grouped together: high (90% and above), middle (70–89%), low (below 70%).
a line you choose, such as 70%. Below it, a person checks.
a person reviewing a prediction before anyone acts on it.
Step by step: setting a threshold for twenty predictions
| Band | Predictions | Wrong |
|---|---|---|
| high (90%+) | 12 | 0 |
| middle (70–89%) | 5 | 1 |
| low (below 70%) | 3 | 2 |
- Overall accuracy: 3 wrong out of 20 → 17 ÷ 20 = 85%.
- Split by confidence: the high band was never wrong; 2 of the 3 mistakes are in the low band.
- Try a threshold of 70%: a person checks the 3 low predictions (15% of the work) and catches 2 of the 3 mistakes.
- Try a stricter 90%: a person checks 8 predictions (40% of the work) and catches all 3.
- Choose: stricter lines catch more mistakes and cost more time. Which line is right depends on what a mistake costs, and how many people are available to check. That is a human decision.
🕌 From our heritage
Long before machines printed percentages, Muslim jurists were careful to distinguish yaqīn — certainty — from ẓann, probable knowledge, and from mere doubt. They held that much practical reasoning rests on ẓann al-ghālib, what is most probably the case, and they said so openly rather than dressing a likely answer as a certain one. A model's 52% is ẓann. The honesty is in naming it.
A standard distinction in uṣūl al-fiqh (the principles of jurisprudence); see the discussion of certainty and probability in the classical uṣūl literature. You met the branching questions of that tradition in Class 6.
Careful: a high score is not proof. A model trained only on sunny photos can be 98% sure about a shady leaf and still be wrong, because confidence only compares the classes it knows. Treat the score as a guide to where to doubt, never as a reason to stop checking.
Your missions
Tool: LibreOffice Calc. File needed: unit-3/leaf-predictions.ods — twenty
predictions from the leaf classifier the class trained in Class 8. Column B is what the model
said, column C how confident it was, column D what the leaf actually was.
Your mission
- 1
In E2 type
=IF(B2=D2;"Right";"Wrong")and fill down to E21. - 2
In G2, overall accuracy:
=COUNTIF(E2:E21;"Right")/20*100. Write it down. - 3
Now split by confidence. In G4 count the high-confidence predictions:
=COUNTIFS(C2:C21;">=90"). In G5, how many of those were wrong:=COUNTIFS(C2:C21;">=90";E2:E21;"Wrong"). - 4
Repeat for the middle band in G7 and G8, using
">=70"together with"<90". - 5
Repeat for the low band in G10 and G11, using
"<70". - 6
Fill in this sentence in G13: "The model was wrong ____ times in twenty. ____ of those mistakes were predictions it was less than 70% sure of."
- 7
Make the rule. In G15, count how many photos fall below 70%:
=COUNTIFS(C2:C21;"<70"). In G16 write what fraction of the work that is, as a percentage. - 8
In G17 answer: if a person checks only those photos, how many of the model's mistakes would they catch, and how much of the work is that?
- 9
Try a stricter rule. Change the line from 70 to 90 and answer the same two questions. Which rule would you give the uncle, and why?
No laptop today?
Print the twenty predictions on cards and lay them on a desk in confidence order, highest to lowest. Turn over each card to reveal whether it was right. The wrong ones cluster at one end of the row, and the class can see the line where a person should start looking.
Debate it
A hospital screening tool flags possible disease in chest X-rays. It is 94% accurate overall, and its mistakes cluster below 75% confidence.
Where would you set the line for a doctor to look, and what would it cost to set it too high? Answer for a hospital with two radiologists and four hundred X-rays a day.
Check yourself · practice, not a test
In the app, students answer these one at a time and each answer is checked straight away. It's practice, never a mark — anything they miss comes back later for another go.
1.A model outputs "Scab 52%, Healthy 48%". The best reading is:
- AThe leaf is definitely scabbed
- BThe model is 52% accurate
- CThe model could not decide between the two
- DThe model is broken
2.In a two-class model, the confidence scores always add up to ______%.
3.A model's mistakes are spread evenly across all confidence levels.
TrueFalse4.Moving the human-check line from 70% up to 90% will:
- ACatch fewer mistakes and cost less work
- BCatch more mistakes and cost more work
- CCatch more mistakes and cost less work
- DMake no difference to either
5.Why is a confidence score useful? (choose all that apply)
- AIt shows where the model is least reliable
- BIt lets a team decide what a human should check
- CIt proves the model is right
- DIt turns one answer into a probability you can reason about
A confidence score tells you where to doubt. The line for a human to look is your decision, not the model's.
Typing practice
4 minutes on typing.com: accuracy under thought.
- Term 2 lessons. Target 94%.
- Then type
COUNTIFSand>=ten times each. Today's formulas use both, and>=typed as=>is the error you will hunt for five minutes.
- COUNTIFS
- >=
- >=
- =>
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.