Day 5: Introduction to Correlation
Resources
In Statistics, dependence is any statistical relationship between 2 random variables or two sets of data. Correlation refers to any of a broad class of statistical relationships involving dependence; however, in common usage it generally refers to the extent to which 2 variables have a linear relationship with each other. Familiar examples of dependent phenomena include the correlation between the physical statures of parents and their offspring, and the correlation between the demand for a product and its price.
Correlations are useful because they can indicate a predictive relationship that can be exploited in practice. For example, an electric utility may produce less power on a mild day based on the correlation between electricity demand and weather. In this example, there is a causal relationship because extreme weather causing people to use more electricity for heating or cooling; however, statistical dependence is not sufficient to demonstrate the presence of such a causal relationship. Correlation does not imply causation.
Formally, dependence refers to any situation in which random variables do not satisfy a mathematical condition of probabilistic independence. Loosely, correlation can refer to any departure of two or more random variables from independence. Technically, it refers to any of several more specialized types of relationships between mean values. There are several correlation coefficients, often denoted as ρ or r, measuring the degree of correlation. The most common of these is the Pearson correlation coefficient, which is sensitive only to a linear relationship between two variables. This may exist even if one is a nonlinear function of the other. Other correlation coefficients have been developed to be more robust than the Pearson correlation—that is, more sensitive to nonlinear relationships.
Here are 2 popular coefficients of correlation:
Source: Wikipedia
Here are 2 hypothetical examples of variable pairs that are positively and negatively correlated:
Positive Correlation
Source: Mathwarehouse.com
Negative Correlation
Source: uwsp.edu