Track 3 · Visualising and Exploring Data · Lesson 9 of 11

Correlation heatmaps

Read a correlation matrix and its heatmap — sign, strength, redundancy — choose an honest colour scale, and recognise what a single correlation per pair cannot show.

30 minIntermediate8 graded exercisesMembers

Before building a price model, a valuation team wants a one-screen overview of how six property variables relate to each other. A correlation heatmap gives exactly that — and it is one of the easiest charts to over-read, because each coloured square compresses a whole scatter plot into one number.

A correlation matrix lists Pearson's correlation rr for every pair of numeric variables. Row ii, column jj holds rr between variable ii and variable jj. Three facts make it easy to read:

  • The diagonal is all 1s: every variable correlates perfectly with itself.
  • It is symmetric: the entry for (area, price) equals the entry for (price, area), so only one triangle carries information.
  • Each entry is between −1-1 and +1+1: the sign gives the direction, the size the strength of the linear association.

A heatmap colours each cell by its value, so that patterns in a large matrix jump out.

Included with a Formula Quest membership

It has 8 graded exercises with feedback, hints and worked solutions. After it you will be able to:

  • Read a correlation matrix: the diagonal, symmetry, sign and strength
  • Spot the variables most related to an outcome and the redundant pairs among predictors
  • Use a symmetric diverging colour scale fixed at −1 to +1, with values printed
  • Check scatter plots behind important cells: r misses curves and does not show causes