📖 Scenario: You are part of a team developing an AI system that helps decide loan approvals. You want to understand how bias in AI can affect real people and what steps you can take to identify and reduce bias.
🎯 Goal: Build a simple example that shows how bias can appear in AI data and how it can lead to unfair decisions. Learn to recognize bias and think about ways to reduce it.
📋 What You'll Learn
Create a dataset representing loan applicants with attributes including gender and income
Add a threshold value to decide loan approval
Write logic to identify biased decisions based on gender
Add a final note explaining the impact of bias on real people
💡 Why This Matters
🌍 Real World
AI systems are used in many areas like loans, hiring, and policing. Bias in data can cause unfair treatment of people based on gender, race, or other factors.
💼 Career
Understanding bias is crucial for AI developers, data scientists, and anyone working with automated decision systems to ensure ethical and fair outcomes.
Progress0 / 4 steps
1
DATA SETUP: Create the loan applicants dataset
Create a list called applicants with these exact entries as dictionaries: {'name': 'Alice', 'gender': 'female', 'income': 50000}, {'name': 'Bob', 'gender': 'male', 'income': 60000}, {'name': 'Carol', 'gender': 'female', 'income': 45000}, {'name': 'Dave', 'gender': 'male', 'income': 70000}.
AI for Everyone
Hint
Use a list of dictionaries. Each dictionary should have keys 'name', 'gender', and 'income' with the exact values given.
2
CONFIGURATION: Set the income threshold for loan approval
Create a variable called income_threshold and set it to 55000. This will be the minimum income required for loan approval.
AI for Everyone
Hint
Just create a variable named income_threshold and assign it the value 55000.
3
CORE LOGIC: Identify biased loan approvals
Create a list called approved that contains the names of applicants who have income greater than or equal to income_threshold. Use a for loop with variables applicant to check each applicant's income.
AI for Everyone
Hint
Start with an empty list approved. Loop through applicants. If income is at least income_threshold, add the applicant's name to approved.
4
COMPLETION: Add a note on bias impact
Create a string variable called bias_note with this exact text: 'Notice that all approved applicants are male, showing gender bias in the data and decision process.'
AI for Everyone
Hint
Assign the exact text to a variable named bias_note.
Practice
(1/5)
1. What does bias in AI mean?
easy
A. Unfair treatment of some groups by AI systems
B. AI working faster than humans
C. AI making no mistakes
D. AI being used only for games
Solution
Step 1: Understand the meaning of bias
Bias means unfair preference or prejudice towards some groups.
Step 2: Connect bias to AI systems
Bias in AI means AI treats some groups unfairly, not equally.
Final Answer:
Unfair treatment of some groups by AI systems -> Option A
Quick Check:
Bias in AI = Unfair treatment [OK]
Hint: Bias means unfairness in AI decisions [OK]
Common Mistakes:
Thinking bias means AI is always wrong
Confusing bias with AI speed
Believing bias means AI never makes mistakes
2. Which of the following is a common cause of bias in AI?
easy
A. Using biased or incomplete data
B. Writing code in Python
C. Running AI on fast computers
D. Using balanced and fair data
Solution
Step 1: Identify causes of bias
Bias often comes from data that is not fair or complete.
Step 2: Evaluate options
Only Using biased or incomplete data mentions biased or incomplete data causing bias.
Final Answer:
Using biased or incomplete data -> Option A
Quick Check:
Biased data causes AI bias [OK]
Hint: Bias comes from bad or unfair data [OK]
Common Mistakes:
Thinking fast computers cause bias
Believing programming language causes bias
Assuming balanced data causes bias
3. An AI system used for hiring mostly selects candidates from one gender. What is the likely cause?
medium
A. The AI was programmed in a new language
B. The AI is too slow to process applications
C. The AI uses random selection
D. The AI was trained on biased data favoring that gender
Solution
Step 1: Analyze the hiring bias problem
The AI favors one gender, showing unfair treatment.
Step 2: Identify cause of bias
This usually happens if training data had bias favoring that gender.
Final Answer:
The AI was trained on biased data favoring that gender -> Option D
Quick Check:
Biased training data causes biased hiring AI [OK]
Hint: Bias in training data leads to biased AI results [OK]
Common Mistakes:
Thinking AI speed affects bias
Assuming random selection causes bias
Believing programming language causes bias
4. An AI loan approval system rejects many applicants from a certain ethnic group unfairly. What is a likely error to fix?
medium
A. Make the AI run faster
B. Change the AI programming language
C. Remove biased data from training and retrain the AI
D. Add more applicants from other groups
Solution
Step 1: Identify the unfair rejection problem
The AI unfairly rejects a group, showing bias.
Step 2: Find the fix for bias
Fixing bias means removing biased data and retraining AI fairly.
Final Answer:
Remove biased data from training and retrain the AI -> Option C
Quick Check:
Fix bias by cleaning data and retraining AI [OK]
Hint: Fix bias by cleaning data, not by speed or language [OK]
Common Mistakes:
Thinking speed or language fixes bias
Adding more data without checking bias
Ignoring biased training data
5. A company wants to use AI to screen job applicants fairly. Which approach best reduces bias?
hard
A. Make AI decisions secret so no one questions them
B. Use diverse and balanced training data and regularly check AI decisions
C. Use only data from one city to keep it simple
D. Train AI quickly without reviewing data quality
Solution
Step 1: Understand how to reduce AI bias
Reducing bias needs diverse, balanced data and ongoing checks.
Step 2: Evaluate options for fairness
Only Use diverse and balanced training data and regularly check AI decisions includes balanced data and regular checks to ensure fairness.
Final Answer:
Use diverse and balanced training data and regularly check AI decisions -> Option B
Quick Check:
Diverse data + checks = less AI bias [OK]
Hint: Balanced data and checks reduce AI bias best [OK]
Common Mistakes:
Using limited data thinking it's simpler
Hiding AI decisions instead of checking
Ignoring data quality and speed training
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.