Correlation Coefficient

April 12, 2026

Problem

Compute r for {(1,2), (3,6), (5,7), (7,8), (9,10)}. Show scatter plot with r-value.

Explanation

What is rr?

The correlation coefficient rr measures the strength and direction of a linear relationship. rr ranges from 1-1 to +1+1.

Step-by-step

Data: (1,2),(3,6),(5,7),(7,8),(9,10)(1,2), (3,6), (5,7), (7,8), (9,10). n=5n = 5.

Step 1 — Compute means: xˉ=5\bar{x} = 5, yˉ=6.6\bar{y} = 6.6.

Step 2 — Compute deviations and products:

| xx | yy | xxˉx - \bar{x} | yyˉy - \bar{y} | product | (xxˉ)2(x-\bar{x})^2 | (yyˉ)2(y-\bar{y})^2 | |---|---|---|---|---|---|---| | 1 | 2 | -4 | -4.6 | 18.4 | 16 | 21.16 | | 3 | 6 | -2 | -0.6 | 1.2 | 4 | 0.36 | | 5 | 7 | 0 | 0.4 | 0 | 0 | 0.16 | | 7 | 8 | 2 | 1.4 | 2.8 | 4 | 1.96 | | 9 | 10 | 4 | 3.4 | 13.6 | 16 | 11.56 |

Step 3 — Sums: =36,  40,  35.2\sum = 36, \; 40, \; 35.2

Step 4 — Formula:

r=(xixˉ)(yiyˉ)(xixˉ)2(yiyˉ)2=3640×35.2=361408=3637.52=0.960r = \frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum(x_i-\bar{x})^2 \cdot \sum(y_i-\bar{y})^2}} = \frac{36}{\sqrt{40 \times 35.2}} = \frac{36}{\sqrt{1408}} = \frac{36}{37.52} = 0.960

Interpretation: r=0.96r = 0.96strong positive correlation. As xx increases, yy strongly tends to increase too.

Strength guide

r>0.7|r| > 0.7: strong. 0.30.30.70.7: moderate. <0.3< 0.3: weak.

Try it in the visualization

Scatter plot with the computed rr value. The tighter the cluster around a line, the higher r|r|.

Interactive Visualization

Parameters

0.96
30.00
1.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Correlation Coefficient | MathSpin