Where Bias Hides in Data
A model trained on biased data will produce biased predictions — not because anyone intended it, but because the data quietly encoded a distorted picture of the world. This is not a minor technical glitch. Biased ML models have wrongly flagged loan applications, led to unfair hiring decisions, and produced face recognition systems that work well for some people and poorly for others. Understanding where bias comes from is a professional responsibility for anyone who works with data.
Three Major Sources of Data Bias
Sampling bias happens when the examples in your dataset are not representative of the people or situations you want the model to work for. A classic historical example: in the 1930s, a magazine ran a presidential poll and predicted a landslide for the wrong candidate. They had surveyed millions of people — but almost all were wealthy car and telephone owners, not the broader voting population. Their massive sample was massively biased. In ML today, sampling bias appears when a medical dataset is collected at one hospital in one city — and then a model trained on it is deployed across the whole country. Patients in rural areas, or patients from different ethnic backgrounds, may have systematically different health profiles that the training data never captured.
Sampling bias occurs when the process of collecting data systematically excludes or underrepresents certain groups or scenarios. The dataset does not mirror the real world the model will operate in. Any model trained on it will have blind spots exactly where the data was thin.
Historical bias is more insidious. It occurs when the training data accurately reflects the past — but the past contained unfair patterns that should not be reinforced. A hiring algorithm trained on ten years of a company's hiring decisions will learn that the company historically hired mostly men for engineering roles. The data is not collected incorrectly — those hires really happened. But the pattern reflects past discrimination, not an objective measure of who can do the job. A model that learns this pattern will perpetuate the discrimination automatically. Historical bias is difficult because the data is technically accurate. The problem is not how it was collected; it is what it records.
Label bias occurs during the annotation process — when the humans applying labels bring inconsistent or prejudiced judgments. If a dataset of essays is labeled for quality by annotators who unconsciously rate essays about certain topics lower, that bias flows into the model. If a medical dataset labels patients as 'high risk' based on how much healthcare they have historically used — and poorer patients use less care because of cost barriers — then 'high risk' actually means 'used a lot of healthcare,' not 'is actually sicker.' A real published study found exactly this pattern in a major healthcare algorithm used across the US.
How Bias Harms and What to Do
Bias in data harms real people. Hiring algorithms filter out qualified candidates. Credit algorithms deny loans to creditworthy applicants. Face recognition systems misidentify people of certain races at higher rates, which has led to wrongful arrests. Detecting and reducing bias requires deliberate action: Audit who is represented in your dataset and who is not. Compare model performance separately for different demographic groups — if accuracy is high for one group and low for another, bias is likely present. Question labels critically: what human judgment produced them, and could that judgment be biased? Do not assume that a model is fair just because it was trained on real data. Real data can encode real injustice.
Bias often hides in variables that seem neutral. Using zip code as a feature can encode racial and economic segregation. Using prior arrests as a feature can encode policing patterns that fell harder on certain communities. A technically accurate feature can carry deep social bias. Always ask: what does this variable actually measure, and what else does it correlate with?
Match each type of bias to the scenario that best illustrates it.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
A company uses a model to decide which job applicants to interview. The model was trained on ten years of past hiring decisions that favored one group. What type of bias does this represent?
A face recognition system achieves 99% accuracy on light-skinned faces but only 65% accuracy on dark-skinned faces. This is most likely caused by:
Bias Audit
- Step 1: Imagine you are building a dataset to predict whether students will enjoy a science elective class.
- Step 2: You decide to survey 100 students from two middle schools in your city.
- Step 3: List three ways your sample might not represent all middle schoolers fairly.
- Step 4: For each problem you listed, write one concrete change to your data collection plan that would reduce the bias.
- Step 5: Now consider your label: 'enjoyed the class — yes or no.' Who will assign these labels? Could their judgment be biased? How would you check?