Correlation matrix: how measured variables move together

When several things were measured on the same samples — four flower dimensions, six sensory scores, a panel of chemistry — the first question is which move together. A correlation matrix gives every pairwise correlation coefficient with its p-value: r near ±1 means the two track each other almost exactly, near 0 that they are unrelated.

The data

One row per sample, one column per variable (the four iris measurements, cm):

SampleSepal lengthSepal widthPetal lengthPetal width
15.13.51.40.2
24.93.01.40.2
1505.93.05.11.8

Matrix layout: samples down, variables across — the same shape PCA, PLS and the heatmap use.

In MinutePlot

Choose Correlation matrix, paste the table, run. Pearson’s r is the default (Spearman and Kendall are options for ranked or non-linear relationships); the figure colours each cell by its coefficient and the table beneath gives r and p for every pair.

The result

Petal length and petal width: r = 0.96, p < 0.001; sepal length and petal length: r = 0.87. Sepal width stands apart (r = −0.12 with sepal length, p = 0.15, not significant). Three of the four dimensions largely measure one thing — flower size — which is exactly what PCA finds next.

Correlation heatmap of the four iris measurements

The figure MinutePlot produces: every pairwise coefficient as a colour, red positive and blue negative, with the value printed in each cell.

Report it like this

“Petal length correlated strongly with petal width (Pearson r = 0.96, p < 0.001) and sepal length (r = 0.87, p < 0.001); sepal width was not correlated with sepal length (r = −0.12, p = 0.15).”

Try it yourself — in a minute. Paste the table above into MinutePlot, press Confirm and Analyze, and you will get this exact analysis and a publication-ready figure with the letters placed for you. Open MinutePlot in your browser — free 14-day trial, no card needed.
References
  1. Pearson, K. (1895). Notes on regression and inheritance in the case of two parents. Proceedings of the Royal Society of London, 58, 240–242.