Skip to content
Statistics

What is selection bias?

Distortion that occurs when the data you analyze are not representative of the population you want to draw conclusions about, because of how units ended up in the sample. Survivorship bias, non-response bias and self-selection are common forms.

datasciencetrivia.com

Card 1 of 263. Answer: Distortion that occurs when the data you analyze are not representative of the population you want to draw conclusions about, because of how units ended up in the sample. Survivorship bias, non-response bias and self-selection are common forms.

Created by santiviquez

About · Quizzes · Tools · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Selection bias is distortion caused by how observations got into your data: if the selection process is related to the outcome, estimates are skewed.

The main types: sampling bias, where the sampling frame misses part of the population, as when an online survey can't reach people who aren't online; self-selection or volunteer bias, where people choose to take part; non-response bias, where those who answer differ from those who don't; attrition bias, where people drop out of a study for reasons tied to the outcome; and survivorship bias, where only the cases that passed some filter are left to observe.

Selection bias vs sampling bias: sampling bias is the narrower case where the sampling method itself makes some units more likely to be picked. Selection bias also covers what happens after sampling, such as who responds, who drops out and who survives.

The classic example is the 1936 Literary Digest poll. The magazine mailed about 10 million ballots to its readers and to names from phone directories and car registrations, got about 2.4 million back, and predicted that Alf Landon would beat Franklin Roosevelt with 57% of the vote. Roosevelt won with about 61%. Phone and car owners were wealthier than average during the Depression, and the people who chose to reply differed again. George Gallup called the winner correctly with a far smaller sample, about 50,000 people: size can't rescue a biased sample.

Selection can also create correlations that don't exist. If two traits are independent in the population but you only see people who score high on their sum, the traits become negatively correlated in your sample. Simulate two independent standard normal traits, keep only the people whose sum is above 1.5 (about 15% of them), and the correlation among those kept is about −0.68. This is Berkson's paradox: among hospital patients, two diseases that are unrelated in the population can look negatively related, because either one is enough to get admitted.

In machine learning it hides in how training data and labels are collected. A credit model trained only on approved loans never sees how rejected applicants would have repaid. A recommender trained on clicks only learns about the items it chose to show. A model trained on one hospital's patients can fail at another hospital with a different mix of patients. Offline results can look fine while production disappoints, because the people the model scores are not the people it learned from.

The best fix is in the design: random sampling, or a small random holdout that is shown, approved or treated regardless of the model, gives unbiased data to learn from and to evaluate on. Compare the sample with known population figures, such as census age and income shares. When the selection probabilities are known or can be estimated, weight each row by 1 / P(selected): rows from a group sampled at 10% count 10 times, rows from a group sampled at 50% count twice. When selection depends on things you can't observe, model the selection itself, as in James Heckman's 1979 correction.

Interview follow-ups: whether collecting more data fixes selection bias (no, more of the same biased data only makes a wrong answer look more precise), how it differs from confounding (selection is about which units are in the data, while a confounding variable drives both the treatment and the outcome), and how you would check a survey for non-response bias (compare early and late responders, or follow up a random sample of non-responders).

All questions