Correlation coefficient is standardized covariance. In other words, unit less covariance.
Correlation is used to measure the size of an effect. Values of +/- .1 represent small effect, +/-0.3 medium effect, +/-0.5 large effect. (Page:112, Discovering Statistics with SPSS by Andy Field.)
Now, what is a covariance? Some other time, but let's see how simple it is to run a correlation test in R.
Let's use the iris dataset and plot it for a visual inspection:
>plot(iris$Petal.Length,iris$Petal.Width,main="Correlation: iris$Petal.Length,iris$Petal.Width")
We do see a relationship between Petal length and petal width. Now lets quantify that:
Now correlation:
> cor(iris$Petal.Length,iris$Petal.Width)
R spits out with one statistic: [1] 0.9628654
A correlation coefficient can must lie between -1 and +1 where quantity signifies the strength of relationship and sign represents the direction (+ or - ) of relationship. In the iris case, relationship is positive which means petal width increases as petal length increases. Strength of relationship is expressed by 0.96 which is very close to the limit, hence we say that the relationship is very strong.
So, we conclude: there is a strong positive correlation between petal length and width.
Correlation is used to measure the size of an effect. Values of +/- .1 represent small effect, +/-0.3 medium effect, +/-0.5 large effect. (Page:112, Discovering Statistics with SPSS by Andy Field.)
Now, what is a covariance? Some other time, but let's see how simple it is to run a correlation test in R.
Let's use the iris dataset and plot it for a visual inspection:
>plot(iris$Petal.Length,iris$Petal.Width,main="Correlation: iris$Petal.Length,iris$Petal.Width")
We do see a relationship between Petal length and petal width. Now lets quantify that:
Now correlation:
> cor(iris$Petal.Length,iris$Petal.Width)
R spits out with one statistic: [1] 0.9628654
A correlation coefficient can must lie between -1 and +1 where quantity signifies the strength of relationship and sign represents the direction (+ or - ) of relationship. In the iris case, relationship is positive which means petal width increases as petal length increases. Strength of relationship is expressed by 0.96 which is very close to the limit, hence we say that the relationship is very strong.
So, we conclude: there is a strong positive correlation between petal length and width.

No comments:
Post a Comment