Correlation measures the strength and direction of the linear relationship between two quantitative variable. Correlation is usually written as r.
Suppose we have data on variables x and y for n individuals. The values for the first individ. are X1 and Y1, second individ. X2, Y2, and so on. The means and SD of the two variables are x-bar and Sx, for the x values and y-bar Sy for the y-values. The correlation r between x and y is:
r = [1/(n-1)][∑((x - xbar) / Sx)((y - ybar) / Sy)
r only measures straight-line relationships.