AP CSA Unit-Level MCQ
Data and Its Implications
Practice mode with 15 Java-focused questions, immediate answer checks, and explanations.
What data and its implications covers
Data and its implications is the reasoning topic added to the 2026 AP CSA framework. It asks what a program should collect, what its data can and cannot express, and who is affected by the answers. The technical side is familiar: how a data type limits what can be represented, how integer division silently discards a remainder in an average, and how one outlier moves a mean but not a median. The reasoning side asks who is missing from the data, what a summary hides, and whether an individual could be identified from what was stored.
Where students lose points
Students often treat a larger sample as a fix for bias. It is not: if the collection method excludes part of the population, more data makes the same skewed result more precise rather than more representative. The other frequent slip is computing an average with int division, which understates every result. On the privacy side, students assume aggregation guarantees anonymity, when a small enough group can still identify a person.
How it shows up on the AP exam
This topic supports questions that ask you to evaluate a program rather than trace it, and it pairs naturally with file input: you read a data set, summarize it, and then reason about what the summary does and does not show.
For practice use only.
Data and Its Implications MCQ Practice
AP CSA practice on data and its implications: bias in collected data, privacy and data minimization, outliers and averages, and the limits of a chosen representation.
Answered 0 of 15
Choose one answer.
A tutoring site logs every practice attempt with a student id, a topic, and a score. Which use of this data raises the clearest privacy concern?
All 15 data and its implications questions
Work through the interactive quiz above first. This is the full data and its implications question set with worked solutions, so students can review any question after attempting it.
1.A tutoring site logs every practice attempt with a student id, a topic, and a score. Which use of this data raises the clearest privacy concern?
- Computing the average score per topic to decide which lessons to rewrite.
- Showing each student only their own attempt history.
- Counting how many attempts were made each week.
- Publishing a leaderboard that lists student names next to their lowest scores.
Show worked solution
Correct answer: Publishing a leaderboard that lists student names next to their lowest scores.
The other three either aggregate the data or return it to the person it describes. Only the leaderboard exposes an individual record to everyone.
2.A program stores each user's birth year as an int. Which is a genuine limitation of this representation?
- It cannot express a birth date more precisely than the year.
- It cannot store years before 1970.
- It requires more memory than storing the year as a String.
- It makes sorting by age impossible.
Show worked solution
Correct answer: It cannot express a birth date more precisely than the year.
Choosing a data type fixes what the program can express. An int year is fine for arithmetic and sorting, but the month and day are simply gone.
3.What is printed by the following code segment?
int[] scores = {70, 80, 90, 400}; int t = 0; for (int v : scores) { t += v; } System.out.print(t / scores.length);- 80
- 160
- 145
- 90
Show worked solution
Correct answer: 160
A single out-of-range value pulls the mean far from every actual observation, which is why outliers must be checked before averaging.
4.What is printed by the following code segment?
int[] scores = {70, 80, 90, 400}; int[] s = {70, 80, 90, 400}; System.out.print((s[1] + s[2]) / 2);- 160
- 80
- 85
- 90
Show worked solution
Correct answer: 85
The median of the sorted values ignores the extreme entry, so it describes the typical case better than the mean here.
5.A survey program only accepts responses from users who own a smartphone. What is the most accurate description of the resulting data?
- It is invalid, because survey data is never reliable.
- It is unbiased, because every respondent answered the same questions.
- It is unbiased, as long as the sample is large enough.
- It is biased, because the collection method excludes part of the population being described.
Show worked solution
Correct answer: It is biased, because the collection method excludes part of the population being described.
Enlarging a sample drawn from a restricted group makes the same skewed result more precise, not more representative.
6.What is printed by the following code segment?
String[] entries = {"12", "x", "7"}; int t = 0; int bad = 0; for (String e : entries) { if (e.length() > 0 && e.charAt(0) >= '0' && e.charAt(0) <= '9') { t += Integer.parseInt(e); } else { bad++; } } System.out.print(t + " " + bad);- 19 1
- 19 0
- 12 1
- 0 3
Show worked solution
Correct answer: 19 1
Validating input before converting it keeps one malformed record from stopping the whole run.
7.Which change best reduces the amount of personal information a program keeps?
- Storing the same records in a file rather than in memory.
- Storing a topic and a score without the student name attached.
- Storing the name in reverse order.
- Storing the records in an ArrayList rather than an array.
Show worked solution
Correct answer: Storing a topic and a score without the student name attached.
Data minimisation means not collecting the identifying field at all. Moving or reordering the same information changes nothing about what is exposed.
8.What is printed by the following code segment?
int total = 7; int count = 2; System.out.print(total / count); System.out.print(" " + (double) total / count);- 3.5 3.5
- 3 3
- 3 3.5
- 3.5 3
Show worked solution
Correct answer: 3 3.5
An average computed with int division silently discards the remainder, understating every result.
9.A model is trained on ten years of past admissions decisions and used to score new applicants. What is the most likely consequence?
- The model corrects unfair patterns because it processes more data than a person can.
- The model produces random scores because past data cannot predict the future.
- The model is neutral because it uses arithmetic rather than opinion.
- Any pattern of unfair treatment in the past decisions is reproduced in the new scores.
Show worked solution
Correct answer: Any pattern of unfair treatment in the past decisions is reproduced in the new scores.
A program trained on a record of decisions learns the pattern in that record, including whatever was unfair about it.
10.What is printed by the following code segment?
String[] raw = {"Yes", "yes", "YES", "no"}; int y = 0; for (String r : raw) { if (r.equalsIgnoreCase("yes")) { y++; } } int strict = 0; for (String r : raw) { if (r.equals("yes")) { strict++; } } System.out.print(y + " " + strict);- 3 1
- 3 3
- 1 1
- 4 1
Show worked solution
Correct answer: 3 1
Inconsistent formatting in collected data changes the answer unless the values are normalised first.
11.Which statement about aggregated data is accurate?
- Aggregating always makes data more accurate.
- Aggregating removes individual detail, which can protect privacy but also hides variation within the group.
- Aggregating guarantees that no individual can be identified.
- Aggregating has no effect on what conclusions can be drawn.
Show worked solution
Correct answer: Aggregating removes individual detail, which can protect privacy but also hides variation within the group.
A summary trades detail for a group-level view, and a small enough group can still identify a person.
12.What is printed by the following code segment?
int[] a = {1, 2, 3, 4, 5, 100}; int t = 0; int n = 0; for (int v : a) { if (v <= 10) { t += v; n++; } } System.out.print(t + " " + n + " " + t / n);- 115 6 19
- 15 5 5
- 15 5 3
- 115 5 23
Show worked solution
Correct answer: 15 5 3
Filtering the extreme value before averaging gives a figure that describes the remaining observations.
13.A program keeps a user's search history to improve its suggestions. Which practice best respects the user?
- Storing the history indefinitely so suggestions keep improving.
- Sharing the history with partner sites to broaden the suggestions.
- Storing the history without mentioning it, since it is only used internally.
- Telling the user what is stored and letting them delete it.
Show worked solution
Correct answer: Telling the user what is stored and letting them delete it.
Transparency and control are what separate a useful feature from surveillance, regardless of how the data is used internally.
14.What is printed by the following code segment?
String csv = "name,score,name,score"; int c = 0; int i = csv.indexOf("name"); while (i >= 0) { c++; i = csv.indexOf("name", i + 1); } System.out.print(c);- 2
- 1
- 4
- 0
Show worked solution
Correct answer: 2
Restarting the search past the previous hit counts every occurrence, a common step when parsing a header row.
15.What is printed by the following code segment?
int[] counts = {0, 0, 0}; int[] data = {2, 1, 2, 0, 2}; for (int v : data) { counts[v]++; } int mode = 0; for (int i = 1; i < counts.length; i++) { if (counts[i] > counts[mode]) { mode = i; } } System.out.print(counts[2] + " " + mode);- 2 2
- 3 2
- 3 3
- 5 2
Show worked solution
Correct answer: 3 2
Tallying into a counting array finds the most frequent value in one pass over the data.
