How to use the simulator
- Scatterplot. Sixty points plotted on axes labelled Variable X and Variable Y, with a dashed line of best fit. The points are generated so that their correlation matches the slider exactly.
- r readout. The large number (for example r = +0.70) is recalculated from the plotted points. Underneath, a sentence describes the relationship in words, such as "strong positive relationship — as X rises, Y tends to rise".
- New sample. Draws a fresh set of 60 random points with the same . The cloud changes but does not.
- Another example. Steps through four third-variable examples. A small diagram shows a hidden variable Z with arrows to both X and Y, and a dashed line between X and Y labelled "observed correlation". The four pairs are ice-cream sales and drowning deaths, children's shoe size and reading ability, hours of sleep and school grades, and coffee intake and stress.
The key ideas
- Sign gives direction. In a positive correlation both variables tend to rise together. In a negative correlation, as one rises the other tends to fall.
- Size gives strength. The closer is to 1, the more tightly the points cluster around a straight line. An of is a stronger relationship than .
- Zero means no linear pattern. An near 0 can still hide a curved relationship, so look at the scatterplot as well as the number.
- X causes Y.
- Y causes X (the directionality problem).
- A third variable Z causes both, which is the case the simulator's diagram shows.
Worked example
X causes Y: late-night scrolling cuts into sleep.
Y causes X: teens who cannot sleep pick up their phones.
Third variable: anxiety, or a naturally late body clock, could raise screen time and reduce sleep at the same time.
Common mistakes on the AP exam
- Reading a negative r as weak. The sign shows direction only. An of is a strong relationship.
- Using causal language for correlational data. Words like "causes", "leads to" and "increases" claim more than a correlation shows. Write "is associated with" or "predicts" instead.
- Naming a third variable that only affects one side. A genuine third variable must plausibly affect both X and Y. Age works for shoe size and reading because it drives both.
- Saying r = 0 means the variables are unrelated. It means there is no linear relationship. A curved pattern can still exist.
- Reading strength from the slope. A steep best-fit line does not mean a strong correlation. Strength depends on how closely the points cluster around the line.
- Calling a study an experiment because it reports r. Correlation coefficients come from measuring variables, not manipulating them.