# Pearson correlation coefficient

## Pearson correlation coefficient :

The Pearson correlation coefficient is a measure of the strength and direction of the linear relationship between two continuous variables. It is represented by the symbol “r” and is calculated using the formula:
r = ∑ (x – x̄)(y – ȳ) / √(∑ (x – x̄)^2 ∑ (y – ȳ)^2)
Where x and y are the two variables being analyzed, x̄ and ȳ are the means of those variables, and ∑ represents the sum of all observations.
The Pearson correlation coefficient ranges from -1 to 1, with 0 indicating no correlation. A positive correlation means that as one variable increases, the other variable also increases. For example, there is a positive correlation between income and education level, as individuals with higher levels of education tend to earn more money. On the other hand, a negative correlation means that as one variable increases, the other variable decreases. For example, there is a negative correlation between age and physical strength, as individuals tend to become weaker as they get older.
It is important to note that the Pearson correlation coefficient only measures linear relationships, meaning that it is not able to capture nonlinear relationships between variables. For example, if there is a relationship between height and weight that follows a curve rather than a straight line, the Pearson correlation coefficient would not accurately capture this relationship.
One limitation of the Pearson correlation coefficient is that it is sensitive to outliers, or observations that are significantly different from the rest of the data. These outliers can greatly influence the value of the Pearson correlation coefficient, potentially leading to inaccurate results.
To illustrate the use of the Pearson correlation coefficient, let’s consider two examples:
Example 1: The relationship between height and weight
We want to determine the strength and direction of the relationship between height and weight in a sample of 100 individuals. After collecting the data, we find that the mean height is 69 inches and the mean weight is 150 pounds. We also calculate the Pearson correlation coefficient using the formula above and find that it is 0.79.
This value indicates a strong positive correlation between height and weight, as individuals who are taller tend to weigh more. However, we should also examine the data to check for outliers that may have influenced this result. For example, if there is an individual who is significantly taller or shorter than the rest of the sample, this could affect the value of the Pearson correlation coefficient.
Example 2: The relationship between hours of sleep and test scores
We want to determine the strength and direction of the relationship between the number of hours of sleep a student gets and their test scores. After collecting the data from a sample of 50 students, we find that the mean number of hours of sleep is 7 and the mean test score is 75. We calculate the Pearson correlation coefficient and find that it is -0.34.
This value indicates a moderate negative correlation between hours of sleep and test scores, meaning that students who get more sleep tend to have lower test scores. However, we should also consider other factors that could be influencing this relationship, such as the students’ study habits or their general level of motivation.
In conclusion, the Pearson correlation coefficient is a useful tool for measuring the strength and direction of the linear relationship between two continuous variables. It is important to consider limitations such as sensitivity to outliers and inability to capture nonlinear relationships when interpreting the results.