T1.7 Covariance and correlation Start ★ 0
T1.7Playlist 1, episode 7

Which cloud scores zero?

T1.3 drew two amounts as a cloud of dots. Today: one number that says how closely a cloud follows a straight line, and which way. Guess first: you will see your answer again later.

Builds on: T1.3, T1.4, T1.5, T1.6Leads to: T8.1, T8.2
0Last time: the scatter and the see-saw

Two balance points

Lina’s ten summer days from T1.3 (invented): temperature across, cups sold up. Each axis gets its own see-saw.

The two means make a cross that splits the cloud into four corners.
Brought back: the scatter (T1.3) and the see-saw (T1.4), one on each axis.

1Together or opposite?

Together, opposite, or nothing?

Three everyday pairs. Answer the question on each card.

0 of 3
Two amounts can move together (positive), opposite (negative), or not at all. A label can’t join in: it has no mean to measure from.
2The quilt

Every dot spans a rectangle

Each day stretches a rectangle to the cross. Green when the day is on the same side of both means, pink when it is on opposite sides. Tap a dot to read its rectangle; drag it to change the day.

Rectangle of one dot: (x − x̄) × (y − ȳ). Same sides: positive (green). Opposite sides: negative (pink).
Instrument: Rectangle quilt. New today; it stays in this episode.

2The quilt

One number from the quilt

Line up the ten rectangles, add them with their signs, then share the total among n − 1, as T1.5 did with the squares.

Covariance: the average signed rectangle, sxy = Σ(x − x̄)(y − ȳ) ÷ (n − 1).
In French: covariance

2The quilt

Green, pink, or both

Three invented clouds of 30 dots. Look at the colour of the quilt before you read the number.

Mostly green: positive covariance. Mostly pink: negative. Green and pink cancel: close to 0.

3Units

Same tables, in cents

The 244 real tables from T1.2: bill across, tip up. Their covariance is 8.32 dollars × dollars. Answer first, then switch the units yourself.

Covariance carries the units of both amounts. Change the units and it changes, though not one dot moved.

Lina rewrites both columns in cents. What happens to the covariance?

3Units

Measure the quilt in ticks

A σ-ruler on each axis. Measured in ticks, the units vanish and the average rectangle becomes one number: r.

Correlation: r = sxy ÷ (sx sy), the covariance measured in σ-ruler ticks. No units, so cents or dollars give the same r.
Instrument: σ-ruler (T1.6), now on both axes. The dashed slope-r line returns in T8.1.

4r

From −1 to +1

Slide r and watch 40 dots (invented) gather onto a line or scatter away from it.

r runs from −1 to +1. Its sign gives the direction; its size, how closely the dots follow a straight line.
In French: coefficient de corrélation
+0.5

!Trap 1 of 3

A perfect curve, r = 0?

The heating-and-cooling U from T1.3 (invented): energy used at home against outside temperature. Every day sits exactly on the curve. Answer before you look.

r measures straight-line patterns only. A perfect curve can score 0, so always look at the scatter.

What is r for these 13 days?

!Trap 2 of 3

One far dot

Twelve dots with no pattern (invented), plus one yellow dot. Drag the yellow dot far into the top-right corner.

One far dot can create a correlation out of nothing, or hide one. Check the picture before trusting r.
!Trap 3 of 3

Steep is not strong

Two invented clouds of 30 dots on the same scale: one climbs steeply, one gently. Answer first.

r is not the slope. A gentle cloud can have the same r as a steep one; r says how closely the dots follow their line, not how steep it is.

Which cloud has the larger r?

5Cause

Together is not because

Twenty winter days (invented): cups of cocoa at Lina’s stand and pairs of mittens sold next door. Answer first.

A correlation, even a strong one, does not say why. A hidden cause can push both amounts at once.
In French: corrélation n’est pas causalité

Do mittens make people buy cocoa?

6Name it

Name what you did

Each card is something your hand already did. Tap a card, then its name. The book’s symbols appear as you match.

0 of 7
Covariance: the average rectangle, in the units of both amounts. Correlation: the same quilt in ticks, from −1 to +1.
7Real data

Three real pairs

The 244 real tables again. Pick a pair, read its r, and switch the quilt on to see where it comes from.

Bigger bills come with bigger tips (r = +0.68) but with a smaller tip percentage (r = −0.34).

8Practice

Practice arcade

Five levels, a “guess the r” game, a boss where you build clouds from eight dots, and a quilt lab.

9Remember

Six things to remember, and three traps

Sources and textbook links

Covariance (sample and population), the correlation coefficient and their interpretation follow chapter 3 of the course textbook [1]. The 244 restaurant tables are real data [2]; every number about them is computed on this page. That correlation describes straight-line relationships, and that a strong curve can score a weak r, is in section 7.1.4 of [3]; that association does not imply causation is in its section 1.2.5; that one far point can pull a fitted line is in its section 7.3. Anscombe’s four datasets [4] make the same points and return in T8.2 and T8.5. The ten summer days, the energy U, the clouds, the cocoa and mittens and the doors are invented for teaching. “In French” labels give common French statistical vocabulary, not quotations from the book.

  1. Anderson, D. R., Sweeney, D. J., Williams, T. A., Camm, J. D., & Cochran, J. J. (2015). Statistiques pour l’économie et la gestion (5e éd., traduction de la 7e édition américaine d’Essentials of Statistics for Business and Economics par C. Borsenberger). De Boeck Supérieur. Chapitre 3.
  2. Bryant, P. G., & Smith, M. (1995). Practical data analysis: Case studies in business statistics. Irwin. Dataset “tips” (244 tables), as distributed with the R package reshape2 and the seaborn-data repository: https://github.com/mwaskom/seaborn-data
  3. Çetinkaya-Rundel, M., & Hardin, J. (2024). Introduction to Modern Statistics (2nd ed.). OpenIntro. Sections 1.2.5, 7.1.4 and 7.3. https://openintro-ims.netlify.app/model-slr
  4. Anscombe, F. J. (1973). Graphs in statistical analysis. The American Statistician, 27(1), 17–21. https://doi.org/10.1080/00031305.1973.10478966