liveBook · Manning

Linear relationship

As explained in Statistics Slam Dunk

Linearity is the property that a relationship can be represented by a straight-line pattern or a linear function.

A linear relationship describes variables that change together in a straight-line pattern. With continuous variables, the relationship may be positive, negative, or neutral: positive variables increase together, while negative variables move in opposite directions at constant rates. section 2.5.4

Correlation measures the strength and direction of a linear relationship with a coefficient from -1 to +1. Values near -1 or +1 indicate strong relationships; values near 0 indicate little or no relationship. Correlation does not establish causation. section 2.5.4

A practical R workflow for examining linear relationships is:

  • Select only continuous variables before computing correlations, because correlation coefficients are calculated between numeric variables. section 2.5.4
  • Visualize the matrix as a ggplot2 heat map, using color and printed coefficients to compare relationships quickly. section 2.5.4

NBA draft variables

A draft-data correlation matrix compares Age, games played (G), minutes played (MP), Win Shares (WS), and Win Shares per 48 minutes (WS48). G and WS correlate at about 0.80, while Age and WS correlate at about -0.25; the heat map makes these differences visible.

Linearity is also a prerequisite for linear modeling. Outliers can change a regression line’s slope and obscure the overall pattern, so diagnostic plots help evaluate whether the model’s linearity assumption is reasonable. section 5.0 section 5.7.5

How Statistics Slam Dunk covers it

How deep it goes
Defines direction and strength, demonstrates R visualization, and checks regression assumptions without presenting a formal proof.
Examples
Compares NBA draft Age, games, minutes, Win Shares, and Win Shares per 48 minutes with a correlation matrix and heat map.
What it assumes
Assumes continuous variables and basic regression vocabulary while defining correlation, residuals, and diagnostic checks.
What you can do after
Apply it via R to compute correlations, visualize relationships, and diagnose linear-model assumptions.
How it connects
Connects correlation coefficients, linear modeling, regression models, outliers, normality, residuals, and homoscedasticity.

Also explained in

Compare how 2 books explain linear relationship →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.