SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 2 · Data Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science Principles Unit 2 FRQ Practice

Practice a Create-Performance-Task-style written response about extracting information from data, compression, and correlation. Write your response, then reveal the model answer to see exactly what earns each point.

← Back to Unit 2 hub
Written Response · Unit 2 · Data

Note: The AP CSP exam is all multiple-choice; extended writing appears in the Create Performance Task. This question gives you practice with that style of written response.

A student has a dataset of songs. Each record includes the song's title, artist, genre, duration (in seconds), and number of plays. The audio for each song is also stored as a separate file. The student writes a program to analyze the dataset.

A
Describe how the program could be used to extract information from this dataset to answer a specific question. Name one data-processing step it would use, and identify one piece of metadata in the records.

✓ Model answer

The program could answer a question such as "Which genre is the most popular?" by filtering and aggregating the data — for example, grouping records by genre and adding up the number of plays in each group, then finding the largest total. This turns the raw data into information (the most-played genre). A piece of metadata in the records is the song's genre (or duration/artist) — descriptive data about each song rather than the audio itself.

Why it scores: States a specific question, names a real data-processing step (filter/group/aggregate), AND identifies a valid piece of metadata. A vague "the program looks at the data" without a step or a metadata example would lose credit.
B
The audio files are large. Explain the difference between lossless and lossy compression, and state which would be more appropriate for compressing the audio files, with a justification.

✓ Model answer

Lossless compression reduces file size without losing any data, so the original can be reconstructed exactly; lossy compression discards some data permanently to achieve a much smaller size. For the large audio files, lossy compression (such as MP3) is usually more appropriate, because it greatly reduces the storage needed and a small loss of audio quality is generally acceptable to listeners — an important benefit when storing many songs.

Why it scores: Correctly contrasts lossless (recoverable) with lossy (permanent loss, smaller), chooses lossy for the audio, AND justifies it with the size-vs-quality tradeoff in context. Choosing lossless without justification, or reversing the definitions, would lose credit.
C
The student notices that songs with longer durations tend to have more plays, and concludes that making a song longer will cause it to get more plays. Explain why this conclusion is not justified, and describe one responsible way to present the finding.

✓ Model answer

The conclusion is not justified because correlation does not imply causation: longer duration and more plays are associated in the data, but that does not prove that length causes the plays. A third factor — such as the songs being by more popular artists, or in a genre people replay — could explain both. A responsible way to present the finding is to report it as an association, not a cause ("longer songs in this dataset tended to have more plays"), and to note the limitation and the need for further investigation before making any claim of causation.

Why it scores: Explains that correlation is not causation and gives a plausible lurking factor, AND describes presenting the result honestly as an association with its limitations. Simply restating "correlation isn't causation" without the reasoning or the responsible-presentation part would earn less.

How to write strong AP CSP responses