◀ 9.59.69.7 ▶

9.6 — Bias, Filtering & Fair Data

Yesterday's dataset looked scientific. Today the harder question: WHO is in it? Data can be perfectly collected and perfectly wrong, because the sample — not the numbers — carries the bias. This is the IOC-1 core idea on the exam, and it starts with your own playtest pool.

In this lesson you will be able to answer“how do I tell whether data is fair?”
Break It Down~10 min

Decide whether your playtest data is fair. The answer is not in the numbers — it is in who is missing from the table, and in what you quietly removed before you looked at it.

First, before anything else: cut that into parts small enough that you could look each one up on its own.

  1. Name who is actually in the tablewhat does this part do?Read: the player_id and run_id columns of the dataset you read in 9.5, and the pool audit in Step 1 of the Build Lab below
  2. Say what population that sample stands in forwhat does this part do?Read: the scope sentence you write in Step 1 of the Build Lab below
  3. Find the players the table has no row forwhat does this part do?Read: the completed_boss column of the dataset, and the absences you list in Step 2 of the Build Lab below
  4. Watch what a filter removes before you look at what it keepswhat does this part do?Read: the filtered average in Step 3 of the Build Lab below, and the same move in 9.5
  5. Write the claim at the strength the data can carrywhat does this part do?Read: the "which claim is BEST supported" practice in the Concept Lab above

The split is the whole lesson. "Is this data fair?" is one question you can only answer by feel; these five are five checks you can run in order, and each one has somewhere to read about it. Nothing here needs a program — fairness lives in the sample and in what you chose to drop, which is why the exam asks about claims rather than about code.

The test: could you defend the claim with only the table in front of you? A part that needs your memory of who playtested, rather than a column you can point at, is not part of the data problem.

Your turn

Pick two of the parts above and say in one line what each one actually does.

Thirty-two rows is not thirty-two opinions. Rewrite one of yesterday's insights with its scope clause attached, and say which half of the sentence got weaker and which half got honest.

Name one filter on this dataset that would raise the average rating, and say what a report would have to print next to that average to keep it honest.

Concept Lab ~15 min

Sampling bias, in your room. Who playtested your cave? Your friends, your table, people who already play platformers. If the class's data says "section 3 is easy," but every tester has 200 hours of Hollow Knight — is section 3 easy? The data is TRUE about the SAMPLE and misleading about the PLAYERS WHO WILL ACTUALLY PLAY. That gap is sampling bias.

BiasIn your project
Selection biasPlaytesters who volunteered are more forgiving (self-selection)
Survivorship biasYou count the players who stayed to the end. The ones who quit mid-cave left no row at all
Observer effectTesters play differently when the designer watches (2.4 — why we sit silently)
Confirmation biasYou tune what you already suspected was broken

Filtering — the exam's favorite trap. A filter is a question you ask data: "show me only section 5." Filtering helps see patterns; it can also silently erase people. The classic: "let's drop the outlier runs" — until you realize the dropped runs are all the players who quit, and your average difficulty just got friendlier for no reason.

Socratic

The dataset holds 32 runs from 8 testers, and the runs that never beat the boss are still sitting in it — which is why the whole table averages 3.8 out of 5. Somebody wants to publish "players gave the cave 4 out of 5." The exam asks: "Which claim is BEST supported?" — write the cautious version AND the overreaching version of that sentence, and say why the exam always wants the first.

Build Lab ~20 min

Step 1 — audit the playtest pool. For the playtests.csv dataset (or your own 7.7 table): list who was IN the sample and what kind of player was NOT. Write one sentence of scope: "This data represents ___, and does not represent ___."

Step 2 — find the missing rows. The dataset has completed_boss = FALSE rows. Who is ABSENT entirely? Players who stopped playing mid-cave — no row at all. For each of these absences, name the conclusion that the data would silently get wrong, and say which column you would have to start recording to stop it.

Check your answers name your own first

Then compare. Every one of these is a claim the table would have made happily without the missing rows in it.

  • The average rating reads too high: the runs that never finished are the runs that scored low, and the players who quit for good are not in the table at all.
  • The section times read too fast: a player who stopped mid-cave never timed the section that stopped them, so the file's times only describe the players who kept going.
  • The difficulty curve reads too flat: the hardest section is the one where people stopped, and stopping is the one thing the file has no row for.

Step 3 — a fair-data fix, in pseudocode. Nothing here compiles or runs: this is the exam's arrow-and-DISPLAY notation used to write down what happens to the rows. It is data reasoning, not a program. Design the fix the exam wants — a filtered average that also REPORTS what it excluded:

kept ← [row FOR row IN runs IF row.completed_boss = TRUE]
dropped ← [row FOR row IN runs IF row.completed_boss = FALSE]
DISPLAY("avg win time: " + AVERAGE([row.time_seconds FOR row IN kept]))
DISPLAY("excluded: " + LENGTH(dropped) + " runs")

The second DISPLAY is the ethics: an aggregate that hides its filter is a claim wearing a lab coat.

Step 4 — algorithmic bias preview. Games do this too: your difficulty ramp assumes a player who finished the tutorial. Matchmaking assumes history predicts behavior. Recommendation algorithms trained on biased clicks show more of what was already popular. Same principle, bigger consequences — 9.10 takes it to the real world.

Checkpoint — before moving on, you must be able to:

Reference Docs

Need a deeper explanation? These pages cover the same concepts:

Next: 9.7 — Computer Systems: What Runs Your Game

0/4 answered

Answers save on this device as you type. At the end of class, click Download and upload the file to the Canvas assignment.

Saved on this device only — the Dashboard tracks your progress.