Tsallaka zuwa abun ciki
Justice Tech School

Correlation

cor measures how two vectors move together from -1 to 1.

Example
x <- c(1, 2, 3, 4, 5)
y <- c(2, 4, 5, 4, 5)
print(round(cor(x, y), 3))
print(cor(x, 2 * x))
print(round(cor(x, -x), 1))

Exercise

Correlation.

(x, y)

Quiz Test

What is cor(x, -x)?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.