Interactive demo · Statistical Methods for Modern Biology · Chapter 7

Regression lines and the principal component line

Each point is one of the 33 decathletes of the 1988 Olympic Games. A line through the centre of the cloud summarises two variables by one. Regressing y on x minimises the vertical distances, regressing x on y minimises the horizontal ones, and the first principal component minimises the perpendicular distances. Rotate the purple line: the variance of the points projected onto it (along) and the mean squared perpendicular distance (across) always add up to the same total, so the line that hugs the points best is also the line along which they spread most (Holmes and Huber 2019, Section 7.3).

Variables

Units

Rotating line: angle θ

Show

Residuals drawn

Numbers

Try these

Running times are turned into speeds (metres per second), as in the book, so that larger is better for every event. Variances use the divisor n − 1 = 32, like R's var; "standardised" divides each variable by its standard deviation. The plot always has equal scales on both axes, so perpendicular means perpendicular.

In the lecture notes