Pearson’s Correlation Coefficient (-1 ≤ r ≤ 1) | 皮尔逊相关系数(-1 ≤ r ≤ 1)

📚 Pearson’s Correlation Coefficient (-1 ≤ r ≤ 1) | 皮尔逊相关系数(-1 ≤ r ≤ 1)

Pearson’s correlation coefficient, denoted by r, measures the strength and direction of a linear relationship between two quantitative variables. It is a dimensionless number between -1 and 1, where -1 indicates a perfect negative linear correlation, 1 indicates a perfect positive linear correlation, and 0 implies no linear correlation. This article explores the concept, calculation, interpretation, and common pitfalls of Pearson’s r, suitable for IB Mathematics students.

皮尔逊相关系数(用 r 表示)衡量两个定量变量之间线性关系的强度和方向。它是一个介于 -1 和 1 之间的无量纲数,-1 表示完全负线性相关,1 表示完全正线性相关,0 表示没有线性相关。本文探讨皮尔逊 r 的概念、计算、解释及常见误区,适合 IB 数学学生。

1. What is Pearson’s Correlation Coefficient? | 什么是皮尔逊相关系数?

Developed by Karl Pearson, this coefficient quantifies how closely two variables follow a straight-line pattern. If one variable increases while the other also increases, r is positive; if one increases while the other decreases, r is negative. The measure only captures linear relationships, so a strong curved pattern may yield r close to 0. The symbol r stands for the sample coefficient, while ρ (rho) represents the population correlation.

该系数由卡尔·皮尔逊提出,量化了两个变量遵循直线模式的程度。若一个变量增加而另一个也增加,r 为正;若一个增加而另一个减少,r 为负。该指标仅捕捉线性关系,因此即使存在强曲线关系,r 也可能接近 0。符号 r 代表样本相关系数,ρ(rho)代表总体相关系数。


2. The Range and Interpretation of r | r 的范围与解读

r always lies in the closed interval [-1, 1]. The following table summarises common interpretations, though the boundaries are guidelines and can vary by discipline.

r 始终落在闭区间 [-1, 1] 中。下表总结了常见的解读,但这些界限只是参考,不同学科可能有所差异。

r value Interpretation
r = 1 Perfect positive linear correlation
0.8 ≤ r < 1 Strong positive correlation
0.5 ≤ r < 0.8 Moderate positive correlation
0 < r < 0.5 Weak positive correlation
r = 0 No linear correlation
-0.5 < r < 0 Weak negative correlation
-0.8 < r ≤ -0.5 Moderate negative correlation
-1 < r ≤ -0.8 Strong negative correlation
r = -1 Perfect negative linear correlation

r is symmetric: the correlation between x and y equals that between y and x. An r of 0.7 in social sciences may be considered strong, while in physics it may be regarded as moderate. Always consider the context.

r 具有对称性:x 与 y 的相关性与 y 与 x 的相关性相同。在社会科学中,r = 0.7 可能被视为强相关,而在物理学中可能只算中等。务必结合具体情境。


3. The Formula for r | r 的计算公式

The sample correlation coefficient r is defined as:

样本相关系数 r 的定义如下:

r = Sxy / √(Sxx × Syy)

where Sxx = Σ(xi − x̄)² = Σx² − (Σx)²/n, Syy = Σ(yi − ȳ)² = Σy² − (Σy)²/n, and Sxy = Σ(xi − x̄)(yi − ȳ) = Σxy − (Σx)(Σy)/n.

其中 Sxx = Σ(xi − x̄)² = Σx² − (Σx)²/n,Syy = Σ(yi − ȳ)² = Σy² − (Σy)²/n,Sxy = Σ(xi − x̄)(yi − ȳ) = Σxy − (Σx)(Σy)/n。

A computationally efficient version is:

计算上更便捷的公式为:

r = [n Σxy − (Σx)(Σy)] / √[ (n Σx² − (Σx)²) (n Σy² − (Σy)²) ]

This form uses column totals and is ideal for manual calculation or spreadsheet work. Both formulas yield the same value. IB exam questions may ask you to interpret these expressions, even if the actual computation is done by a GDC.

该形式利用各列总和,适合手工计算或在电子表格中操作。两个公式结果相同。IB 考试可能会要求你解读这些表达式,即便实际计算由 GDC 完成。


4. Worked Example: Calculating r by Hand | 手工计算 r 示例

Consider the data set: x: 1, 2, 3, 4, 5; y: 2, 4, 5, 4, 6. We will compute r step by step.

考虑数据集:x: 1, 2, 3, 4, 5;y: 2, 4, 5, 4, 6。我们将逐步计算 r。

First, n = 5. The sums are: Σx = 15, Σy = 21, Σx² = 55, Σy² = 97, Σxy = 71. Then Sxx = 55 − 15²/5 = 10, Syy = 97 − 21²/5 = 8.8, Sxy = 71 − (15×21)/5 = 8. Hence r = 8 / √(10 × 8.8) = 8 / √88 ≈ 0.853.

首先,n = 5。总和为:Σx = 15,Σy = 21,Σx² = 55,Σy² = 97,Σxy = 71。然后 Sxx = 55 − 15²/5 = 10,Syy = 97 − 21²/5 = 8.8,Sxy = 71 − (15×21)/5 = 8。因此 r = 8 / √(10 × 8.8) = 8 / √88 ≈ 0.853。

This indicates a strong positive linear correlation, which is consistent with the data pattern.

这显示强正线性相关,与数据模式相符。


5. Using a GDC to Compute r | 使用图形计算器计算 r

In the IB course, you are expected to use a graphing calculator (TI-84, TI-Nspire, etc.) to find r. For TI-84: enter x-values in L1 and y-values in L2, then press STAT > CALC > LinReg(ax+b). Make sure Diagnostics are ON (via the CATALOG) so that r and r² appear. The output includes the intercept a, slope b, r, and r².

在 IB 课程中,你需要使用图形计算器(TI-84、TI-Nspire 等)求 r。TI-84 步骤:将 x 值存入 L1,y 值存入 L2,然后按 STAT > CALC > LinReg(ax+b)。务必通过 CATALOG 将 Diagnostics 打开,以便显示 r 和 r²。输出结果包括截距 a、斜率 b、r 和 r²。

Always compare the sign of r with the scatter plot. If the plot shows an upward trend but r is negative, you may have swapped the data lists or entered data incorrectly. The GDC is a powerful tool, but critical thinking remains essential.

务必比对 r 的符号与散点图。若散点图呈上升趋势而 r 为负,可能是数据列表位置颠倒或输入有误。GDC 是高效工具,但批判性思维仍然不可或缺。


6. Scatter Plots and the Meaning of r | 散点图与 r 的意义

Pearson’s r measures how tightly the points cluster around a straight line. Before calculating r, you must always draw a scatter plot, because r can be misleading when the relationship is non-linear or influenced by outliers. For example, a perfect quadratic relationship will yield r ≈ 0, even though the variables are clearly related.

皮尔逊 r 衡量数据点围绕一条直线的紧密程度。计算 r 前,务必先绘制散点图,因为当关系是非线性或受异常值影响时,r 可能产生误导。例如,一个完美的二次关系可能会得出 r ≈ 0,尽管变量明显相关。

Anscombe’s quartet is a famous illustration: four data sets with identical r = 0.816 but completely different scatter plots (linear, curved, with an outlier, and with a single influential point). This underscores that r alone never tells the full story.

安斯库姆四重奏是一个著名示例:四个数据集具有相同的 r = 0.816,但散点图迥异(线性、曲线型、含异常值、含强影响点)。这说明仅凭 r 无法反映全貌。


7. Testing the Significance of r | r 的显著性检验

Even when r is non-zero, we need to determine whether it represents a genuine linear relationship in the population or arises by chance. The null hypothesis is H₀: ρ = 0 (no population correlation). The test statistic is t = r √(n − 2) / √(1 − r²), which follows a t-distribution with n − 2 degrees of freedom.

即使 r 非零,我们也需要判断它代表总体中真实的线性关系,还是仅为随机波动。原假设为 H₀: ρ = 0(总体无相关)。检验统计量 t = r √(n − 2) / √(1 − r²),服从自由度为 n − 2 的 t 分布。

If the calculated |t| exceeds the critical value from the t-table (or if the p-value is less than the significance level α), we reject H₀ and conclude that the linear correlation is statistically significant. Using the earlier example with n = 5, r = 0.853, we obtain t ≈ 2.83. The two-tailed critical value t₍₀.₀₂₅, ₃₎ = 3.182, so the result is not significant at the 5% level, likely due to the small sample size.

若计算出的 |t| 超过 t 分布临界值(或 p 值小于显著性水平 α),我们拒绝 H₀,认为线性相关具有统计显著性。以前面 n = 5、r = 0.853 为例,计算得 t ≈ 2.83。双尾临界值 t₍₀.₀₂₅, ₃₎ = 3.182,因此在 5% 显著性水平下不显著,这可能是样本量过小所致。


8. Coefficient of Determination r² | 判定系数 r²

The square of the correlation coefficient, r², is called the coefficient of determination. It explains the proportion of the variance in the dependent variable y that is accounted for by the linear model with the independent variable x. For instance, if r = 0.9, then r² = 0.81, meaning 81% of the variation in y can be explained by x.

相关系数的平方 r² 称为判定系数。它表示因变量 y 的方差中由自变量 x 的线性模型所解释的比例。例如,若 r = 0.9,则 r² = 0.81,意味着 y 的变异中有 81% 可由 x 解释。

r² is always between 0 and 1. A higher r² indicates a better fit of the linear model. Note that r² does not imply causality; it just quantifies how well the linear regression captures the data’s variability.

r² 始终介于 0 和 1 之间。r² 越高,线性模型拟合越好。注意,r² 并不暗示因果关系,它仅量化线性回归捕捉数据变异的程度。


9. Assumptions and Conditions for Pearson’s r | 皮尔逊相关系数的假设与条件

Pearson’s r relies on several assumptions. Violating them can make r unreliable or misleading.

皮尔逊 r 依赖若干假设。违反这些假设会使 r 不可靠或产生误导。

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading