How to use the simulator
- Target r: a slider from −1 to 1 in steps of 0.01 (default +0.80). Moving it regenerates the scatterplot to match.
- Quick pattern buttons: Strong + (0.95), Moderate + (0.5), None (0), Moderate − (−0.5) and Strong − (−0.95) set the slider for you. Curved (U) replaces the cloud with a U-shaped pattern, and the target label changes to "(curved)".
The readout shows the actual computed r to three decimal places with its sign, a strength label, r2 (variation explained) and points n, which is always 26. The actual r is calculated from the plotted points, so it is close to the target but not always equal: a target of +0.80 gives +0.797, and None gives −0.013.
The strength label uses the simulator's own cutoffs: below 0.05 in size is "No Correlation", below 0.4 is Weak, below 0.7 is Moderate and anything larger is Strong. A target of 0.70 produces r = +0.695, which is labelled Moderate. These cutoffs are a convenience, not an AP rule; on the exam you judge strength from the graph and the value together.
Both axes run from 0 to 1 with no units, and the points are rescaled each time to fill the plot. As you move the slider the cloud's overall tilt barely changes; what changes is how tightly the points hug a line. That is exactly what r measures.
The formula
The formula sheet writes the correlation as the average product of z-scores, dividing by n − 1:
- . The sign gives the direction, and the size gives the strength of the linear association.
- only when every point lies exactly on a line.
- has no units. Changing units (inches to centimetres, say) or swapping x and y does not change it.
- is not resistant: one outlier can raise or lower it a lot.
- is not the slope. The two are linked by , so they always share a sign but usually differ in size.
- is the proportion of the variation in y that is accounted for by the linear model with x.
Worked example
Problem: Five students recorded hours of practice (x) and a quiz score out of 5 (y): (1, 2), (2, 4), (3, 5), (4, 4), (5, 5). Find and interpret r and .
Step 1: Means and standard deviations. , ; , .
Step 2: z-scores. For x: −1.265, −0.632, 0, 0.632, 1.265. For y: −1.633, 0, 0.816, 0, 0.816.
Step 3: Products. , then 0, 0, 0, and . The sum is 3.098.
Step 4: Divide by n − 1. , and .
Interpretation: there is a fairly strong, positive, linear association between hours of practice and quiz score for these students. About 60% of the variation in quiz score is accounted for by the linear relationship with hours of practice. The slope of the regression line would be b = 0.775 × 1.225 / 1.581 = 0.6 points per hour, a different number from r.
Check it in the simulator: set the target to +0.77. The readout shows r = +0.767, labelled Strong Positive, with r2 = 0.588. Now slide to −0.77: the cloud slopes down instead, r reads −0.773, and the spread around the line looks the same. The sign changed the direction, not the strength.
Common mistakes on the AP exam
- Incomplete descriptions. Describing a scatterplot needs direction, form, strength and any unusual features, all in context. Giving only "r = 0.775" is not enough.
- Reading r as a slope. r = 0.775 does not mean the score rises 0.775 points per hour; the slope in the example is 0.6.
- Assuming r near 0 means no relationship. Press Curved (U): the pattern is obvious, but r = −0.056. r only measures linear association, so always look at the graph.
- Confusing r and r2. r2 = 0.60 is a proportion of variation explained. It is not the proportion of points on the line or the probability of a correct prediction.
- Losing the sign. If you are given r2 = 0.64, then r = 0.8 or −0.8; take the sign from the slope or the graph.
- Claiming causation. A strong correlation from observational data does not show that x causes y. Only a well-designed experiment supports that.
- Giving r units. r is unit-free, and converting the variables' units leaves it unchanged.
When the AP exam uses this
Correlation is topic 5.2 in Unit 5 (Regression Analysis). Expect to match scatterplots to values of r, interpret r and r2 in context from computer output, and explain how an outlier or a curved pattern affects r. It also leads straight into the least-squares line in topic 5.5, through b = r sy/sx.