AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Move paired values; separate direction, strength and units.
Each numbered dot is one quantitative (X, Y) pair. Dashed lines cross at the current means. Drag a dot or select its number below and use the coordinate controls. Labels have leader lines; the dots encode the actual values.
Point 5: X = 8.0000, Y = 8.0000. Covariance = 6.5000; Pearson r = 1.0000.
Mean X = 5.0000; mean Y = 5.0000. Five paired observations; sample denominator n − 1 = 4.
Selected Point 5, in current X units. Grid step 0.5; bound 10. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Selected Point 5. Moving a pair recomputes both means and all departure products. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Positive factor applied to every X number, its mean, SD and covariance. Y values stay fixed. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Positive unit changes rescale X numbers and the X axis ticks together. The point pattern stays in place because the axis uses the new units too. Point edits change the underlying pairs. Coincident points remain separately selectable by number; when dragging coincident dots, the selected point takes priority.
Point 5: (8.0000 − 5.0000) × (8.0000 − 5.0000) = 3.0000 × 3.0000 = 9.0000.
Same-sign departures give positive products; opposite signs give negative products; a zero departure gives zero. Every center and product is recomputed after a pair changes.
Sum of products = 26.0000. Sample covariance = 26.0000 / 4 = 6.5000. Sample SD X = 2.5495; sample SD Y = 2.5495.
Signed co-variation, in X units × Y units.
6.5000
Σ[(X − mean X)(Y − mean Y)] / (n − 1)
Unitless direction and linear alignment.
1.0000
6.5000 / 6.5000
Both sample spreads normalize covariance.
6.5000
sX × sY = 2.5495 × 2.5495
r describes linear association, not slope, probability or causation. Zero correlation need not mean independence or no nonlinear relationship. If either variable has zero spread, r is undefined. These five toy pairs are descriptive data; no population estimate, test or causal conclusion is supplied.
| Point | X | Y | X departure | Y departure | Product |
|---|---|---|---|---|---|
| 1 | 2.0000 | 2.0000 | -3.0000 | -3.0000 | 9.0000 |
| 2 | 3.0000 | 3.0000 | -2.0000 | -2.0000 | 4.0000 |
| 3 | 5.0000 | 5.0000 | 0.0000 | 0.0000 | 0.0000 |
| 4 | 7.0000 | 7.0000 | 2.0000 | 2.0000 | 4.0000 |
| 5 | 8.0000 | 8.0000 | 3.0000 | 3.0000 | 9.0000 |
| Sum of paired products | 26.0000 | ||||
Sample covariance and both sample variances use n − 1 = 4; sample SD is the square root of sample variance. Dividing all three by n instead gives different covariance and SDs but the same Pearson r when spread is nonzero. Pearson r equals covariance divided by the product of the consistently defined SDs. Positive scale factors cancel. Negating just one variable would reverse the sign.
The finite editable grid contains five pairs with base values 0 to 10 in half-unit steps. X unit multiplier is a positive integer 1 to 5; X editors use displayed units and a correspondingly scaled grid. Statistical calculations precede display rounding. Dots remain correctly mapped when axis labels change; displaced number labels identify dots through leader lines. Strong nonlinear patterns, outlier diagnostics, inference and confounding have separate lessons.
NIST · Pearson correlation formula