Selection bias

Selection bias is a distortion that occurs when the data chosen for analysis or training is not representative of the situation it is meant to describe, because of how it was selected.

Selection bias happens whenever the process that decides which examples end up in a dataset is tied to the thing being studied. The result can be a pattern that exists in the data but not in the world. Google's Machine Learning Crash Course defines it for machine learning as choosing examples in a way that does not reflect their real-world distribution.

Google splits it into three common forms. Coverage bias: a model predicting sales of a new product is trained only on surveys of people who bought it, so buyers of a rival product are missing. Non-response bias: the survey includes both groups, but rival buyers are far more likely to refuse, so they are under-represented. Sampling bias: respondents are the first 200 people to answer an email rather than a random draw. Statisticians add others, such as attrition, where people who drop out of a study differ from those who stay, and volunteer bias, where people who sign up differ from those who do not.

A simple dieting example shows the danger. If a study of a diet keeps only the participants who stuck with it, the results look excellent, because the people for whom it failed have left the data. The same trap applies in AI. A loan model trained only on loans that were approved never sees how rejected applicants would have repaid. A model trained on user feedback hears mostly from the users who bother to give it.

Selection bias is hard to fix after the fact, because the missing examples are missing. Statistical corrections exist for special cases, but the main defences come earlier: thinking through how data was gathered, collecting from the full population of interest, and checking whether the training data's mix matches the conditions a model will face.

Common questions

What is selection bias in machine learning?

It is when the training or evaluation data is chosen in a way that does not reflect the conditions the model will face, so the model learns a distorted picture. Common forms are coverage bias, non-response bias and sampling bias.

What is an example of selection bias?

A loan approval model trained only on past approved loans never sees how rejected applicants would have behaved, so it cannot learn about them. In medicine, studying only patients who finish a treatment can make the treatment look better than it is.

Is selection bias the same as sampling bias?

Sampling bias is usually treated as one type of selection bias, concerned with how the sample was drawn. Selection bias is the broader term and also includes distortions introduced later, such as dropouts or filtering data after collection.

Can selection bias be corrected statistically?

Only partly. Methods such as reweighting or the Heckman correction can help in specific cases, but analysis of the existing data alone generally cannot fix it, because the examples that would reveal the problem were never collected.

Finding more

Search for "selection bias examples", "non-response bias" or "selection bias machine learning fairness". Reliable sources include epidemiology and statistics textbooks, fairness modules in machine learning courses from major providers, and peer-reviewed audits of specific datasets. When a study or product reports strong results, look for a description of how its data was selected.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.