AP® Computer Science Principles · Big Idea 5 · Topic 5.3

Bias Built into an Algorithm

An algorithm can discriminate without ever reading a protected characteristic, because other variables it does use, like zip code, correlate with that characteristic and quietly carry its bias into the math.

An algorithm counts as biased when its outputs are systematically skewed against a protected group, like race, gender, or age. That skew does not require the algorithm to ever check that attribute directly. A proxy variable is any input that correlates with a protected characteristic even though it is not that characteristic itself. Zip code correlates with race because of historical housing segregation. Name correlates with gender and ethnicity. College attended correlates with family income. When an algorithm weighs these proxies, it reconstructs the protected characteristic indirectly and bakes its bias into a decision that looks purely numerical.

Training data makes this worse, not better, in systems that learn from the past. A hiring filter trained on a company's past hiring decisions treats those decisions as the correct target to reproduce. If the company's human recruiters favored certain schools, names, or neighborhoods for decades, the algorithm learns that pattern as the definition of a good candidate and repeats it at scale, often more consistently and less visibly than a human would.

This is why arithmetic is not the same as neutrality. An algorithm is a procedure built by people, trained on data generated by people, operating in a society already shaped by unequal patterns. Numbers do not launder that history away. This connects to the next idea in the unit: once bias is built in, auditing the algorithm's outputs across groups, not just inspecting its code, is often the only way to catch it.

Key terms

Bias
A systematic skew in an algorithm's outputs that disadvantages a particular group.
Proxy variable
An input that correlates with a protected characteristic without being that characteristic itself.
Protected characteristic
An attribute like race, gender, or age that it is unfair or often illegal to discriminate on.
Training data
Past examples an algorithm learns from, which can encode historical human bias into its future decisions.

Watch it explained

  1. How it worksHow does a proxy variable smuggle a protected characteristic into a decision?
  2. Going furtherWhat changes about a hiring filter when past hiring decisions become its training target?
  3. Common mistakeWhy isn't an algorithm neutral just because it is made out of arithmetic?

Check yourself

Your turn1 of 2
A hiring algorithm scores 1423 candidates, and a proxy variable correlated with a protected characteristic quietly lowers the scores of 28 percent of them. How many of the n candidates have their scores affected?

End of topic.