What is bias?
The app is "95% correct". It calls a scabbed Ambri leaf healthy. It wasn't lying — it had just never seen a Kashmir sky.
- Train a leaf detector that's secretly biased
- Catch it by testing group by group
- Make it fairer — and prove it
What is bias?
The app is "95% correct". It calls a scabbed Ambri leaf healthy. It wasn't lying — it had just never seen a Kashmir sky.
- Train a leaf detector that's secretly biased
- Catch it by testing group by group
- Make it fairer — and prove it
Story
Learn it
The scab app was honest about its 95%: it was 95% correct on the leaves it had seen, sunny leaves of one variety from far away. On Uncle's Ambri leaves under a grey Kashmir sky it failed. That is bias: results that are unfairly tilted, working better for some people, places or things than for others. An AI does not choose to be unfair. Bias comes from the data and from the choices of the people who built it.
Words to know
when a system's results are unfairly tilted, working better for some people, places or things than others.
the examples a model learns from. A model learns only from these.
data that leaves some groups out, or has very few of them.
the share of all test items the model got right. It can hide failures in one group.
checking accuracy separately for each group (sunny leaves, shady leaves) to find bias.
Step by step: catching hidden bias
A leaf model is tested on 100 photos and gets 90 right: 90% overall. Now break it down:
| Group | Photos | Right | Accuracy |
|---|---|---|---|
| sunny leaves | 80 | 78 | 98% |
| shady leaves | 20 | 12 | 60% |
- Look at the overall number: 90% sounds good.
- Split the results by group: sunny and shady.
- Compare: 98% in sun, but only 60% in shade. In shade it is wrong 4 times in 10.
- Find the cause: the training photos were almost all sunny. The model never learned what scab looks like in shade.
- Fix it and prove it: add shady photos to the training data, train again, and test each group again.
Careful: the question is never only "Is it accurate?" but "Is it accurate for everyone?" When an AI decides something important, such as a loan, a job or a medical check, a small tilt can hurt the same people again and again.
Your missions
unit-5/leaves-healthy-sunny/ and leaves-scab-sunny/ (20 each) · leaves-test-mixed/ (20: shade, cloud, close-ups, other varieties) · later, leaves-extra-shade/The biased model
groups of 3–411 min- 1
Teachable Machine → Image Project → Standard image model. Don't sign in. Name the classes
HealthyandScab. - 2
Upload
leaves-healthy-sunnyinto Healthy andleaves-scab-sunnyinto Scab. Train Model — don't switch tabs. - 3
Predict: will it do better on sunny test leaves or shady ones? Note it.
Only you can see this - 4
Preview → File, test each photo in
leaves-test-mixed. Inbias-test.ods, record: Photo · Real answer · Model said · Correct? (Y/N) · Light (sunny / shade / cloudy). - 5
Count right answers in sun and in shade or cloud:
=COUNTIFS(E2:E21;"sunny";D2:D21;"Y").
Make it fairer
groups9 min- 6
Add the
leaves-extra-shadephotos to the right classes and train again. - 7
Test the same photos. Fill a second column: Model said (after).
- 8
Compare. Which group improved most?
No laptop today?
The teacher shows 10 printed leaf cards. The class "trains" a volunteer Model on the 4 sunny cards only, then the Model sorts 6 shade cards. Record the mistakes, add 4 shade cards to training, try again.
Debate it
The leaf app works well for big orchards that bought expensive cameras, and badly for small farmers with old phones.
Is that just bad luck, or is it unfair? Who should fix it: the farmer, the company, or the government?
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.What does bias in an AI system mean?
- AThe AI is broken and gives random answers
- BThe AI's results are unfairly tilted, working better for some than for others
- CThe AI is slow
- DThe AI has an opinion like a person
2.If a model is 95% accurate overall, it must be fair to every group.
TrueFalse3.Where does bias in AI usually come from? (choose all that apply)
- ATraining data that leaves some groups out
- BChoices made by the people who build it
- CThe colour of the laptop
- DThe AI deciding it dislikes someone
4.To check a model for bias, we ask: is it accurate for ______?
Don't just ask "Is it accurate?" Ask "Is it accurate for everyone?"
Typing practice
Skill: typing a short paragraph, then fixing it (Term 3 focus, 7 min)
- On typing.com, open an Intermediate paragraph lesson.
- Then type this in a new Writer document, without looking at the keys: "Bias means a system is unfair to some people or things. It often comes from the data."
- Go back and fix every mistake with the arrow keys and Backspace, not by retyping the whole line.
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.