Bivariate Statistics: Correlation and Regression | 双变量统计:相关与回归

📚 Bivariate Statistics: Correlation and Regression | 双变量统计:相关与回归

Bivariate statistics focuses on analysing the relationship between two variables measured on the same subjects. It involves graphical displays like scatter plots, measures of association such as Pearson’s and Spearman’s correlation coefficients, and modelling techniques including least squares regression. Mastering these tools allows you to explore whether and how one variable might predict or explain another, a fundamental skill in the IB Statistics syllabus.

双变量统计侧重于分析同一组个体上测量的两个变量之间的关系。它涉及散点图等图形展示、皮尔逊和斯皮尔曼相关系数等关联度量,以及包括最小二乘回归在内的建模技术。掌握这些工具能让你探究一个变量是否可以预测或解释另一个变量,以及如何预测,这是IB统计课程大纲中的一项核心技能。


1. Introduction to Bivariate Data | 双变量数据简介

Bivariate data consist of paired observations (x, y) collected from the same population or experimental units. Common examples include height and weight, study hours and exam scores, or temperature and ice cream sales. The aim is to detect patterns, quantify the strength of any relationship, and, if appropriate, model the dependence of y on x.

双变量数据由来自同一种群或实验单元的成对观测值 (x, y) 组成。常见的例子包括身高与体重、学习时间与考试成绩、或温度与冰淇淋销量。其目标是发现规律,量化任何关系的强度,并在合适的情况下建立 y 对 x 的依赖模型。


2. Scatter Plots and Association | 散点图与关联性

A scatter plot displays bivariate data as points in a coordinate plane, with the independent (explanatory) variable usually on the x‑axis and the dependent (response) variable on the y‑axis. It reveals the direction (positive or negative), form (linear or curved), and strength (strong or weak) of any association. Outliers become readily visible in such plots.

散点图将双变量数据以坐标系中的点呈现,通常自变量(解释变量)在 x 轴上、因变量(响应变量)在 y 轴上。它揭示了关联的方向(正或负)、形状(线性或曲线)和强度(强或弱)。异常值在此类图中很容易被发现。

A positive association means that as x increases, y tends to increase; a negative association means that as x increases, y tends to decrease. If the points follow no clear upward or downward trend, there is likely no association. The description of association should always be stated in the context of the data.

正向关联意味着随着 x 增大,y 趋于增大;负向关联意味着随着 x 增大,y 趋于减小。如果点的分布没有明显的上升或下降趋势,则很可能没有关联。对关联的描述必须始终结合数据的背景。


3. Pearson’s Correlation Coefficient | 皮尔逊相关系数

Pearson’s product‑moment correlation coefficient, denoted r, measures the strength and direction of a linear relationship between two quantitative variables. It is calculated by standardising the covariance: r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² Σ(yᵢ − ȳ)²]. The value of r is always between –1 and 1 inclusive.

皮尔逊积矩相关系数,记为 r,用于衡量两个定量变量之间线性关系的强度和方向。它通过对协方差进行标准化来计算:r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² Σ(yᵢ − ȳ)²]。r 的值始终在 –1 到 1 之间(含端点)。

If r = 1, there is a perfect positive linear correlation; if r = –1, the correlation is perfectly negative. A value of 0 indicates no linear correlation. In practice, r is almost never exactly 0, 1, or –1; it provides a gauge of how tightly the points cluster around a straight line.

若 r = 1,则存在完全正线性相关;若 r = –1,则为完全负线性相关。值为 0 表示没有线性相关。在实践中,r 几乎不会恰好为 0、1 或 –1;它提供了一个衡量数据点围绕一条直线聚集紧密程度的标尺。


4. Interpreting Correlation Values | 解读相关系数值

The following table summarizes the conventional verbal descriptors that many IB examiners expect when interpreting |r| (the absolute value of r). Always remember that a “strong” correlation still does not imply causation.

下表总结了在解读 |r| (r 的绝对值)时许多IB考官期望使用的常规文字描述。请始终记住,“强”相关仍然不意味着因果关系。

|r| range |r| 范围 Description 描述
0.8 ≤ |r| ≤ 1 0.8 ≤ |r| ≤ 1 Very strong 非常强
0.6 ≤ |r| < 0.8 0.6 ≤ |r| < 0.8 Strong 强
0.4 ≤ |r| < 0.6 0.4 ≤ |r| < 0.6 Moderate 中等
0.2 ≤ |r| < 0.4 0.2 ≤ |r| < 0.4 Weak 弱
0 ≤ |r| < 0.2 0 ≤ |r| < 0.2 Very weak or none 非常弱或无

Caution: r measures only linear relationships. A scatter plot with a perfect quadratic pattern could give r ≈ 0 even though the variables are strongly related in a non‑linear way. Always plot the data first.

注意:r 仅衡量线性关系。一幅具有完美二次函数关系的散点图可能得出 r ≈ 0,尽管变量之间以非线性形式紧密相关。务必先绘制数据图。


5. The Line of Best Fit and Least Squares Regression | 最佳拟合线与最小二乘回归

When a scatter plot suggests a roughly linear trend, we can model the relationship using a regression line, often called the line of best fit. The least squares method finds the line that minimises the sum of the squared vertical distances (residuals) from the points to the line.

当散点图呈现出大致线性的趋势时,我们可以使用回归线(通常称为最佳拟合线)来建模这种关系。最小二乘法找到使各点到直线的垂直距离(残差)平方和最小的那条直线。

The least squares regression line of y on x is written as ŷ = a + b x, where b is the slope and a is the y‑intercept. Using the summary statistics, b = r (s_y / s_x) and a = ȳ − b x̄. These formulas show that the slope is a scaled version of the correlation coefficient.

y 对 x 的最小二乘回归线写作 ŷ = a + b x,其中 b 是斜率,a 是 y 截距。使用汇总统计量,b = r (s_y / s_x),a = ȳ − b x̄。这些公式表明,斜率是相关系数的按尺度缩放版本。


6. Equation of the Regression Line | 回归线方程

In IB examinations you are often required to find the equation of the regression line either from raw data using a graphing calculator or from given summary values. For a dataset with x̄ = 54.2, ȳ = 78.4, s_x = 11.5, s_y = 9.8, and r = 0.872, the slope is b = 0.872 × (9.8 / 11.5) ≈ 0.743, and the intercept is a = 78.4 − 0.743 × 54.2 ≈ 38.1, giving ŷ = 38.1 + 0.743 x.

在 IB 考试中,你通常需要根据原始数据使用图形计算器,或根据给定的汇总值,求出回归线方程。对于如下的数据集:x̄ = 54.2,ȳ = 78.4,s_x = 11.5,s_y = 9.8,r = 0.872,斜率 b = 0.872 × (9.8 / 11.5) ≈ 0.743,截距 a = 78.4 − 0.743 × 54.2 ≈ 38.1,从而得到 ŷ = 38.1 + 0.743 x。

Always write the final equation with the context variables, for example “exam score = 38.1 + 0.743 × (study hours)”. The slope indicates the predicted change in the response variable for each one‑unit increase in the explanatory variable.

最终方程必须使用上下文变量来书写,例如“考试成绩 = 38.1 + 0.743 × (学习小时数)”。斜率表示解释变量每增加一个单位,响应变量预测值的变化量。


7. Making Predictions and Interpolation vs Extrapolation | 预测与内插和外推

Once a regression line is obtained, we can use it to predict y for a given x. Interpolation refers to predictions within the range of the original x‑values; these are generally reliable provided the model is a good fit. Extrapolation means predicting outside that range, which can be highly unreliable because the linear relationship may not hold beyond the observed data.

一旦获得回归线,我们就可以用它为给定的 x 预测 y。内插是指在原始 x 值范围内进行的预测;如果模型拟合良好,这些预测通常是可靠的。外推则指在该范围外进行预测,这可能极不可靠,因为线性关系在观测数据之外可能不再成立。

For example, if a model relating tree height (y) to trunk diameter (x) was developed from trees with diameters between 10 cm and 30 cm, predicting the height for a diameter of 50 cm would be extrapolation. IB exam questions frequently test the awareness that extrapolation should be avoided or commented on with caution.

例如,如果一个将树高(y)与树干直径(x)关联起来的模型是由直径在10厘米到30厘米之间的树木建立的,那么预测直径为50厘米时的树高就属于外推。IB考试题经常考查学生是否意识到应避免外推或需谨慎评论。


8. Residuals and Residual Plots | 残差与残差图

A residual is the difference between an observed y‑value and its corresponding predicted value: e = y − ŷ. Residuals tell us how far off our predictions are for each data point. A residual plot graphs the residuals on the y‑axis against the fitted values (or the x‑values) on the x‑axis.

残差是观测 y 值与其对应预测值之间的差值:e = y − ŷ。残差告诉我们每个数据点的预测偏差有多大。残差图是以预测值(或 x 值)为 x 轴、残差为 y 轴绘制的图形。

For a linear model to be appropriate, the residual plot should show no obvious pattern; the points should be roughly randomly scattered around the horizontal line at zero, with constant spread. A curved pattern suggests the relationship may be non‑linear, while a fan shape indicates non‑constant variance.

为使线性模型合适,残差图不应呈现明显规律;点应大致随机地分散在零水平线周围,且分散程度恒定。弯曲的形态暗示关系可能是非线性的,而喇叭形状则表明方差不恒定。


9. Coefficient of Determination (R²) | 判定系数 R²

The coefficient of determination, R², measures the proportion of the total variation in the response variable y that is explained by the regression on x. In simple linear regression, R² is simply the square of the Pearson correlation coefficient: R² = r².

判定系数 R² 衡量的是响应变量 y 的总变异中能被对 x 的回归所解释的比例。在简单线性回归中,R² 就是皮尔逊相关系数的平方:R² = r²。

If r = 0.9, then R² = 0.81, meaning 81% of the variation in y can be accounted for by the linear relationship with x. The remaining 19% is due to other factors or random variation. R² is widely used to assess the goodness of fit of the model.

若 r = 0.9,则 R² = 0.81,意味着 y 变异的 81% 可由与 x 的线性关系来解释。剩余 19% 则归因于其他因素或随机变异。R² 被广泛用于评估模型的拟合优度。


10. Spearman’s Rank Correlation Coefficient | 斯皮尔曼等级相关系数

When data are ordinal or when the relationship is monotonic but not necessarily linear, Spearman’s rank correlation coefficient, denoted by ρ (rho) or rₛ, provides a non‑parametric alternative. It is calculated by applying Pearson’s formula to the ranks of the data rather than the raw values.

当数据是顺序型数据,或关系是单调但未必线性时,斯皮尔曼等级相关系数(用 ρ 或 rₛ 表示)提供了一种非参数替代方案。它通过将皮尔逊公式应用于数据的秩次而非原始值来计算。

The simplified formula when there are no tied ranks is ρ = 1 − (6 Σ dᵢ²) / (n (n² − 1)), where dᵢ is the difference between the ranks of each pair. ρ ranges from –1 to +1 and is interpreted similarly to r, but it measures the strength of a monotonic association.

当没有相同秩次时,简化公式为 ρ = 1 − (6 Σ dᵢ²) / (n (n² − 1)),其中 dᵢ 是每对观测值秩次之差。ρ 的取值范围从 –1 到 +1,其解读方式与 r 类似,但它衡量的是单调关联的强度。

Spearman’s correlation is less sensitive to outliers and can tell a different story when data contain extreme values. In an IB exam, you may be asked to calculate ρ from a small table of ranks and to comment on why Spearman’s was chosen over Pearson’s.

斯皮尔曼相关对异常值较不敏感,当数据包含极端值时,它可能揭示不同的结论。在 IB 考试中,你可能需要根据一张小型的秩次表计算 ρ,并说明为何选择斯皮尔曼相关而非皮尔逊相关。


11. Assumptions and Limitations | 假设与局限性

Both Pearson’s r and least squares regression rely on several assumptions: the relationship is linear, the observations are independent, the residuals are normally distributed with constant variance, and the data are free of outliers that could distort the results. Violating these assumptions can lead to misleading conclusions.

皮尔逊 r 和最小二乘回归都依赖于若干假设:关系是线性的,观测值是独立的,残差服从正态分布且具有恒定方差,数据不包含可能扭曲结果的异常值。违背这些假设可能导致误导性结论。

Furthermore, correlation does not imply causation. A high correlation between ice cream sales and drowning incidents does not mean ice cream causes drowning; a lurking variable, such as hot weather, influences both. Always consider the context and potential confounding factors.

此外,相关不意味着因果。冰淇淋销量与溺水事件之间的高相关性并不意味着冰淇淋导致溺水;可能有一个潜藏变量,例如炎热的天气,同时影响了两者。始终要考虑背景及潜在的混杂因素。


12. Summary and Key Connections | 总结与关键联系

  • Visualise first: Always start with a scatter plot. | 先可视化:始终从散点图开始。
  • Measure: Use r for linear strength, ρ for monotonic strength, and R² for explained variation. | 度量:用 r 度量线性强度,用 ρ 度量单调强度,用 R² 度量已解释的变异。
  • Model: The least squares line ŷ = a + b x gives the best linear predictor for the data range. | 建模:最小二乘直线 ŷ = a + b x 在数据范围内提供了最佳线性预测值。
  • Check: Residual plots and R² help validate whether the linear model is appropriate. | 检验:残差图和 R² 有助于验证线性模型是否恰当。
  • Context: Always interpret r, R², slope, and predictions within the problem’s real‑world setting. | 背景:始终在问题的现实背景中解读 r、R²、斜率和预测值。

These concepts form the core of bivariate statistics in the IB curriculum. Practising with varied datasets and being able to move fluently between visual, numerical, and verbal descriptions will prepare you well for the examination.

这些概念构成了 IB 课程中双变量统计的核心。通过练习不同的数据集,并能熟练地在图形、数字和文字描述之间转换,将为你的考试做好充分准备。

Published by TutorHao | Statistics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

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