---
title: "Data Quality and Bias | FiveStudy"
description: "Algorithmic bias, the collection method that decides who gets counted, and why incomplete or inaccurate data makes correct code produce wrong answers. AP CS A learning objective 4.1.B."
url: https://fivestudy.com/guides/data-quality-and-bias
---

[AP Computer Science A](https://fivestudy.com/ap-computer-science-a) · Study guide

# Data Quality and Bias

[Figure: FiveStudy logo]

FiveStudy

Unit 4 · Topic 4.1

Unit 4 · Data Collections · Topic 4.1

# Data Quality *and Bias*

A data set that looks perfectly fine, and the four questions that show it is not.

Exam-day recap

- **Algorithmic bias** is systemic and repeated errors in a program that create unfair outcomes for a specific group of users.
- Bias is about the distribution of error, not its size: wrong for one group repeatedly is bias, not mere inaccuracy.
- Nothing in the definition mentions intent; bias in this course is a property of outcomes.
- Examine the **collection method** and its potential for bias before extrapolating or drawing conclusions.
- Incomplete data is usually visible; inaccurate data is usually invisible and almost always worse.
- Bad data makes a program work incorrectly **or** inefficiently — both words count.
- Describing the data is safe; extrapolating beyond it is where the collection method starts to matter.
- Volume does not fix a skewed method: 400 from a skewed method is a precise measurement of a skewed group.
- A complete, accurate data set can still be the wrong data set if it lacks the variable that explains the pattern.

## 1Start With a Data Set That Looks Fine

A team is building a program to recommend after-school clubs. They collect a data set by adding a short survey to the school's online portal. Two weeks later they have 400 responses, and this is the summary:

| Club | Interested | Share |
| --- | --- | --- |
| Robotics | 132 | 33% |
| Debate | 96 | 24% |
| Orchestra | 74 | 19% |
| Track | 61 | 15% |
| Art | 37 | 9% |

Four hundred responses is a real sample. The percentages add up. Nothing is missing, nothing is malformed, and the program built on this will run without a single error.

It will also be wrong, and this topic is about why.

The learning objective

**4.1.B — explain the importance of recognizing data quality and potential issues when using a data set.** Note that the verb is *explain*, and note what it applies to: not the program's logic, but the data the logic runs on. A correct program on a flawed data set produces confident, well-formatted, wrong answers.

## 2Algorithmic Bias, Precisely

The course defines the term narrowly, and the precision is the point:

Definition

**Algorithmic bias** describes **systemic** and **repeated** errors in a program that create **unfair outcomes** for a **specific group** of users.

Four requirements, and an answer that misses one is describing something else:

| Requirement | What it rules out |
| --- | --- |
| **systemic** | A one-off glitch. The error comes from how the system is built, not from bad luck |
| **repeated** | A single incident. It happens again, the same way |
| **unfair outcomes** | Mere inaccuracy. Being wrong for everyone equally is a defect, not bias |
| **a specific group** | Random error. The cost lands consistently on identifiable people |

Bias is not the same as being wrong

A program that is 12% off for every user is inaccurate. A program that is 2% off for most users and 30% off for one group is **biased**, even though it is more accurate overall. The distribution of the error is what makes it bias, not the size of it — and a question that offers "the program is inaccurate" as a distractor is testing exactly this.

Nobody has to intend it

Nothing in the definition mentions intent. Bias in this course is a property of *outcomes*. "The programmers weren't biased" is not a defense, and it is not an answer to a question about algorithmic bias.

## 3Where It Enters: the Collection Method

The essential knowledge is specific about what a programmer must examine:

Essential knowledge 4.1.B.2

Programmers should be aware of the **data set collection method** and the **potential for bias** when using that method, **before** using the data to extrapolate new information or draw conclusions.

Not the data — the *method*. Return to the club survey. It was collected through the school's online portal, and that single choice decided who could answer:

| The method | Who it selects for | What that does to the result |
| --- | --- | --- |
| Delivered through the online portal | Students who log in regularly | Students who use school tech most are over-represented — and they skew toward the tech-oriented clubs |
| Voluntary response | Students who already care about clubs | Students with no current club, the ones the program is meant to help, answer least |
| Two-week window during term | Students in school that fortnight | Anyone absent, on placement, or joining later is absent from the data entirely |

Drawn as the funnel it actually is, the three filters are visible at once:

Read the table again

Every one of the 400 responses is genuine. Nobody lied, nothing was mis-entered, and no code is wrong. The bias is entirely in **who had the opportunity to be counted** — which is why the essential knowledge points at the collection method rather than at the values.

### 3.1 Robotics at 33% Was Never the Finding

The finding is "33% of students who log into the portal regularly, chose to answer a voluntary survey, and were in school during those two weeks, said they were interested in Robotics." Shortening that to "33% of students want Robotics" is where the error is introduced — not in the program, but in the sentence describing what the number means.

If the recommender then allocates rooms and staff by those shares, the effect is systemic (built into the allocation), repeated (every term), unfair to a specific group (students who were never sampled), and it produces measurably worse outcomes for them. That is algorithmic bias assembled from a survey nobody filled in dishonestly.

### 3.2 What the Number Becomes When the Missing Group Appears

Suppose the school later runs the same survey on paper in registration, reaching the students the portal missed. 260 more responses come back:

| Club | Portal (400) | Paper (260) | Combined (660) | Share |
| --- | --- | --- | --- | --- |
| Robotics | 132 | 29 | 161 | 24% |
| Debate | 96 | 41 | 137 | 21% |
| Orchestra | 74 | 34 | 108 | 16% |
| Track | 61 | 88 | 149 | 23% |
| Art | 37 | 68 | 105 | 16% |

Robotics falls from 33% to 24%. Track goes from fourth to a near tie for first. Art, the club the first data set marked for cutting at 9%, comes in at 16% — level with Orchestra, which it had trailed by ten points.

Nothing was corrected

Not one of the original 400 responses changed. No error was found and no value was fixed. The ranking moved because the **method** changed — and a program that had already allocated rooms on the first table would have been systematically wrong about Track and Art, every term, for exactly the students the online form under-reached.

Why this example is worth carrying into the exam

It answers the most common objection: *surely 400 responses is enough?* Sample size was never the problem. 400 from a skewed method is a precise measurement of a skewed group, and precision is not representativeness.

## 4Incomplete and Inaccurate Data

Essential knowledge 4.1.B.3

Some data sets are **incomplete** or contain **inaccurate** data. Using such data in the development or use of a program can cause the program to work **incorrectly or inefficiently**.

Two different faults with two different signatures:

|  | Incomplete | Inaccurate |
| --- | --- | --- |
| What is wrong | Values are missing or whole cases never appear | Values are present but wrong |
| How it looks | Often visible — blank fields, short records | Usually invisible — a wrong number looks like a number |
| Typical damage | The program skips, crashes, or silently under-counts | The program computes confidently and is wrong |
| Which is worse | Inaccurate, almost always — because nothing signals it |  |

### 4.1 "Incorrectly or Inefficiently" — Both Words Count

**Incorrectly** is the obvious one: a missing score drags an average down, a mistyped year puts a record in the wrong decade.

**Inefficiently** is the word students forget, and it is in the essential knowledge for a reason. Bad data makes programs do more work. A search over a list with hundreds of duplicate entries examines every duplicate. A routine that must check each value for validity before using it does two passes where clean data needs one. The answers may come out right and still cost more than they should.

A cheap habit that catches most of it

Before computing anything, count. How many records are there, how many have a missing field, what is the smallest and largest value, and how many duplicates exist? Four numbers, and they surface most incomplete-or-inaccurate problems before a single result is produced.

### 4.2 Inaccurate but Plausible — a Walkthrough

Six rows from a support-ticket log, all of which pass any reasonable format check:

| Ticket | Opened | Minutes to resolve | Rating |
| --- | --- | --- | --- |
| 4471 | 09:14 | 23 | 4 |
| 4472 | 09:31 | 0 | 5 |
| 4473 | 10:02 | 41 | 3 |
| 4474 | 10:02 | 41 | 3 |
| 4475 | 11:47 | 1440 | 5 |
| 4476 | 13:20 | 18 | 4 |

Every field is the right type and in a believable range. An average resolution time computed from this is **260.5 minutes**. Now look properly:

- **4472 resolved in 0 minutes.** Either a ticket closed by mistake, or one where the clock never started. Probably not a fast resolution; check it before excluding it.
- **4473 and 4474 are identical.** Almost certainly one ticket entered twice — it will be counted twice in every statistic.
- **4475 took exactly 1440 minutes.** Exactly 24 hours, to the minute, looks like a default fill or an overnight batch close rather than someone finishing work; confirm it before excluding it.

Treating those three as suspect gives an average nearer **27 minutes**, an order of magnitude away from the first figure. Neither number came from a bug.

The tells worth learning

Exact zeros, exact round numbers, and duplicate rows are the three cheapest signals of inaccurate data. None of them is proof — a ticket really can be resolved in a round number of minutes — but each is worth a second look before a result built on it is reported.

## 5Extrapolation Is Where the Damage Happens

The essential knowledge chooses a precise word: the concern arises when using the data to **extrapolate new information** or **draw conclusions**.

The distinction worth holding

**Describing** the data is nearly always safe — "132 respondents chose Robotics" is true regardless of how they were selected. **Extrapolating** beyond it is where the collection method starts to matter, because you are now making a claim about people who are not in the data.

| Claim | Safe? | Why |
| --- | --- | --- |
| "132 respondents chose Robotics" | **Yes** | A count of the data itself |
| "Robotics was the most popular answer" | **Yes** | Still describing responses received |
| "33% of students want Robotics" | **No** | Extends to students who never answered |
| "Art has the least demand, so cut it" | **No** | A decision about people the method excluded |

## 6Four Questions to Ask of Any Data Set

These are the four that catch nearly everything in this topic, and they are worth memorizing as a set:

The audit

1. **How was this collected, and who could not appear in it?** The collection method, and its blind spot.
2. **What is missing?** Blank fields, and whole cases that never made it in.
3. **What might be wrong but plausible?** Values that pass every check and are still false.
4. **What am I about to claim?** Describing the data, or extrapolating past it.

### 6.1 Running the Audit on Three Data Sets

**Step counts from a fitness app, used to study teenage activity.** Collected from people who bought a device and chose to wear it. Missing: anyone without one, and any activity while the device is off or uncharged. Plausible but wrong: a phone in a bag reads as no movement; a bumpy bus ride reads as steps. Claiming: fine for describing users of that device, not for teenagers generally.

**Restaurant ratings, used to rank places to eat.** Collected from customers motivated enough to post — typically the delighted and the furious. Missing: everyone who found it fine and said nothing, and every place too new to have reviews. Plausible but wrong: a handful of very positive early ratings look identical to a strong long-run record. Claiming: describing what reviewers said is safe; "this is the best restaurant in town" is not.

**A school's own attendance records, used to predict who will struggle.** Collected uniformly, which is genuinely better. Missing: the reasons behind absences, which is the thing that actually matters. Plausible but wrong: a clerical entry marking a whole class absent. Claiming: a program that flags students by absence alone will systematically flag those with chronic illness or caring responsibilities — a specific group, repeatedly, with unfair outcomes.

The third one is the important one

Its collection method is sound and the data is accurate. Bias still arrives, because the data set *does not contain the variable that explains the pattern*. Good collection is not a guarantee — a complete, accurate data set can still be the wrong data set for the question being asked.

## 7What Questions Look Like

### 7.1 Recognizing the Type

| If the stem mentions… | Reach for… |
| --- | --- |
| How the data was gathered — a survey, an app, volunteers | Collection method and who it excludes (4.1.B.2) |
| One group getting worse results, repeatedly | The four-part definition of algorithmic bias (4.1.B.1) |
| Missing fields, blanks, records that do not parse | Incomplete data — incorrect or inefficient behavior (4.1.B.3) |
| A conclusion drawn about a wider population | Extrapolation beyond what the data supports |

### 7.2 A Model Answer

*A city builds an app that reports potholes and dispatches crews to the streets with the most reports. Explain one way the program could produce unfair outcomes.*

Too thin

"Some areas might not get their potholes fixed because the data could be biased." No mechanism, and "could be biased" restates the question.

Scores

"Reports come only from residents who have the app and choose to use it, so neighborhoods with more smartphone use generate more reports. Crews are dispatched by report volume, so those neighborhoods are repaired first and more often — repeatedly, and by the design of the dispatch rule rather than by chance. Residents in under-reporting areas get worse roads despite having the same or greater need, which is an unfair outcome for a specific group."

Mechanism, systemic, repeated, specific group, unfair outcome — the definition, satisfied rather than quoted.

### 7.3 Traps

Four ways to lose the point

1. **Treating more data as a fix.** Ten times the responses through the same portal is ten times as much of the same skew. Volume does not correct a collection method.
2. **Blaming the algorithm alone.** The dispatch rule is reasonable; the data feeding it is not representative. Locate the fault precisely.
3. **Reaching for intent.** "They didn't mean to" is not part of the definition.
4. **Confusing inaccurate with biased.** Wrong for everyone is a defect. Wrong for one group, repeatedly, is bias.

## 8Check Yourself

*A study app logs practice sessions and reports that students who practice before 8 a.m. score higher. The school considers moving tutoring to the morning. What is the problem?*

Response

The data describes students who *chose* to practice early, which is not the same as students who *would be scheduled* to. Those choosing early sessions likely differ in ways the data never recorded. The claim "practicing early raises scores" extrapolates well beyond a log of voluntary sessions, and the decision would be made for students who are nothing like the ones in the data.

*A dataset of 50,000 support tickets has 3,000 with a blank category field. A team drops those rows and reports on the rest. Any issue?*

Response

Potentially serious. Dropping incomplete records is only safe if they are missing for reasons unrelated to what is being measured — and blanks are rarely random. If the category is most often blank when a ticket was filed in a hurry during an outage, then discarding those rows systematically removes the worst incidents, and every conclusion is drawn from a calmer version of reality than actually occurred.

*Is a program that rejects every password containing a non-English character showing algorithmic bias?*

Response

Yes, on all four requirements. Systemic — it follows from the validation rule, not from chance. Repeated — every attempt, every time. Specific group — users whose names and words use those characters. Unfair outcome — they cannot use passwords available to everyone else. Whether the developer considered it is irrelevant to the classification.

## 9Summary

| Idea | What to remember |
| --- | --- |
| **Algorithmic bias** | Systemic and repeated errors producing unfair outcomes for a specific group |
| **Bias vs inaccuracy** | Wrong for everyone is a defect; wrong for one group repeatedly is bias |
| **Intent** | Not part of the definition — bias is about outcomes |
| **Collection method** | Examine it *before* extrapolating; it decides who could be counted |
| **Incomplete data** | Missing values or missing cases — usually visible |
| **Inaccurate data** | Present but wrong — usually invisible, and worse for that reason |
| **The consequence** | The program works *incorrectly or inefficiently* — both words are examinable |
| **Describe vs extrapolate** | Counting what is there is safe; claiming beyond it is where bias bites |

The habit

Before trusting any data set: **how was it collected, who is missing, what could be wrong but plausible, and am I about to claim more than it supports?** A program cannot be better than the data it runs on, and no amount of correct code repairs a data set that never described the people it is being used to decide about.

FiveStudy · AP Computer Science A · 2025–26

U4T1 · Data Quality and Bias · LO 4.1.B
