In dealing with two random variables, we refer to the measure of their linear correlation as the correlation coefficient. When two random variables are independent, this measure is 0. If two random variables X and Y are linearly related in the sense Y = a + bX for some constants a and b, then the coefficient of correlation reaches one of the extreme values +1 or -1. In either of these cases, X and Y are referred to as perfectly correlated. The formula for the coefficient of correlation for two random variables is
To compute the coefficient of correlation between two samples, enter the data as two columns of a matrix and, from the Statistics submenu choose Correlation. You can apply this operation to any size matrix to get the coefficient of correlation for each pair of columns: The number in the i, j position is the coefficient of correlation between column i and column j. A correlation matrix is always symmetric, with ones on the main diagonal.
Statistics + Correlation
, Correlation matrix:
, Correlation matrix:
![]()
The relationship
= ρ
X, Y
among correlation, covariance, and the standard deviations is
illustrated in the following example.
,