Correlation

Correlation
r = 1 positive linear
r = 0 no relation within the data
r = -1 negative linear

b = 4
a = -3
y = 4x – 3
r is positive

correlation efficient
value between -1 and 1

r = Σi[(xi-x)(yi-y)] / √Σi[(xi-x)(yi-y)]
x=1/N Σ Xi
y=1/N Σ Yi

if it is
x 3, 4, 5
y 7, 8, 9

2 / √2 * 2 = 1
we know r is between -1 and 1.

x= 3, 4, 5
y= 2, 5, 8
x-x -1, 0, 1
y-y -3, 0, 3

= 6 / √ 2 * 6
= 1