# Selection bias

> Canonical: https://skillalmanac.com/glossary/selection-bias | Last verified: 2026-11-25 | Index status: index-eligible

Selection bias occurs when the process determining which cases are observed creates systematic differences between the observed data and relevant unobserved cases.

## In plain language

Selection bias can make conclusions misleading when included cases differ systematically from excluded cases. In AI, it matters when training or evaluation data do not adequately represent the population on which a model or agent will operate.

## Technical definition

Selection bias arises from an observation or inclusion process that systematically separates observed from unobserved cases. It includes problems involving coverage, sampling and differential nonresponse. Statistical adjustment may reduce some risks, but its effectiveness depends on identifying and measuring relevant covariates.

## How it shows up when you use agents

Selection bias occurs when the process deciding which cases enter the data creates systematic differences between observed and unobserved cases. A model can fit its available sample well yet behave differently for the population where an agent is actually used.

Consider an explicitly illustrative feedback study for a customer-service agent. The target population is all customers who completed a session, but the survey appears only in the desktop interface and answering is optional. Mobile customers have no opportunity to respond, creating a coverage problem. Among desktop customers, people with unusually strong experiences may respond more often, creating differential nonresponse. The resulting ratings may not describe all completed sessions, even if thousands of responses are collected.

The useful action is to map four things before drawing conclusions: the target population, the available sampling frame, the selected sample and the cases that ultimately responded or received labels. Compare known characteristics across these stages, such as device, task type or time period. If important groups have different opportunities or propensities to appear, state that limitation and test the system on data covering the intended population where possible.

## Common confusions

Sampling bias can be a form of selection bias, but the terms are not universal substitutes in every statistical context. Selection bias is the broader problem created by an inclusion or observation process. Sampling bias focuses on how cases are selected from a target group. Coverage and nonresponse can introduce related selection problems through different mechanisms.

Convenience sampling is one possible source: readily available cases are selected without known random inclusion probabilities. It is not the only source of selection bias, and a non-probability sample is not repaired merely by being large.

Adjustment or matching may reduce differences on measured characteristics. It cannot automatically correct differences involving omitted, unavailable or poor-quality variables. The relevant question is therefore not simply whether data were adjusted, but which variables controlled selection and whether they adequately capture the differences connected to the outcome.

Selection bias also differs from model error caused by a weak algorithm. Changing the model alone does not repair missing representation or establish performance for groups absent from the collected data. Examine data inclusion before attributing a performance gap solely to model architecture.

## Worked examples in this catalogue

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Review an agent evaluation set for its stated decision, coverage tags, grader requirements and split leakage, then record which intended users or situations the cases omit.

Why it exercises the concept: Documenting case coverage makes selection questions concrete. This skill checks case structure and declared coverage; it does not verify population representativeness, estimate selection probabilities or repair selection bias.

## Related terms

- [Convenience sampling](https://skillalmanac.com/glossary/convenience-sampling.md)
- [AI bias](https://skillalmanac.com/glossary/ai-bias.md)
- [Training data](https://skillalmanac.com/glossary/training-data.md)
- [AI fairness](https://skillalmanac.com/glossary/ai-fairness.md)

## Sources

- [Machine Learning Glossary: Selection bias](https://developers.google.com/machine-learning/glossary#selection-bias), Google for Developers (accessed 2026-11-25)
- [Report of the AAPOR Task Force on Non-Probability Sampling](https://aapor.org/wp-content/uploads/2022/11/NPS_TF_Report_Final_7_revised_FNL_6_22_13.pdf), American Association for Public Opinion Research (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
