- To study the interdependence or covariation of 2 variables
- Positive Correlations
- If large (small) values of one variable are associated with the large (small) values of other variable
- Negative Correlations
- If large (small) values of one variable are associated with small (large) values of other variable
- Interpretation of result:
- If value is 1, then there is perfect uphill (positive) linear relationship between the 2 variables
- If value is −1, then there is a perfect downhill (negative) linear relationship between the 2 variables
- If value is between 0.7 and 1, then there is strong uphill (positive) linear relationship between the 2 variables
- If value is between -0.7 and −1, then there is strong downhill (negative) linear relationship between the 2 variables
- If value is 0, then there is no linear relationship between the 2 variables
5.1. Correlation in Excel
- Data -> Data Analysis -> Correlation
OR
- =CORREL(A2:A6,B2:B6) etc.
5.2. Correlation in R-Programming
- To compute Pearson’s product moment correlation coefficient:
- x <- c(1,2,3,4,5)
- y <- c(2,4,6,8,10)
- cor(x, y) = 1
- To plot scatter diagram: