打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Pearson Correlation Coefficient (r) | Guide & Examples
userphoto

2023.03.20 湖北

关注
The Pearson correlation coefficient (r) is the most common way of measuring a linear correlation. It is a number between –1 and 1 that measures the strength and direction of the relationship between two variables.
Pearson correlation coefficient (r)Correlation typeInterpretationExample
Between 0 and 1Positive correlationWhen one variable changes, the other variable changes in the same direction.Baby length & weight:
The longer the baby, the heavier their weight.
0No correlationThere is no relationship between the variables.Car price & width of windshield wipers:
The price of a car is not related to the width of its windshield wipers.
Between
0 and –1Negative correlationWhen one variable changes, the other variable changes in the opposite direction.Elevation & air pressure:
The higher the elevation, the lower the air pressure.
Table of contents
What is the Pearson correlation coefficient?
Visualizing the Pearson correlation coefficient
When to use the Pearson correlation coefficient
Calculating the Pearson correlation coefficient
Testing for the significance of the Pearson correlation coefficient
Reporting the Pearson correlation coefficient
Frequently asked questions about the Pearson correlation coefficient
What is the Pearson correlation coefficient?
The Pearson correlation coefficient (r) is the most widely used correlation coefficient and is known by many names:
Pearson’s r
Bivariate correlation
Pearson product-moment correlation coefficient (PPMCC)
The correlation coefficient
The Pearson correlation coefficient is adescriptive statistic, meaning that it summarizes the characteristics of a dataset. Specifically, it describes the strength and direction of the linear relationship between two quantitative variables.
Although interpretations of the relationship strength (also known aseffect size) vary between disciplines, the table below gives general rules of thumb:
Pearson correlation coefficient (r) valueStrengthDirection
Greater than .5StrongPositive
Between .3 and .5ModeratePositive
Between 0 and .3WeakPositive
0NoneNone
Between 0 and –.3WeakNegative
Between –.3 and –.5ModerateNegative
Less than –.5StrongNegative
The Pearson correlation coefficient is also aninferential statistic, meaning that it can be used totest statistical hypotheses. Specifically, we can test whether there is a significant relationship between two variables.
Visualizing the Pearson correlation coefficient
Another way to think of the Pearson correlation coefficient (r) is as a measure of how close the observations are to aline of best fit.
The Pearson correlation coefficient also tells you whether the slope of the line of best fit is negative or positive. When the slope is negative, r is negative. When the slope is positive, r is positive.
When r is 1 or –1, all the points fall exactly on the line of best fit:
When r is greater than .5 or less than –.5, the points are close to the line of best fit:
When r is between 0 and .3 or between 0 and –.3, the points are far from the line of best fit:
When r is 0, a line of best fit is not helpful in describing the relationship between the variables:
Receive feedback on language, structure, and formatting
Professional editors proofread and edit your paper by focusing on:
Academic style
Vague sentences
Grammar
Style consistency
See an example
When to use the Pearson correlation coefficient
The Pearson correlation coefficient (r) is one of severalcorrelation coefficients that you need to choose between when you want to measure a correlation. The Pearson correlation coefficient is a good choice when all of the following are true:
Both variables arequantitative: You will need to use a different method if either of the variables isqualitative.
The variables arenormally distributed: You can create a histogram of each variable to verify whether the distributions are approximately normal. It’s not a problem if thevariables are a little non-normal.
The data have nooutliers: Outliers are observations that don’t follow the same patterns as the rest of the data. A scatterplot is one way to check for outliers—look for points that are far away from the others.
The relationship is linear: “Linear” means that the relationship between the two variables can be described reasonably well by a straight line. You can use a scatterplot to check whether the relationship between two variables is linear.
Pearson vs. Spearman’s rank correlation coefficients
Spearman’s rank correlation coefficient is another widely used correlation coefficient. It’s a better choice than the Pearson correlation coefficient when one or more of the following is true:
The variables areordinal.
The variables aren’tnormally distributed.
The data includes outliers.
The relationship between the variables is non-linear and monotonic.
Calculating the Pearson correlation coefficient
Below is a formula for calculating the Pearson correlation coefficient (r):
The formula is easy to use when you follow the step-by-step guide below. You can also use software such as R or Excel to calculate the Pearson correlation coefficient for you.
Example: DatasetImagine that you’re studying the relationship between newborns’ weight and length. You have the weights and lengths of the 10 babies born last month at your local hospital. After you convert the imperial measurements to metric, you enter the data in a table:Weight (kg)Length (cm)
3.6353.1
3.0249.7
3.8248.4
3.4254.2
3.5954.9
2.8743.7
3.0347.2
3.4645.2
3.3654.4
3.350.4
Step 1: Calculate the sums of x and y
Start by renaming the variables to “x” and “y.” It doesn’t matter which variable is called x and which is called y—the formula will give the same answer either way.
Next, add up the values of x and y. (In the formula, this step is indicated by the Σ symbol, which means “take the sum of”.)
Example: Calculating the sums of x and yWeight = x
Length = y
Σx = 3.63 + 3.02 + 3.82 + 3.42 + 3.59 + 2.87 + 3.03 + 3.46 + 3.36 + 3.30
Σx = 33.5
Σy = 53.1 + 49.7 + 48.4 + 54.2 + 54.9 + 43.7 + 47.2 + 45.2 + 54.4 + 50.4
Σy = 501.2
Step 2: Calculate x2 and y2 and their sums
Create two new columns that contain the squares of x and y. Take the sums of the new columns.
Example: Calculating x2 and y2 and their sums xyx2y2
3.6353.1(3.63)2 = 13.18(53.1)2 = 2 819.6
3.0249.79.122 470.1
3.8248.414.592 342.6
3.4254.211.72 937.6
3.5954.912.893 014
2.8743.78.241 909.7
3.0347.29.182 227.8
3.4645.211.972 043
3.3654.411.292 959.4
3.350.410.892 540.2
Σx2 = 13.18 + 9.12 + 14.59 + 11.70 + 12.89 +  8.24 +  9.18 + 11.97 + 11.29 + 10.89
Σx2 = 113.05
Σy2 = 2 819.6 + 2 470.1 + 2 342.6 + 2 937.6 + 3 014.0 + 1 909.7 + 2 227.8 + 2 043.0 + 2 959.4 + 2 540.2
Σy2 = 25 264
Step 3: Calculate the cross product and its sum
In a final column, multiply together x and y (this is called the cross product). Take the sum of the new column.
Example: Calculating the cross product and its sumxyx2y2xy (x*y)
3.6353.113.182 819.63.63 * 53.1 = 192.8
3.0249.79.122 470.1150.1
3.8248.414.592 342.6184.9
3.4254.211.72 937.6185.4
3.5954.912.893 014197.1
2.8743.78.241 909.7125.4
3.0347.29.182 227.8143
3.4645.211.972 043156.4
3.3654.411.292 959.4182.8
3.350.410.892 540.2166.3
Σxy = 192.8 + 150.1 + 184.9 + 185.4 + 197.1 + 125.4 + 143.0 + 156.4 + 182.8 + 166.3
Σxy = 1 684.2
Step 4: Calculate r
Use the formula and the numbers you calculated in the previous steps to find r.
Example: Calculating r
Testing for the significance of the Pearson correlation coefficient
The Pearson correlation coefficient can also be used to test whether the relationship between two variables issignificant.
The Pearson correlation of thesample is r. It is an estimate of rho (ρ), the Pearson correlation of thepopulation. Knowing r and n (the sample size), we caninfer whether ρ is significantly different from 0.
Null hypothesis (H0): ρ = 0
Alternative hypothesis (Ha): ρ ≠ 0
Totest the hypotheses, you can either use software like R or Stata or you can follow the three steps below.
Step 1: Calculate the t value
Calculate the t value (atest statistic) using this formula:
Example: Calculating the t valueThe weight and length of 10 newborns has a Pearson correlation coefficient of .47. Since we know that n = 10 and r = .47, we can calculate the t value:    
Step 2: Find the critical value of t
You can find the critical value of t (t*) in a t table. To use the table, you need to know three things:
Thedegrees of freedom (df): For Pearson correlation tests, the formula is df = n – 2.
Significance level (α): By convention, the significance level is usually .05.
One-tailed or two-tailed: Most often, two-tailed is an appropriate choice for correlations.
Example: Finding the critical value of tFor a two-tailed test of significance at α = .05 and df = 8, the critical value of t (t*) is 1.86.Step 3: Compare the t value to the critical value
Determine if the absolute t value is greater than the critical value of t. “Absolute” means that if the t value is negative you should ignore the minus sign.
Example: Comparing the t value to the critical value of t (t*)t = 1.506
t* = 1.86
The t value is less than the critical value of t.
Step 4: Decide whether to reject the null hypothesis
If the t value is greater than the critical value, then the relationship is statistically significant (p <  α). The data allows you to reject the null hypothesis and provides support for the alternative hypothesis.
If the t value is less than the critical value, then the relationship is not statistically significant (p >  α). The data doesn’t allow you to reject the null hypothesis and doesn’t provide support for the alternative hypothesis.
Example: Deciding whether to reject the null hypothesisFor the correlation between weight and height in a sample of 10 newborns, the t value is less than the critical value of t. Therefore, we don’t reject the null hypothesis that the Pearson correlation coefficient of the population (ρ) is 0. There is no significant relationship between weight and height (p > .05).
(Note that a sample size of 10 is very small. It’s possible that you would find a significant relationship if you increased the sample size.)
Reporting the Pearson correlation coefficient
If you decide to include a Pearson correlation (r) in your paper or thesis, you should report it in yourresults section. You can follow these rules if you want toreport statistics in APA Style:
You don’t need to provide a reference or formula since the Pearson correlation coefficient is a commonly used statistic.
You should italicize r when reporting its value.
You shouldn’t include a leading zero (a zero before the decimal point) since the Pearson correlation coefficient can’t be greater than one or less than negative one.
You should provide two significant digits after the decimal point.
When Pearson’s correlation coefficient is used as an inferential statistic (to test whether the relationship is significant), r is reported alongside its degrees of freedom and p value. The degrees of freedom are reported in parentheses beside r.
Example: Reporting the Pearson correlation coefficient in APA StyleNewborns’ weight and length were moderately correlated, although the relationship was not statistically significant, r(8) = .47, p > .17. Frequently asked questions about the Pearson correlation coefficient
What is the definition of the Pearson correlation coefficient?
When should I use the Pearson correlation coefficient?
How do I calculate the Pearson correlation coefficient in R?
How do I calculate the Pearson correlation coefficient in Excel?
Cite this Scribbr article
If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.
Turney, S. (2022, December 05). Pearson Correlation Coefficient (r) | Guide & Examples. Scribbr. Retrieved March 20, 2023, from https://www.scribbr.com/statistics/pearson-correlation-coefficient/
Cite this article
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Pearson相关系数 - Pearson's Correlation Coefficie...
Scientific method: Statistical errors
别看到高度相关,就认为一致,那是不对的!
6.2 Using the Multiple Regression Equation
科学家倡议P值需要0.005,显著性判断才成立
统计学之三大相关性系数(pearson、spearman、kendall)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服