![]() ![]() The reason is that the correlation coefficient could be biased due to an outlier or due to the type of link between the two variables.įor instance, see the two Pearson correlation coefficients (denoted by R in the following plots) when the outlier is excluded and included: Note that it is a good practice to visualize the type of the relationship between the two variables before interpreting the correlation coefficients. This again make sense as fast cars tend to consume more fuel. ![]() On the contrary, from the correlation matrix we see that the correlation between miles per gallon ( mpg) and the time to drive 1/4 of a mile ( qsec) is 0.42, meaning that fast cars (low qsec) tend to have a worse millage per gallon (low mpg). ![]() This makes sense, cars with more horsepower tend to consume more fuel (and thus have a lower millage par gallon). This also means that a correlation close to 0 indicates that the two variables are independent, that is, as one variable increases, there is no tendency in the other variable to either decrease or increase.Īs an illustration, the Pearson correlation between horsepower ( hp) and miles per gallon ( mpg) found above is -0.78, meaning that the 2 variables vary in opposite direction. Regarding the strength of the relationship: The more extreme the correlation coefficient (the closer to -1 or 1), the stronger the relationship. On the other hand, a positive correlation implies that the two variables under consideration vary in the same direction, i.e., if a variable increases the other one increases and if one decreases the other one decreases as well. Regarding the direction of the relationship: On the one hand, a negative correlation implies that the two variables under consideration vary in opposite directions, that is, if a variable increases the other decreases and vice versa.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |