# Bias and Fairness — Artificial Intelligence

Source: https://www.skillbyai.com/en/artificial-intelligence/e-bias

> Systems learn the patterns, and the prejudices, in their data.

## Where bias comes from

AI systems can treat groups of people unfairly because of **historical bias** in data (past decisions reflected discrimination), **sampling bias** (some groups under-represented), **measurement bias** (proxies such as arrests standing in for crime) or design choices (which errors are tolerated). Different fairness definitions (equal error rates, equal approval rates, calibration within groups) can conflict, so teams must choose deliberately with the people affected. Practical steps: measure performance per group, examine features that act as proxies, involve domain experts and affected communities, and keep humans accountable for consequential decisions.

## Fair, safe, accountable

AI systems affect people; building them well includes fairness, safety, privacy and accountability.

![Three ideas: bias and fairness, safety and regulation, a responsible checklist.](assets/figures/artificial-intelligence/section-8-map.svg) — Figure 8.1 — Fairness, safety and responsibility.

## Questions for a fairness review

Ask them before deployment and periodically after.

```text
who is affected, and who was in the training data?
which groups could be harmed, and how (denied a loan, misidentified, ignored)?
what are error rates per group? which errors are worse?
which features could proxy protected attributes (postcode, name)?
who can appeal a decision, and how?
who is accountable for the system's outcomes?
```

## Measure per group, not just overall

An accurate model on average can still fail badly for a minority group; the average hides it.

**Quiz:** Which is a common source of AI bias?

- [x] Historical data that reflects past discriminatory decisions
- [ ] Using too many GPUs
- [ ] Fast inference
- [ ] Writing tests

*Answer:* Historical data that reflects past discriminatory decisions. Models learn what the data shows.
