Good Data vs Bad Data · Lesson 3.2.1
Teaching "Good Data vs Bad Data" to Hacker mode (ages 11–14)
Part of the Good Data vs Bad Data lesson guide. Teaching a different grade? 🌈 Explorer (5–7) · 🔧 Builder (8–10) · ⚡ Architect (15–18)
Hook & Warm-Up
Open with the lesson's own framing, delivered as a serious claim worth pushing back on if a student disagrees:
"Bad data makes bad AI. The quality of training data is the single biggest factor in whether AI works fairly. Let's examine how data bias propagates through AI systems."
Ask the class directly: "Do you think that's actually true — that data quality matters more than, say, how clever the algorithm is, or how much computing power you throw at it?" Let a few students argue either side. Push back gently on anyone who says "a good enough algorithm can overcome bad data" — the honest technical answer is no: an algorithm can only find patterns that exist in the data it's given, so if the data itself is skewed, no amount of algorithmic sophistication fixes that at the source. Some algorithms can partially correct for known bias after the fact, but that's a mitigation, not a cure — and it requires already knowing the bias is there.
Frame today's session: "We're going to look at three specific ways bias gets baked into training data — not as one vague problem, but as three distinct mechanisms — and then look at how people actually try to detect and reduce it."
Warm up with a quick prediction exercise: "Suppose an AI model that screens loan applications is trained on data where a certain neighborhood was historically denied loans at high rates by human loan officers, for reasons that had nothing to do with actual creditworthiness. Even if we remove 'neighborhood' entirely from the data before training — no address, no zip code — do you think the model could still end up biased against that neighborhood?" Let students debate before confirming: yes, very possibly, if other features in the data (like income patterns, employment history, or anything else correlated with where people from that neighborhood tend to live or work) let the model reconstruct the same pattern indirectly. This previews the idea of a bias signal surviving even after its most obvious carrier is removed — a theme the class will come back to.
Main Activity
Move through the lesson's three scenes, but push the class toward precise, technical vocabulary rather than staying at "AI can be unfair."
Scene 1 — Data Quality ✨. Frame these as the baseline requirements any dataset needs before bias even enters the discussion:
- ✨ Clean Data vs. 🗑️ Dirty Data — accuracy and correct labeling. Note that label noise (incorrectly labeled examples) doesn't just reduce accuracy uniformly — if the mislabeling isn't random (say, mislabeling is more common for one category), it can itself introduce bias.
- 📏 Enough Data — insufficient data means the model can't find reliable patterns and may overfit to noise. Connect this to a term some students may have seen elsewhere in AIQ: with too little data, a model tends to memorize specifics rather than learn generalizable patterns.
- 🌈 Diverse Data — this is the bridge into bias proper: a model trained only on sunny-weather photos hasn't just seen "less data," it's seen a non-representative sample of the conditions it will actually be used in.
Scene 2 — Bias in Data ⚖️. This is where the lesson's summary vocabulary comes in — introduce all three named types of bias explicitly, using the three real cases from the app as concrete anchors:
- Selection bias — the training data doesn't representatively sample the population the model will be used on. 👤 Face Bias is the clearest example: some commercial face-recognition systems were trained on datasets dominated by lighter-skinned faces, so they had systematically fewer examples of other skin tones — a sampling problem, not an intelligence problem.
- Historical bias — the data accurately reflects the past, but the past itself encoded unfair patterns, so the model learns to reproduce them going forward. 💼 Hiring Bias is the textbook case: it was reported that Amazon's experimental resume-screening tool was trained on ten years of historical hiring data from a male-dominated applicant pool, and it downgraded resumes mentioning things like "women's chess club" — reproducing, not inventing, a historical skew. 🏦 Loan Bias works the same way: models trained on decades of lending records can replicate discriminatory patterns (like historical redlining) that existed in that historical data, even with no discriminatory intent in the model's design.
- Measurement bias — the lesson's summary names this as a third category: it happens when the way data is collected or measured is itself flawed or inconsistent across groups (for example, a proxy variable that correlates with a protected attribute, or an instrument that's less accurate for some subjects than others). Ask students for a hypothetical: a fitness tracker's heart-rate sensor that's calibrated and tested mostly on one skin tone may measure less accurately on others — that's a measurement bias, distinct from a sampling (selection) problem.
Have students explicitly classify the three real cases (face, hiring, loan) as selection bias, historical bias, or a mix — face bias is primarily selection bias (who was sampled), while hiring and loan bias are primarily historical bias (what the past data encoded). This classification exercise is the real payoff of Scene 2 at this age band.
Scene 3 — Fixing Data Problems 🔧. Connect each fix to the bias type it addresses:
- 🔍 Audit Data — systematically checking a dataset's composition against the target population to detect selection bias before training.
- ➕ Add Diversity — this is data augmentation: deliberately collecting or generating more examples from underrepresented groups to correct a known imbalance.
- 🧪 Test for Bias — measuring model accuracy separately across different groups (sometimes called a fairness or disparate-impact evaluation) to detect whether historical or selection bias made it into the trained model.
- 👥 Diverse Teams — a process-level mitigation: people with different backgrounds and lived experience are more likely to notice a gap in the data or a flawed measurement choice that a more homogeneous team would miss.
Before closing, revisit the loan warm-up question from the hook: "Now that we've named selection bias, historical bias, and measurement bias — which one was that loan example, and what would 'Audit Data' actually look like in practice for it?" Push students toward a specific answer: a team would need to check whether other features in the dataset (income, employment length, existing account history) correlate strongly with neighborhood, and test the model's approval rates broken out by neighborhood even with neighborhood removed as an input — because a correlated feature can smuggle the same historical bias back in.
Close by reading the lesson's summary together and making sure students can restate all three bias types in their own words before moving to the quiz.
Discussion
- "Can a model have zero selection bias but still be historically biased? Give an example." (Yes — data could perfectly sample today's applicants, but if today's hiring patterns already reflect past discrimination, the historical bias is still there.)
- "Why is measurement bias sometimes harder to detect than selection bias?" (Selection bias can often be spotted by checking who's represented in the dataset; measurement bias requires knowing that the collection instrument itself behaves differently across groups, which isn't always visible just by looking at the data.)
- "If a company tests its AI and finds it's biased, but fixing it would take months, what should they do in the meantime?"
- "Is it possible for a dataset to be 'too diverse' — could adding more variety ever hurt a model's usefulness for a specific, narrow task?"
- "Who should be responsible for auditing a dataset for bias before an AI product launches — the data scientists, a separate team, an outside regulator, or someone else? Why?"
- "'Test for Bias' means checking accuracy separately across groups. What counts as a meaningful difference versus normal statistical noise, and why might that be a genuinely hard line to draw?"
Quiz Walkthrough
Historical bias in training data means... (Data expires with current technology / Past societal discrimination is encoded in the data / History is biased / Old data is better)
Past societal discrimination is encoded in the data. Historical bias doesn't mean the data is wrong or outdated in a technical sense — it means the data accurately reflects real historical patterns that were themselves unfair, like the male-dominated hiring history behind the Amazon case. A model trained on it faithfully reproduces that unfairness going forward.
Selection bias occurs when... (Training data doesn't representatively sample the target population / Users select features / Models select wrong answers / Developers select tools)
Training data doesn't representatively sample the target population. This is a sampling problem: the face-recognition case is the clearest example, where the dataset had disproportionately fewer examples of certain skin tones than the population the system would actually be used on.
Fairness metrics like demographic parity measure... (Training time / Data size / Whether predictions are equally distributed across protected groups / Model speed)
Whether predictions are equally distributed across protected groups. This is the formal version of "Test for Bias" from Scene 3 — instead of a general sense that a model "seems unfair," a metric like demographic parity gives a concrete, measurable check on whether outcomes differ systematically across groups.
Data augmentation for bias mitigation involves... (Synthetically generating underrepresented examples / Deleting biased data / Ignoring bias / Using more compute)
Synthetically generating underrepresented examples. This is the technical name for "Add Diversity" from Scene 3 — rather than just deleting problematic data (which can shrink an already-small dataset further), practitioners generate or collect additional realistic examples specifically for the groups that were underrepresented.
Wrap-Up & Extension
Close with: "You now have vocabulary that most adults using AI every day don't have — selection bias, historical bias, measurement bias, demographic parity. That vocabulary isn't just for a test; it's what lets you ask a sharp, specific question the next time someone tells you an AI system made a decision, instead of a vague 'is that fair?'"
Extension activity — "Classify the Bias" case study: Give squads three or four short, real or realistic scenarios they haven't seen yet (for example: a resume-screening tool trained mostly on graduates of a handful of universities; a medical AI trained on data from a hospital that serves mostly one age group; a security camera system whose lenses perform worse in low light common in poorly-lit neighborhoods). For each, have the squad decide: is this selection bias, historical bias, measurement bias, or a mix — and what's one concrete audit or augmentation step from Scene 3 that would help? Have squads compare answers and defend disagreements. This pushes the classification skill from Scene 2 into fresh, unscripted examples and comfortably fills a full class period.