📚 Bivariate Statistics | 双变量统计
In IB Statistics, bivariate analysis focuses on the relationship between two quantitative variables measured on the same individuals. Whether you are exploring how study time relates to exam scores, or how temperature affects ice cream sales, bivariate statistics provides the tools to measure and model these associations. Key topics include scatter plots, Pearson's and Spearman's correlation coefficients, least-squares regression lines, and the interpretation of residuals. Mastery of these concepts is essential for the internal assessment and Paper 2, where you are often required to analyse real data, draw conclusions, and evaluate the limitations of your model.
在 IB 统计中,双变量分析关注的是对同个体测量的两个定量变量之间的关系。无论是研究学习时间与考试成绩的关系,还是气温如何影响冰淇淋销量,双变量统计都提供了测量和建模这些关联的工具。核心主题包括散点图、皮尔逊相关系数和斯皮尔曼秩相关系数、最小二乘回归线以及残差的解释。掌握这些概念对于内部评估和试卷二至关重要,在这两个部分你经常需要分析真实数据、得出结论并评估模型的局限性。
1. Introduction to Bivariate Data | 双变量数据简介
Bivariate data consists of ordered pairs (x, y) where each pair represents two different attributes of the same subject. For instance, if you record the height (x) and arm span (y) of ten students, the data point (162 cm, 160 cm) forms one bivariate observation. The aim is to discover whether a change in x is associated with a change in y, and if so, to describe the nature, strength, and direction of that relationship.
双变量数据由有序对 (x, y) 组成,每一对代表同一个主体的两个不同特征。例如,你若记录了十名学生的身高 (x) 和臂展 (y),那么数据点 (162 cm, 160 cm) 就构成了一个双变量观测值。目的是探究 x 的变化是否与 y 的变化有关联,如果有关联,则描述这种关系的性质、强度和方向。
The explanatory variable (x, independent variable) is the one used to predict or explain the response variable (y, dependent variable). In a study linking hours of revision and test marks, revision hours would be x and test marks y. Identifying the roles correctly is crucial when setting up regression models.
解释变量(x,自变量)是用来预测或解释响应变量(y,因变量)的变量。在一项联系复习小时数与考试成绩的研究中,复习小时数应作为 x,考试成绩作为 y。在建立回归模型时,正确识别各变量的角色至关重要。
2. Scatter Plots and Visualising Relationships | 散点图与关系可视化
Before calculating any numerical summary, you should always draw a scatter plot. Each point represents one (x, y) pair. The pattern of points reveals the form (linear or non-linear), direction (positive or negative), and approximate strength of the relationship, as well as the presence of outliers or clusters. A scatter plot tells you whether a linear model is appropriate.
在计算任何数值摘要之前,你都应该先绘制散点图。每个点代表一个 (x, y) 数据对。点的分布形态会揭示关系的形式(线性或非线性)、方向(正或负)、大致强度以及是否存在异常值或聚类。散点图可以告诉你线性模型是否适合。
A positive association means that as x increases, y tends to increase, producing an upward slope. A negative association shows a downward slope: as x increases, y tends to decrease. If points are tightly clustered around an imaginary straight line, the relationship is strong; if they are widely scattered, it is weak. The absence of any systematic pattern suggests no correlation.
正相关意味着随着 x 增加,y 也趋于增加,呈现出向上的斜率。负相关则显示出向下的斜率:随着 x 增加,y 趋于减小。如果各点紧密聚集在一条假想直线周围,说明关系很强;如果点广泛分散,则说明关系很弱。若缺乏任何系统性的模式,则表明不存在相关关系。
3. Pearson's Correlation Coefficient (r) | 皮尔逊相关系数 (r)
Pearson' indicates a perfect negative linear correlation; and r = 0 implies no linear correlation.
皮尔逊积矩相关系数,记作 r,是度量两个变量之间线性关系强度和方向的数值指标。它的取值范围总是在 −1 到 1 之间:r = 1 表示完全正线性相关;r = −1 表示完全负线性相关;r = 0 表示不存在线性相关。
The mathematical definition of r uses standardised scores:
r = Σ (xi − x̄)(yi − ȳ) / (n−1) sx sy
where x̄ and ȳ are the sample means, sx and sy are the sample standard deviations, and n is the number of pairs. Equivalently, using sums of squares:
r = Sxy / √Sxx · Syy
其中 Sxx = Σ (xi − x̄)2, Syy = Σ (yi − ȳ)2, Sxy = Σ (xi − x̄)(yi − ȳ)。
Pearson's r is not robust to outliers and only captures linear relationships. A low r value does not necessarily mean there is no association; the variables could have a strong non-linear pattern (e.g. quadratic) that r would fail to detect.
皮尔逊 r 对异常值不稳健,且只能捕捉线性关系。较低的 r 值并不一定意味着没有关联;变量之间可能存在很强的非线性模式(例如二次关系),而 r 将无法检测到。
4. Computing r and Covariance | 计算 r 与协方差
The numerator in the formula for r, Sxy/(n−1), is the sample covariance, often denoted cov(x, y). Covariance indicates the direction of a linear relationship: positive covariance suggests that x and y move together, while negative covariance suggests they move in opposite directions. However, covariance alone does not tell you about strength because it depends on the units of measurement.
公式中 r 的分子 Sxy/(n−1) 是样本协方差,常记作 cov(x, y)。协方差表示了线性关系的方向:正协方差意味着 x 和 y 同向变化,负协方差则意味着它们反向变化。但仅靠协方差无法说明关系的强度,因为它依赖于测量单位。
Dividing by the product of the standard deviations standardises the covariance, yielding r, a dimensionless quantity. Manual calculation usually follows this recipe: compute x̄ and ȳ, find deviations (x − x̄) and (y − ȳ), square and cross-multiply, sum to obtain Sxx, Syy and Sxy, then apply r = Sxy / √Sxx Syy.
除以标准差的乘积可以将协方差标准化,从而得到无量纲量 r。手工计算通常按以下步骤进行:计算 x̄ 和 ȳ,求离差 (x − x̄) 和 (y − ȳ),平方并交叉相乘,求和得到 Sxx、Syy 和 Sxy,然后代入 r = Sxy / √Sxx Syy。
Modern exams assume you will use the GDC or statistical software to find r directly, but the formula helps you understand what r measures and why it is sensitive to linearity.
现代考试假设你将使用图形计算器或统计软件直接求得 r,但公式有助于你理解 r 测量的是什么,以及为什么它对线性度敏感。
5. Interpreting Correlation | 相关性解释
Interpretation goes beyond quoting a number. You should describe correlation in context using terms such as 'strong positive linear correlation' or 'moderate negative linear correlation'. A commonly used guideline for |r| is:
解释不能仅止于报出一个数字。你应该在具体情境中描述相关性,使用诸如“强正线性相关”或“中等负线性相关”等表述。常用的 |r| 指导值如下表:
| |r| | Strength / 强度 |
|---|---|
| 0.00 – 0.25 | Very weak / 极弱 |
| 0.25 – 0.50 | Weak to moderate / 弱到中等 |
| 0.50 – 0.75 | Moderate to strong / 中等到强 |
| 0.75 – 1.00 | Strong to very strong / 强到非常强 |
e considered meaningful, while in precise physics experiments, only r > 0.99 may be acceptable. Crucially, correlation does not imply causation. A high correlation between ice cream sales and drowning incidents does not mean ice cream causes drowning; both are driven by a lurking variable (hot weather).
这些截断值与情境有关。在社会科学中,r = 0.4 可能被认为是有意义的,而在精密的物理实验中,可能只有 r > 0.99 才可接受。至关重要的是,相关并不意味着因果。冰淇淋销量与溺水事件之间的高相关性并不意味着冰淇淋会导致溺水;两者都是由一个潜伏变量(炎热的天气)所驱动。
6. Spearman's Rank Correlation Coefficient | 斯皮尔曼秩相关系数
When the data do not meet the assumptions of Pearson's r (non-linear monotonic relationship, ordinal data, or presence of outliers), the Spearman's rank correlation coefficient, rs, provides a non-parametric alternative. It assesses how well a monotonic function describes the relationship, ranking each variable before computing a correlation on the ranks.
当数据不满足皮尔逊 r 的假设(非线性单调关系、有序数据或存在异常值)时,斯皮尔曼秩相关系数 rs 提供了一种非参数替代方法。它评估单调函数描述关系的良好程度,先对每个变量进行排序,然后在秩序列上计算相关性。
The formula uses the differences between paired ranks di = rank(xi) − rank(yi):
rs = 1 − (6 Σ di2) / (n(n2 − 1))
Like r, rs ranges from −1 (perfect negative monotonic association) to +1 (perfect positive monotonic association). Since ranks reduce the impact of extreme values, rs is more robust to outliers than r. However, when the data are truly linear without outliers, r is more powerful.
与 r 一样,rs 的取值范围是从 −1(完全负单调关联)到 +1(完全正单调关联)。由于秩次减小了极端值的影响,与 r 相比,rs 对异常值更为稳健。但如果数据确实是线性且无异常值,那么 r 的功效更强。
7. Linear Regression and Least Squares | 线性回归与最小二乘法
If a scatter plot suggests a linear trend, we can model the relationship with a straight line. The least-squares regression line is the unique line that minimises the sum of squared vertical distances (residuals) from the data points to the line. This gives the 'best-fitting' line in the sense of minimising the total prediction error.
如果散点图显示出线性趋势,我们就可以用一条直线来为这种关系建模。最小二乘回归线是使各数据点到该直线的竖直距离(残差)的平方和达到最小的那条唯一直线。这给出了在最小化总预测误差意义上“最佳拟合”的直线。
he intercept a gives the predicted value of y when x = 0. The line equation is written as:
y = a + b x
where the slope b and intercept a are calculated from the data:
b = r (sy / sx) = Sxy / Sxx
a = ȳ − b x̄
Always check that the line passes through the centroid (x̄, ȳ). In an IB exam you are expected to find a and b using the GDC, but you may be asked to write the equation with the correct variable names, not just x and y.
始终记得检查该直线是否通过质心 (x̄, ȳ)。在 IB 考试中,你需要使用图形计算器求出 a 和 b,但也可能被要求用正确的变量名称(而不只是 x 和 y)写出方程。
8. Interpreting Slope and Intercept | 解释斜率与截距
he slope 0.8 means: for each additional hour of study, the exam score is predicted to increase by 0.8 marks, on average. The intercept 15 corresponds to the predicted score for a student who studies 0 hours, provided 0 hours is within the range of the data; otherwise the intercept may have no practical meaning.
解释必须结合具体情境。如果你有回归方程 exam_score = 15 + 0.8 × study_hours,那么斜率 0.8 就意味着:每增加一个小时的复习,考试成绩预计平均提高 0.8 分。截距 15 对应的是复习时间为 0 小时的学生的预测分数,前提是 0 小时处于数据范围之内;否则截距可能没有实际意义。
ariability in y that can be explained by x. For example, if r = 0.9, then R² = 0.81, so 81 % sponse variable is accounted for by the linear relationship with the explanatory variable.
决定系数 R²(在简单线性回归中即相关系数的平方)表示由 x 所解释的 y 的变异性比例。例如,若 r = 0.9,则 R² = 0.81,因此响应变量 81 % 的变异可由与解释变量的线性关系来解释。
9. Predictions, Interpolation and Extrapolation | 预测、内插与外推
Using the regression line to estimate y for an x-value within the original data range is called interpolation. This is generally reliable, provided the linear model is appropriate. For example, predicting the exam score for 5 hours of study when the data range includes 2 to 8 hours is interpolation.
利用回归线在原始数据范围内对某个 x 值对应的 y 进行估计,称为内插。只要线性模型是合适的,这种做法通常是可靠的。例如,在数据范围包含 2 至 8 小时的情况下,预测学习 5 小时的考试成绩就是内插。
Extrapolation is estimating beyond the range of the observed data. It is dangerous because the linear trend may not continue outside the observed domain. Predicting exam scores for 20 hours of study when the maximum observed is 8 hours assumes the same rate of improvement, which may be unrealistic. Always comment on the risks of extrapolation in your analysis.
外推是指在观测数据范围之外进行估计。这种做法很危险,因为线性趋势在观测范围之外可能并不延续。当最大观测值为 8 小时,却要去预测学习 20 小时的考试成绩,这就假定了相同的提高速率,而这种假定可能是不切实际的。在你的分析中,请始终评论外推的风险。
10. Residuals and Model Assessment | 残差与模型评估
e between an observed y-value and the value predicted by the regression line: residual = yobs − ypred. The least-squares line is built so that the residuals sum to zero. Examining residuals helps diagnose whether a linear model is suitable.
残差是指观测 y 值与回归线预测值之间的差:residual = yobs − ypred。最小二乘线的构建使得残差之和为零。检查残差有助于判断线性模型是否合适。
A residual plot graphs residuals against the explanatory variable x or fitted values. If the linear model is appropriate, residuals should be randomly scattered around zero with no obvious pattern. A curved pattern suggests the relationship is non-linear and a linear model is not adequate. A funnel shape (increasing or decreasing spread) indicates non-constant variance (heteroscedasticity), which violates the assumptions of the regression model.
残差图是将残差对解释变量 x 或拟合值作图。如果线性模型合适,残差应当随机地散布在零附近,没有明显的模式。弧形的模式表明关系是非线性的,线性模型不够充分。漏斗形状(散布逐渐增宽或收窄)则表示方差不齐(异方差性),这违反了回归模型的假设。
Outliers and influential points can strongly affect the regression line and the correlation coefficient. A single extreme point may pull the line towards itself, altering both slope and intercept. Always investigate such points before relying on the model.
异常值和影响点会强烈地影响回归线和相关系数。单单一极值点就可能将直线拉向自身,从而改变斜率和截距。在依赖模型之前,请始终对此类点进行调查。
11. Using Technology (GDC) for Bivariate Analysis | 使用技术(图形计算器)进行双变量分析
For the IB Statistics course, competence with a graphical display calculator (GDC) is essential. You need to enter bivariate data into lists, produce a scatter plot, calculate Pearson's r and Spearman's rs, obtain the coefficients a and b of the least-squares regression line, and store the equation for graphing. Each GDC model varies slightly, but the core steps are: enter x-values in List 1 and y-values in List 2, set up a scatter plot with List 1 vs List 2, run 'LinReg' (or 'Linear Regression') to display a, b, and r. You can then copy the equation into the graph function to overlay the line.
在 IB 统计课程中,熟练使用图形计算器 (GDC) 至关重要。你需要将双变量数据输入列表,生成散点图,计算皮尔逊 r 和斯皮尔曼 rs,求出最小二乘回归线的系数 a 和 b,并储存方程以供绘图。虽然不同型号的图形计算器略有差异,但核心步骤为:在 List 1 中输入 x 值,在 List 2 中输入 y
Published by TutorHao | IB 统计 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图