Aller au contenu

Leçon 16 · Uncertainty and Sampling

Bias in Data: When Errors Lean One Way

Recognize selection, non-response, survivorship, measurement, recall and response bias, see their effect in simulations and learn ways to reduce each one.

Random error scatters results up and down. Bias is a systematic lean: errors that push results in the same direction again and again. Random error tends to average out as you collect more data. Bias does not. A scale that always reads 2 kilograms too high gives you the same wrong answer no matter how many times you use it.

Random error and bias

Two kinds of error

Random Scatter that averages out
Bias A lean that stays
1 / 2
Python More data does not remove bias

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

As n grows, the fair scale settles close to 70, while the biased one settles close to 72.

Who gets into the data

  • Selection bias: the way cases enter the data favors some kinds. A study of exercise habits run only among gym members is likely to find unusually active people.
  • Coverage bias: the frame leaves people out, such as an online-only survey that misses people without internet access.
  • Non-response bias: those who answer differ from those who do not. Very busy people, or very unhappy ones, may respond at different rates.
  • Volunteer bias: people who opt in often have stronger opinions or more interest.
  • Survivorship bias: you only see the cases that "survived" a filter. If you study only successful companies to learn what makes success, you miss failed companies that did the same things.

The survival idea is often illustrated with damaged aircraft in wartime: the planes that returned show where a plane can be hit and still get home. Planes hit elsewhere may be missing from the data.

Python Survivorship bias in a list of funds

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Even though no fund had any skill, a list of surviving funds looks successful. These funds are invented and say nothing about real investments.

How answers get distorted

  • Measurement bias: the instrument or definition systematically misreads, such as a miscalibrated sensor or a test that favors one group's background.
  • Response (social desirability) bias: people shade answers toward what seems acceptable, for example about exercise or spending.
  • Recall bias: memory is imperfect and may be shaped by what happened later.
  • Question wording and order: leading words or earlier questions can nudge answers.
  • Observer bias: the person recording expects a result and judges unclear cases that way. Blinding, where the judge does not know which group a case belongs to, helps.

Bias in analysis and reporting

Bias can also happen after collection:

  • Confirmation bias: noticing and keeping evidence that supports your view.
  • Cherry-picking: reporting only favorable periods, groups or measures.
  • Publication bias: striking results are more likely to be published than quiet or null ones, so the visible evidence can look stronger than the whole.
  • Many comparisons: if you test many things, some will look interesting by chance alone.

Bias in automated systems

Data used to train a computer model reflects past decisions and who was recorded. If past hiring favored one group, a model trained on that history may repeat the pattern, even without an explicit group column, because other variables can act as stand-ins. Check results for different groups, and keep humans responsible for important decisions. The data ethics lesson returns to this.

Reducing bias

Problem Helpful action
Frame misses people Add other channels such as phone or in person
Low response Send reminders; compare responders with the population
Leading questions Neutral wording and pilot tests
Faulty instruments Calibrate against a trusted reference
Observer expectations Written rules and blinding
Cherry-picking Decide measures and periods before looking

You rarely remove all bias. The honest goal is to reduce it, describe what remains and say which direction it likely pushes the result. "Our survey probably overstates satisfaction because very unhappy customers had already left" is far more useful than a number presented as certain.

Ask: "Who or what is missing, and how might they differ?" This single question finds many biases.

A worked bias hunt

A fitness app reports that its users walk 9,000 steps a day on average. Look for bias at each stage.

  • Who gets in: only people who installed the app and allowed step tracking. They may be more interested in activity than most people.
  • Who stays: people who stop being active may delete the app, so the remaining users look more active (survivorship).
  • How it is measured: steps are counted only when the phone is carried. Someone who leaves it on a desk seems less active, while shaky rides might add false steps.
  • What is reported: maybe only days with at least 1,000 steps are included, which removes quiet days.

Some of these push the average up, and one pushes it down. You cannot know the net effect without more information. A fair statement would be: "Among users who keep the app and carry their phones, recorded steps average 9,000 a day on the days counted." It does not describe how much people in general walk.

Practice

Name the likely bias in each case. First, a radio show asks listeners to phone in about a new tax. Second, people are asked how many times they ate vegetables last month. Third, a review site shows only restaurants that are still open.

Answers: the phone-in invites volunteer bias, since callers with strong views are more likely to respond, and it also covers only listeners. The vegetable question risks recall bias, and perhaps response bias if people want to sound healthy. The review site shows survivorship bias, because restaurants that closed, possibly after poor reviews, are missing. In each case, also say which way the error might push the result, and admit it when you cannot tell.

Do not assume a dataset is unbiased because it is large, automatic or produced by a computer. Automatic collection can repeat the same skew millions of times.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What happens to a systematic bias when you collect much more data in the same way?

    More data collected the same way reduces random variation, not a consistent lean.
  2. 2. Interviewing only people who completed a long course to learn how good the course is risks which bias?

    People who dropped out may have had a very different experience and are missing.
  3. 3. Which step helps against observer bias?

    Blinding and written rules limit the influence of expectations.
  4. 4. Which statement about a biased result is most useful?

    Naming the likely direction of bias lets readers judge the result sensibly.

Summary

  • Bias is a systematic lean that more data does not fix.
  • Selection, coverage, non-response, volunteer and survivorship bias affect who is counted.
  • Measurement, response, recall and observer bias distort values.
  • Choose measures before looking, and watch for cherry-picking.
  • Describe remaining bias and its likely direction.

Next: Chance Variation and Margin of Error

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.