Skip to content
All apps

Correlation: why standardise?

About this app

Covariance rectangles around the centroid with real lecture data (motor, age and income, wood density, grades): change the unit and s_xy jumps while r stays put. Standardising stretches the axes until the unit tile s_x × s_y is a square: r = s_xy/(s_x s_y) is the mean z rectangle area, the tile fills to |r|. With r scale, outlier and your own points.

With explain mode: an AI tutor walks you through the app, points out what matters in the scene and answers your questions.

What it is about

The Pearson correlation coefficient measures how closely two quantitative variables are linearly related: r = s_xy/(s_x · s_y). The covariance s_xy alone does not work, because it carries the product of the units and is unbounded. Dividing every deviation by its standard deviation gives standard units z = (x − x̄)/s. Then r is simply the mean of the products z_x · z_y (sum divided by n − 1), dimensionless and always between −1 and 1.

What the app shows

A scatter plot with data from a statistics lecture: power of a DC motor against speed, age and income, wood density and compressive strength, and maths and physics grades. Each point spans a rectangle with the centroid, positive at the top right and bottom left, negative otherwise. A dashed unit tile s_x × s_y and a filled mean area show which share of the tile the covariance fills: exactly |r|. A scale classifies r as weak, moderate or strong.

Try it yourself

Switch the motor from hp to kW: the covariance jumps from 36,518 to 26,859, r stays 0.996. Press Standardise and watch the axes stretch and squeeze until the unit tile is a square. Drag points, add new ones, build in an outlier and watch r jump. For the grades the mean area lies at the top left: r = −0.597, a moderate negative relationship.

Frequently asked questions

How do you calculate the Pearson correlation coefficient?
Divide the covariance by the product of the standard deviations: r = s_xy/(s_x · s_y). Equivalently r = 1/(n − 1) · Σ z_x,i · z_y,i with the standard scores z = (x − x̄)/s. It requires that neither all x nor all y are equal.
Why does r not depend on the units?
If x or y is converted to another unit, covariance and standard deviation change by the same factor. In the ratio s_xy/(s_x · s_y) it cancels. The covariance itself carries the product of the units and changes its numerical value.
What do r = 1, r = 0 and r = −0.6 mean?
|r| = 1 means all points lie exactly on a straight line. r = 0 means there is no linear relationship, a curved one is still possible. By a common classification |r| < 0.5 is weak, 0.5 to 0.8 moderate and from 0.8 strong, so r = −0.6 is a moderate negative relationship.
What can I change in the app?
The data set, the units of both axes, the degree of standardising from 0 to 100 %, every point by dragging, new points by tapping, deleting, an outlier and the display of rectangles and unit tile. All values and a calculation per point are in the Values panel.

Subject: Statistics

More from Statistics

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps