Measure how strongly two lists are related
Find the correlation coefficient r, which runs from -1 (perfect downhill) to +1 (perfect uphill).
The correlation coefficient r tells you how closely points follow a straight line. Near +1 the points climb, near -1 they fall, and near 0 there is no straight-line pattern.
The example has x = 1 to 5 and y = 9, 7, 6, 3, 2. The points fall steadily, so r is about -0.9879.
Classic Graphing 84
Start on the main screen: Press 2nd then mode (QUIT) to get back to the home screen. Pressing clear on a menu also backs out of it.
Type x into L1 and y into L2.
stat11enter2enter3enter4enter5enter▶9enter7enter6enter3enter2enterRun LinReg(ax+b) from STAT, CALC, option 4. Move down to Calculate and press enter.
stat▶4▼▼▼▼enter
You should seer is about -0.988, and r² (the share of the pattern explained by the line) is about 0.976.
Classic Scientific 30
Start on the main screen: Press 2nd then mode (QUIT) to leave any menu or screen and return to the calculation screen.
Type x into L1 and y into L2.
data1enter2enter3enter4enter5enter▶▲▲▲▲▲9enter7enter6enter3enter2enterOpen the STAT menu (2nd then data) and choose LinReg ax+b. Accept the lists with enter.
2ndstatdata3enterenterenterPress the down arrow a few times to scroll to r.
▼▼▼▼
You should see4:r=-0.9878783399
Natural Scientific 991
Start on the main screen: Press MENU, then 1 (Calculate) to return to the main calculation screen. AC clears the line you are on.
Open Statistics, choose y=a+bx and type the x column.
MENU621=2=3=4=5=Go back to the top, one column right, and type the y column.
▶▲▲▲▲▲9=7=6=3=2=ACPress OPTN and choose Regression Calc. The last line is r.
OPTN3
You should seer=-0.9878783399
RPN Scientific 15
Start on the main screen: There is no menu to leave. Press the back arrow to clear a number you are typing, or CLx (g then back arrow) to clear the X register.
Clear the statistics memory first, so old data cannot sneak into the answer.
fCLR ΣGSBFor each pair, key in y, press ENTER, key in x, then press Σ+.
9ENTER1Σ+7ENTER2Σ+6ENTER3Σ+3ENTER4Σ+2ENTER5Σ+Key in any x, here 6, and press f then the decimal point (ŷ,r). The correlation r lands one level up the stack.
6fŷ,r.
You should see-0.9879
RPN Advanced 42
Start on the main screen: Press EXIT (once or twice) to close any menu and return to the plain stack view of Y and X.
For each pair, key in y, press ENTER, key in x, then press the Σ+ key.
9ENTER1Σ+7ENTER2Σ+6ENTER3Σ+3ENTER4Σ+2ENTER5Σ+Open the STAT menu, then FIT, and press the last key (r).
⇧STAT÷XEQLN
You should seex: -0.9879
Tips
- A strong correlation does not prove that one thing causes the other.
- r only measures straight-line patterns. A perfect curve can still give an r near 0.
Related guides
- Fit a straight line to dataFind the least-squares line y = ax + b that best matches a set of points.
- Draw a scatter plotPlot paired data as dots so you can see whether a pattern is there.
- Summarise paired data (x and y)Get the means, spreads and cross-product sum for two lists of numbers that go together.