What Correlation is
Correlation is a statistical measure that shows the strength of a linear relationship between two variables. It is used to measure how closely two sets of data points are related to each other.
Steps for calculating Correlation:
-
Calculate the means of both variables: First, calculate the mean of each variable. This can be done by adding up all the values for each variable and dividing by the number of values.
-
Calculate the differences from the mean: For each data point, calculate the difference from the mean of its variable.
-
Multiply the differences: Multiply the difference from the mean of one variable by the difference from the mean of the other variable for each data point.
-
Sum the products: Sum up all the products from step 3.
-
Divide by the number of data points: Divide the sum from step 4 by the number of data points.
-
Calculate the correlation coefficient: The correlation coefficient is equal to the result of step 5. The correlation coefficient will be between -1 and 1, with -1 representing a perfect negative correlation, 0 representing no correlation, and 1 representing a perfect positive correlation.
Examples
- Examining the relationship between the amount of time spent studying for a test and the grade achieved.
- Investigating the relationship between smoking and lung cancer.
- Looking at the correlation between income and education level.
- Analyzing the association between exercise and heart health.
- Investigating the correlation between age and cholesterol levels.