Data means the values a program collects and stores, such as the pixels of a photo; metadata is data about that data, such as the date the photo was taken. Metadata helps you find, sort and judge data, and information is what you learn from the trends and patterns in data. A pattern where two things change together is a correlation, and it never proves on its own that one causes the other.
Quick check
A song file holds the recorded sound, the title and the length. Which part is the song itself?Show answerHide answer
The recorded sound is the song itself. The title and the length describe it.
Two values always rise together in a data set. Does one have to cause the other?Show answerHide answer
No. Something else could cause both, or the link could be a coincidence.
Know these already? Jump to the practice questions
What you'll be able to do
- Distinguish data from metadata in a described file or record.
- Explain how metadata helps people find, organize and use data.
- Identify a trend in a data set.
- Explain why a correlation does not show that one thing causes another.
Key terms
Metadata
Data that describes other data, such as a file's creation date, author, size or format.
- In plain English
- A label on the data, not the data itself.
- Don't write
- "Metadata is the important part of the data."
Information
The facts, trends and patterns you learn by examining data.
- In plain English
- What the data tells you.
- Don't write
- "Information and data mean the same thing."
Correlation
A relationship in which two variables tend to change together, both rising, or one rising as the other falls.
- In plain English
- Two things move together.
- Don't write
- "A correlation proves that one thing causes the other."
Causation
A relationship in which a change in one variable produces a change in another.
- In plain English
- One thing makes the other happen.
- Don't write
- "The data show causation because the values rise together."
What is the difference between data and metadata?
The data is the content itself. Metadata sits alongside it and describes it.
| Item | Data | Metadata |
|---|---|---|
| Photo | The pixels | Date taken, file size, camera settings |
| Song | The recorded sound | Title, artist, length |
| The message text | Sender, time sent |
Digital photos often carry metadata in a standard called Exif, which can record the date and time, the camera settings and sometimes the location where the photo was taken.
Changing metadata does not change the data it describes. Renaming a song or correcting a photo's date leaves the sound and the pixels exactly as they were.
Check yourself
Show answerHide answer
Metadata. It describes the video; the frames and the sound are the data.
How does metadata help you use data?
Metadata helps in three ways.
- Find: a search for photos taken in June checks each photo's date, not its pixels.
- Organize: a music app sorts songs by artist or groups files by type using metadata.
- Use: metadata such as the source, the date collected and the units tells you how far to trust the data and how to read it.
Metadata is usually far smaller than the data, so a program can search thousands of photos by date without opening any image.
Check yourself
Show answerHide answer
The metadata. The artist's name is stored as metadata, so the app compares names without analyzing any sound.
How do large data sets give you information?
Raw data becomes information when you find what it shows: a trend, which is a steady change in one direction over time, or a pattern, such as a value that repeats every week.
Large data sets can reveal patterns that a few values hide, because one odd value matters less among thousands. But no person can read millions of values, so programs filter, count and chart the data for you; the note on processing data with programs shows how.
A pattern is something to explain, not an explanation.
Check yourself
Show answerHide answer
An increasing trend: sales rise every month.
Why doesn't correlation prove causation?
When two variables are correlated, several explanations fit the same data:
- A causes B.
- B causes A.
- A third factor causes both.
- The link is a coincidence.
Suppose a hypothetical town finds that ice cream sales and sunburn cases rise together. Ice cream does not cause sunburn: hot, sunny weather raises both.
Data alone cannot tell these explanations apart. To show causation you need further investigation, such as a controlled experiment that changes one variable while keeping the others fixed.
Key idea
A correlation shows that two things change together, not why; claiming causation needs more evidence than the correlation.
Check yourself
Show answerHide answer
One possibility is how much time the family spends reading at home, which could lead to both more books and higher scores. Any factor that could plausibly cause both is a valid answer.
Worked example 1: Identify the metadata
Question: A library stores digital audiobooks. Which of these is metadata?
- A) The recorded narration
- B) The narrator's name and the recording's length
- C) The sound samples in the audio file
- D) The words of the book, read aloud
What tells you the method
"Which is metadata": ask whether each option is content or a description of content.
Step 1: Test each option.
A, C and D are all the audiobook's content: what you hear.
WhyData is the content itself.
Step 2: Pick the description.
The narrator's name and the length describe the recording.
WhyMetadata is data about data.
Check it
Editing the length field would not change a single sound.
Answer
B
Worked example 2: Trace a search through metadata
Question: Two lists hold metadata for five photos: the year taken and the size in megabytes. What is displayed as a result of running the code segment?
years ← [2023, 2025, 2024, 2025, 2025]
sizes ← [4, 6, 3, 5, 2]
total ← 0
i ← 1
REPEAT LENGTH(years) TIMES
{
IF(years[i] = 2025)
{
total ← total + sizes[i]
}
i ← i + 1
}
DISPLAY(total)
What tells you the method
A loop with an index into two lists: trace i, the year it reads and total.
Step 1: Trace each pass.
iyears[i]Matches 2025? total1 2023 no 0 2 2025 yes 6 3 2024 no 6 4 2025 yes 11 5 2025 yes 13 Whyistarts at 1, so the first element is checked, and the sameipicks the matching size fromsizes.Step 2: Read off the display.
After 5 passes,
totalis 13.WhyThe loop runs
LENGTH(years)= 5 times.
Check it
The 2025 photos are at indexes 2, 4 and 5, with sizes 6, 5 and 2, and 6 + 5 + 2 = 13.
Answer
13
Worked example 3: Judge a correlation
Question: A hypothetical city records this data over five weeks.
| Week | Hours of rain | Umbrellas sold | Traffic accidents |
|---|---|---|---|
| 1 | 2 | 10 | 3 |
| 2 | 10 | 42 | 9 |
| 3 | 0 | 4 | 2 |
| 4 | 6 | 30 | 7 |
| 5 | 14 | 55 | 12 |
Which conclusion is best supported by the data?
- A) Selling umbrellas causes traffic accidents.
- B) Traffic accidents cause people to buy umbrellas.
- C) Umbrella sales and accidents are correlated, but the data do not show that either causes the other.
- D) Umbrella sales and accidents are not related.
What tells you the method
A question about causes: check the correlation, then look for a third factor.
Step 1: Check whether they move together.
Ordered by umbrella sales (4, 10, 30, 42, 55), accidents also rise (2, 3, 7, 9, 12), so they are correlated.
WhyThat rules out D.
Step 2: Look for a third factor.
Rain rises in the same order (0, 2, 6, 10, 14), and rain could plausibly drive both.
WhyA third factor can create a correlation without causation, so A and B go beyond the data.
Check it
C states only what the table shows.
Answer
C
Your turn
Question: A video file's record lists six items: the video frames, the upload date, the audio track, the creator's username, the length in seconds and the file format. How many of the six are metadata?
Step 1: Classify the first two.
The frames are content, so data; the upload date describes the video, so metadata.
Step 2: Your go: classify the other four and count the metadata.
Show the full solutionHide the solution
Step 2. The audio track is content, so data. The username, the length and the file format all describe the video, so they are metadata. Metadata: upload date, username, length, file format.
Answer: 4
Traps
Trap
When two variables are correlated, one must cause the other.
It seems right because things that move together look connected. But a third factor can drive both, or the link can be chance; showing causation needs further investigation.
Which claim do the data support when X and Y rise together: "X and Y are correlated" or "X causes Y"?
"X and Y are correlated." Causation needs more evidence than the correlation alone.
Trap
Changing a file's metadata changes the data it describes.
It seems right because the two are stored together. But metadata only describes the data: renaming a photo or editing its date leaves every pixel the same.
A song's title is corrected in a music app. Does the recorded sound change?
No. The title is metadata; the sound is the data, and it stays the same.
What's examined
On the AP® Computer Science Principles exam, this topic belongs to Big Idea 2: Data. Expect multiple-choice questions that ask you to identify metadata, say what a search or sort of metadata can find, read a trend from a table, or choose the conclusion a data set supports, where a claim of causation is the trap to avoid. All of it is Learn this: the exam reference sheet covers only the pseudocode.
Practice questions
- Recall Which statement best defines metadata?
- A) Data that describes other data
- B) Data that has been compressed to save space
- C) Data that has been encrypted for privacy
- D) The largest values in a data set
Show answer
Answer: A. Metadata is data about data, such as a file's date, size or author.
Why the others are wrong:
- B describes compressed data, which is still the data.
- C describes encrypted data, which is still the data.
- D describes values within the data, not a description of it.
- Recall In a data set, as one variable rises, another tends to rise too. Name this kind of relationship.
Show answer
Answer: Correlation
Marking points:
- Two variables that change together are correlated; this says nothing yet about cause.
- Apply A music app lets users list every song released in 2024. What does the app examine to build the list?
- A) The sound samples of every song
- B) The release-year metadata of every song
- C) The compressed audio of the most popular songs
- D) The lyrics of every song
Show answer
Answer: B. The release year is metadata, so the app compares years without analyzing any sound.
Why the others are wrong:
- A searches the content, which does not state a release year.
- C checks only some songs, and audio does not hold the year.
- D treats the lyrics, which are content, as if they held the year.
- Apply A list holds the star ratings of six reviews. What is displayed as a result of running the code segment?
ratings ← [5, 3, 4, 5, 2, 4]
count ← 0
FOR EACH r IN ratings
{
IF(r ≥ 4)
{
count ← count + 1
}
}
DISPLAY(count)
Show answer
Answer: 4
Marking points:
- The ratings that are at least 4 are 5, 4, 5 and 4.
≥includes 4, so both 4s count; using>would give 2.
- Exam-style A hypothetical survey finds that students who eat breakfast tend to have higher test scores. Which statement is best supported?
- A) Eating breakfast causes higher test scores.
- B) Higher test scores cause students to eat breakfast.
- C) Breakfast and test scores are correlated; another factor, such as sleep, could affect both.
- D) Breakfast has no connection to test scores.
Show answer
Answer: C. The survey shows a correlation only, and a third factor could explain it.
Why the others are wrong:
- A claims causation from a correlation.
- B claims causation in the other direction, also without evidence.
- D contradicts the correlation the survey found.
- Exam-style A photo collection's metadata stores each photo's date, file size and file format. Which question can be answered using only this metadata?
- A) Which photos show a dog?
- B) Which photos are blurry?
- C) What color is the sky in the beach photos?
- D) How many photos were taken in June?
Show answer
Answer: D. The date is stored as metadata, so a program can count June dates without examining any image.
Why the others are wrong:
- A needs the pixels, to recognize a dog.
- B needs the pixels, to judge sharpness.
- C needs the pixels, to read the sky's color.
- Apply A hypothetical club's membership over five years was 40, 46, 44, 51 and 58. In how many years did membership rise compared with the year before?
Show answer
Answer: 3
Marking points:
- 40 to 46 rises, 46 to 44 falls, 44 to 51 rises, 51 to 58 rises.
- That is 3 rises out of 4 year-to-year changes.
Key points
Recall, then reveal
Say the main points from memory first, then check them.
Show key pointsHide key points
- Data is the content; metadata describes it, and editing metadata leaves the content unchanged.
- Programs use metadata to search, sort and judge data without opening the content.
- Information comes from trends and patterns, and large data sets make them clearer.
- A correlation has several possible explanations, including a third factor or chance.
- Causation needs further evidence, such as a controlled experiment.