STAT 101
M02 · L02
Module 2

Visualizing Relationships

Single-variable plots reveal shape. Relationship plots reveal connection — how two or more variables move together, diverge, or interact.

01 / 13
STAT 101
M02 · L02
The core tool

Scatter Plots

Each observation becomes a point. Its x-position encodes one variable; its y-position encodes another. The resulting cloud reveals the relationship between two quantitative variables.

What to look for
Direction · Form · Strength · Outliers
02 / 13
STAT 101
M02 · L02
Pattern reading

Reading a Scatter Plot

A scatter plot tells a four-part story about any relationship:

  • Direction — positive, negative, or none?
  • Form — linear, curved, or complex?
  • Strength — tight cluster or diffuse cloud?
  • Outliers — any points far from the main trend?
03 / 13
STAT 101
M02 · L02
Numerical summary

Correlation

Pearson’s r summarizes the strength and direction of a linear relationship in a single number from −1 to +1. Zero means no linear relationship; ±1 means a perfect line.

Strong positive
r > 0.6
Strong negative
r < −0.6
04 / 13
STAT 101
M02 · L02
The formula

Pearson’s r

Pearson’s r is the average product of standardized x and y. When both deviate above their means together, the products are positive and r is positive.

Pearson Correlation
r = \frac{\displaystyle\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\displaystyle\sum_{i=1}^{n}(x_i - \bar{x})^2 \cdot \sum_{i=1}^{n}(y_i - \bar{y})^2}}
05 / 13
STAT 101
M02 · L02
Critical warning

Correlation ≠ Causation

Ice cream sales and drowning rates are strongly correlated — because both rise in summer. Correlation measures association, not cause. Always ask: could a third variable explain both?

The golden rule
To establish causation, you need an experiment — not just a correlation.
06 / 13
STAT 101
M02 · L02
Time as a variable

Line Plots

When one axis is time, connecting the dots makes temporal order explicit. Line plots reveal trends, seasonal cycles, and sudden step changes that scatter plots would miss.

  • Trends — sustained upward or downward movement
  • Seasonality — regular repeating patterns
  • Anomalies — sudden jumps or drops
07 / 13
STAT 101
M02 · L02
Three variables

Bubble Charts

Add a third variable by encoding it as bubble size. Hans Rosling’s famous country bubbles — x = income, y = life expectancy, size = population — told the story of global development in one chart.

Key rule
Map to area, not radius — the eye perceives area, not length
08 / 13
STAT 101
M02 · L02
Many variables

Heatmaps

A heatmap encodes a matrix of values using color intensity. The most common use is the correlation matrix: each cell shows the correlation between two variables, revealing which pairs move together.

  • Diagonal — always 1.0 (self-correlation)
  • Warm colors — strong positive correlation
  • Cool colors — strong negative correlation
09 / 13
STAT 101
M02 · L02
All pairwise views

Pair Plots

A pair plot creates a grid of scatter plots — every variable against every other. The diagonal shows each variable’s own distribution. One figure, every pairwise relationship.

Best for
≤ 10 vars
Cells in grid
p × p
10 / 13
STAT 101
Choosing
Which to use?

Choosing the Right Chart

Match the chart to your data:

  • Scatter plot — two continuous variables
  • Line plot — one axis is time
  • Bubble chart — three variables, few observations
  • Heatmap — many variables or time × category
  • Pair plot — explore all pairwise relationships at once
11 / 13
STAT 101
Knowledge Check

Check what stuck

Four questions from this lesson, using its own worked figures. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

12 / 13
STAT 101
Summary
Recap

What you learned

Scatter plots, correlation, line plots, bubble charts, heatmaps, and pair plots form a complete toolkit for visualizing how variables relate. Correlation measures association — never forget it is not causation.

13 / 13