AP CSP Correlation vs. Causation

AP CSP Topics › Correlation vs. Causation

AP CSP Correlation vs. Causation: Complete Guide (2025‑2026)

Correlation means two variables tend to increase or decrease together. Causation means one variable directly causes changes in the other. Correlation does not imply causation — two variables can be strongly correlated because they share a common cause, because the correlation is coincidental, or because a third unmeasured variable (a confounding variable) influences both. Incorrectly claiming causation from correlation is one of the most common errors in data analysis.

Correlation does NOT imply causation
3Ways variables can be correlated: direct cause, reverse cause, or confounding
1Way to establish causation: controlled experiment with random assignment

The Core Difference

Correlation vs. Causation: Three Possible Explanations Ice cream sales and drownings both rise together in summer Claimed: Ice cream CAUSES drownings ✗ Claimed: Drownings CAUSE ice cream sales ✗ Confounding variable: HOT WEATHER causes both ✓ Correlation ≠ Causation. A third variable often explains the pattern.

Hot weather causes both ice cream consumption and swimming, which leads to more drowning incidents. The ice cream-drowning correlation is real but non-causal.

Correlation
Variables move together
  • As A increases, B tends to increase (positive)
  • As A increases, B tends to decrease (negative)
  • Measured by correlation coefficient (-1 to +1)
  • Observations from data — no manipulation
  • Can be strong even with zero causal link
Causation
A directly produces B
  • Changing A directly causes a change in B
  • Requires controlled experiment to prove
  • Random assignment eliminates confounders
  • Can be directional (A causes B, not vice versa)
  • Much harder to establish than correlation

Confounding Variables

Scenario — Identify the Confounder

A study finds that students who eat breakfast have higher GPAs than those who skip breakfast. A newspaper headline reads: ‘Eating Breakfast Boosts Academic Performance.’

What confounding variables might explain this correlation without breakfast directly causing higher GPA?

Answer

Possible confounders include: family socioeconomic status (families with food security can afford breakfast AND have resources for tutoring/stability), sleep habits (students who sleep adequately wake in time for breakfast AND perform better academically), overall health habits (health-conscious students eat breakfast AND study more consistently). Each of these could independently cause both the breakfast behavior and the academic performance. Without a controlled experiment, claiming breakfast ‘boosts’ GPA is not justified by this data.

How Causation Is Established

Scenario — Controlled Experiment Design

Researchers want to know if a new study app causes higher test scores. Simply observing that students who use the app get better scores is not enough.

What experimental design would establish causation, and why does it require random assignment?

Answer

A randomized controlled experiment: randomly assign students to two groups — one uses the app (treatment), one does not (control). Random assignment ensures any confounding variables (prior knowledge, motivation, home support) are distributed equally between groups on average. After the study period, compare test scores. If the treatment group scores significantly higher, the only systematic difference between groups was app usage, so the app is the causal factor. Without randomization, students who chose to use the app might differ systematically from those who did not.

Common Exam Pitfalls

1
Correlation does not imply causation — ever

Even a perfect correlation (r=1.0) does not establish causation. Only controlled experiments with random assignment establish causation.

2
Confounding variables are the usual explanation for surprising correlations

When two seemingly unrelated things correlate (shoe size and reading ability in children), look for a confounding variable (age causes both). The AP exam frequently presents a correlation and asks which explanation is most valid.

3
The direction of causation can be wrong

Even if A and B are causally related, the direction might be reversed. Sales of sunscreen and sunburns are correlated — but sunscreen prevents sunburn, sunburns don’t cause sunscreen sales (people buy sunscreen before going out).

4
Larger datasets strengthen correlation claims but do not establish causation

A study of 1 million people showing a strong correlation is still just a correlation. Sample size affects confidence in the correlation, not whether causation exists.

Check for Understanding

1. A study finds that cities with more hospitals have higher death rates. Which statement is most accurate?

  • Hospitals cause deaths — people should avoid them.
  • This is likely a correlation explained by confounding: sicker people go to cities with more hospitals.
  • This proves hospitals are ineffective.
  • The correlation is too strong to be coincidental — causation is confirmed.
Sick people are more likely to live near or travel to cities with hospitals. The confounding variable is population health needs.

2. Which of the following correctly defines a confounding variable?

  • A variable that has no relationship to the study.
  • A third variable that influences both the independent and dependent variables, making correlation appear causal.
  • A variable that proves causation between two correlated variables.
  • A variable that removes bias from a study.
Confounding variable: causes both the apparent cause and the apparent effect, creating a correlation that is not causal.

3. Consider: I. Two variables can be strongly correlated without one causing the other. II. Establishing causation requires a randomized controlled experiment. III. A correlation coefficient of +0.95 proves causation.

  • I only
  • I and II only
  • I, II, and III
  • II and III only
I and II are correct. III is false — correlation strength has no bearing on causation.

4. Research shows that people who own umbrellas get wet less often. The most accurate conclusion is:

  • Owning an umbrella causes people to get wet less often (causation).
  • Getting wet less often causes people to buy umbrellas.
  • There is a correlation, likely because umbrella owners use them on rainy days.
  • The data is invalid because correlation is too obvious.
Umbrella ownership correlates with staying dry because umbrella owners use them in rain. Umbrella ownership doesn’t directly cause dryness — using the umbrella does.

5. A researcher wants to determine if a new drug lowers blood pressure. Which study design establishes causation?

  • Survey patients who take the drug and ask if their pressure improved.
  • Randomly assign patients to drug or placebo groups and compare results.
  • Compare blood pressure of drug-takers vs. non-drug-takers without random assignment.
  • Find 10,000 cases of patients who improved while taking the drug.
Random assignment to treatment vs. control is the gold standard for establishing causation. It balances confounding variables between groups.

6. Shoe size and reading ability are positively correlated in a sample of school children. The most likely explanation is:

  • Reading improves physical development, increasing shoe size.
  • Children with large feet are naturally better readers.
  • Age is a confounding variable: older children have larger feet and better reading skills.
  • The study contains errors because this correlation is impossible.
Age causes both larger feet and better reading. This is a classic confounding variable example.

7. A data analyst observes that ice cream sales and sunburn cases rise together every summer. She concludes that ice cream causes sunburns. What is wrong with her reasoning?

  • Ice cream and sunburns are not actually correlated.
  • Hot weather is a confounding variable that causes both, and correlation does not imply causation.
  • The correlation is too weak to draw any conclusions.
  • Sunburns cause ice cream cravings, not the reverse.
Classic confounding variable: hot weather causes people to buy ice cream AND spend time in the sun (causing sunburns).

8. Which question can be answered by observational data (correlation) alone?

  • Does studying more CAUSE higher test scores?
  • Do students who study more get higher test scores on average?
  • Would making students study more improve their test scores?
  • Is studying the reason some students outperform others?
Observational data can establish correlation (students who study more tend to score higher). Causation requires experimental manipulation.

9. A medical study of 500,000 people finds that coffee drinkers have lower rates of a certain disease. This finding:

  • Proves that coffee prevents the disease.
  • Suggests a correlation that warrants further investigation, but does not establish causation.
  • Is invalid because 500,000 is not a large enough sample.
  • Proves causation because the sample size is very large.
Large sample size strengthens confidence in the correlation but cannot establish causation. Confounders (e.g., coffee drinkers may have other healthy habits) must be ruled out.

10. A newspaper reports: “Students who play video games score lower on math tests.” Which is the strongest alternative explanation?

  • Video games directly impair mathematical reasoning.
  • Students who play many hours of video games have less time to study, and less study time causes lower scores.
  • The study was conducted incorrectly.
  • Low math scores cause students to seek entertainment in video games.
Less study time is a plausible mediating variable — video gaming takes time away from study, and less study time directly causes lower scores. This is a more defensible causal pathway than a direct cognitive impairment claim.

How the AP Exam Tests This

  • Identify a confounding variable in a described study or data set
  • Determine whether a conclusion of causation is justified based on study design
  • Distinguish correlation from causation in a given scenario
  • I/II/III: which statements about correlation and causation are correct
  • Identify the correct study design (randomized experiment) needed to establish causation

FAQ

Can correlational studies ever be evidence of causation?
Yes — strong, consistent, replicated correlations across multiple study types build a strong case. Epidemiologists established that smoking causes cancer largely through correlational evidence before randomized trials were possible. Causation is probabilistic in science, not absolute.
What is the difference between a positive and negative correlation?
Positive correlation: as one variable increases, the other tends to increase (study time and GPA). Negative correlation: as one increases, the other tends to decrease (absences and GPA). Both are just correlations — neither implies causation.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]