liveBook · Manning

Selection bias

As explained in Experimentation for Engineers

Systematic measurement error caused by collecting samples under conditions that differ across the populations or variants being compared.

Selection bias is systematic measurement error caused by collecting samples under different conditions. In A/B comparisons, applying that condition consistently to only one variant creates confounder bias and can reverse the decision. section 2.1.2

Trading costs and time of day

Suppose BYSE is measured before lunch and ASDAQ afterward. Because morning trading adds cost, the experiment can repeatedly report that ASDAQ is cheaper even when BYSE is normally cheaper. Measuring each exchange separately in morning and afternoon exposes the time-of-day effect. section 2.1.2

Reduce selection bias by:

  • Randomizing which variant receives each measurement across morning and afternoon, rather than assigning variants to fixed time windows. section 2.1.2
  • Taking many measurements to reduce ordinary variation, while recognizing that repeated biased measurements remain consistently wrong. section 2.1.2

How Experimentation for Engineers covers it

How deep it goes
Demonstrates bias with a simulator, repeated means, numerical outputs, and randomized Python measurement.
Examples
Uses ASDAQ and BYSE trading costs, morning-versus-afternoon conditions, NumPy simulations, and randomized coin-flip assignment.
What it assumes
Assumes familiarity with repeated measurements and comparing system variants, while defining sampling and confounder bias through a concrete scenario.
What you can do after
Diagnose confounded comparisons and apply randomized measurement across changing operating conditions.
How it connects
Connects sampling bias to confounder bias, randomization, A/B testing, measurement variation, and experimental comparison.

Also explained in

Compare how 4 books explain selection bias →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Experimentation for Engineers. The section links point to the parts of the book it draws on.