Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Explorations › Data detective › lesson 4 of 6

Find the pattern

Do students who study more score higher? Measure how strongly two things move together with the correlation coefficient.

A scatter plot shows every student at once. The question is whether the cloud has a direction.

Look first

Turn the model so you are looking from the front: hours across, score up. The balls rise from left to right. More hours, higher scores, with some scatter. Now colour by sleep: the blue students, who slept 8 hours or more, are spread right across the cloud, so sleep shows a weaker link.

Measure it: correlation

The correlation coefficient rrr runs from −1 to 1:

rmeans
close to 1strong rising line
around 0no straight-line link
close to −1strong falling line

Hours and score have a strong correlation, about 0.9. Sleep and score have a much weaker one.

Correlation is not cause

A strong correlation says two things move together. It does not say one causes the other. Perhaps students who study more also go to more classes, and the classes do the work. Only an experiment, like the A/B tests in Data you can hold, can show a cause.

What to remember

  • A scatter plot shows whether two measurements move together.
  • The correlation coefficient rrr measures straight-line links from −1 to 1.
  • Strong correlation does not prove that one thing causes the other.
  • Experiments with random groups are how causes are tested.
Charts that tell the truthNext