← 返回资讯屏轩教育 · 行业资讯

Adding and multiplying all the data by a constant | 对全部数据加减乘除一个常数

2026-08-03 00:38 · 本文部分内容由AI辅助创作

📚 Adding and multiplying all the data by a constant | 对全部数据加减乘除一个常数

In statistics, we often transform a whole set of data by applying the same arithmetic operation to every value. The two most fundamental transformations are adding a constant to every data point and multiplying every data point by a constant. Understanding how these simple changes affect summary statistics such as the mean, median, spread and standard deviation is essential for data analysis, scaling, unit conversion and many IB examination questions.

在统计学中,我们经常通过对每个数值应用相同的算术运算来变换整个数据集。最基本的两种变换是对每个数据点加上一个常数和对每个数据点乘以一个常数。理解这些简单的改变如何影响均值、中位数、极差和标准差等汇总统计量,对于数据分析、缩放、单位换算以及许多 IB 考试题目都至关重要。

1. Data Transformation Basics | 数据变换基础

b (adding a constant) and y = a x (multiplying by a constant). These operations are reversible and preserve the order of the data when a > 0.

数据变换是将一个数学函数应用于数据集中每一个观测值的过程。如果原数据集为 X = {x₁, x₂, ..., xₙ},变换后产生新数据集 Y = {y₁, y₂, ..., yₙ},其中每个 yᵢ = f(xᵢ)。最简单的变换是线性的:y = x + b(加常数)和 y = a x(乘常数)。当 a > 0 时,这些运算是可逆的,并且保持数据的顺序。


2. Adding a Constant to All Data | 对所有数据加一个常数

Adding a constant b to every value in a dataset shifts all the data points by the same amount along the number line. This is equivalent to a translation of the entire distribution. The shape, spread and variability of the data remain completely unchanged; only the location changes. Adding a positive constant increases all values, while adding a negative constant (i.e. subtracting) decreases them.

对数据集中的每一个值加上一个常数 b,会将所有数据点在数轴上平移相同的量。这相当于整个分布的平移。数据的形状、离散度和变异性完全不变;只有位置发生改变。加一个正常数会增加所有值,而加一个负常数(即减去一个数)会减小所有值。


3. Impact on Mean, Median and Mode (Addition) | 对均值、中位数和众数的影响(加法)

All measures of central tendency increase by exactly the same constant b. If the original mean is x̄, the new mean becomes x̄ + b. The median and the mode shift by the same amount. This can be expressed formally as:

所有集中趋势的度量都恰好增加同一个常数 b。如果原均值为 x̄,新均值变为 x̄ + b。中位数和众数也平移相同的量。可以形式化地表示为:

Old mean + b    New median = Old median + b    New mode = Old mode + b

s up by b. The middle value in an ordered list simply moves along with all the other values, leaving the median' sition unaffected but its value changed by b. The most frequent value is likewise shifted.

原因在于给每个数据点加上 b 会使数据总和增加 n × b,因此平均值增加 b。有序列表中的中间值随所有其他值一起移动,中位数的位置不变但其值改变 b。最频繁出现的值也同样平移。


4. Worked Example: Adding a Constant | 举例:加常数

6 = 15, matching the ordered list. The mode, if it had existed, would also increase by 6.

考虑数据集:4, 7, 9, 12, 15。均值为 (4+7+9+12+15)/5 = 9.4。中位数为 9。如果我们给每个数加上 6,新数据集变为 10, 13, 15, 18, 21。新均值是 9.4 + 6 = 15.4,这也可以通过直接计算验证:(10+13+15+18+21)/5 = 77/5 = 15.4。新中位数为 9 + 6 = 15,与有序列表相符。如果存在众数,它也会增加 6。


5. Multiplying All Data by a Constant | 对所有数据乘一个常数

Multiplying every data point by a constant a (with a > 0) scales the entire dataset. This operation changes both the location and the spread of the data. If a > 1, the data are stretched apart; if 0 < a < 1, they are squeezed together. Multiplying by a negative constant would additionally reverse the order, but in IB we usually consider a > 0 for measures of spread, though absolute values are used for standard deviation.

对每个数据点乘以一个常数 a(a > 0)会缩放整个数据集。这个运算既改变数据的位置也改变其离散度。如果 a > 1,数据被拉宽;如果 0 < a < 1,数据被压缩。乘以一个负常数还会颠倒顺序,但在 IB 课程中我们通常考虑 a > 0 来衡量离散度,尽管标准差会用到绝对值。


6. Impact on Mean, Median and Mode (Multiplication) | 对均值、中位数和众数的影响(乘法)

mode are also multiplied by a. This holds for any constant a, positive or negative, as long as we interpret the median correctly when the order reverses (though a negative a is rarely tested without absolute values).

与加法类似,乘法以相同的因子 a 影响所有集中趋势度量。新均值变为 a ×(旧均值)。中位数和众数也乘以 a。这对任何常数 a(正或负)都成立,只要我们在顺序颠倒时正确理解中位数(尽管负的 a 很少在不带绝对值的情况下考查)。

a × Old mean    New median = a × Old median    New mode = a × Old mode


7. Impact on Range and Interquartile Range | 对极差和四分位距的影响

When a constant b is added to all data, the range and interquartile range (IQR) do not change, because the distances between ordered values remain identical. Adding b simply slides the entire distribution without altering the gaps between points.

当所有数据加上常数 b 时,极差和四分位距(IQR)不变,因为有序值之间的距离保持不变。加上 b 只是滑动整个分布,而不改变数据点之间的间隔。

Multiplying by a constant a, however, scales all distances by the factor |a|. The new range becomes |a| × old range, and the new IQR becomes |a| ence is multiplied by a. If a is negative, distances are multiplied by the absolute value.

然而,乘以常数 a 会以因子 |a| 缩放所有距离。新极差变为 |a| × 旧极差,新 IQR 变为 |a| × 旧 IQR。这是因为最大值和最小值(以及四分位数)都被乘以 a,因此它们的差被乘以 a。如果 a 为负,距离要乘以其绝对值。


8. Impact on Variance and Standard Deviation | 对方差和标准差的影响

Adding a constant b has no effect on variance or standard deviation. Since variance measures the average squared deviation from the mean, adding b changes both the mean and each data point by the same amount, so the deviations (x − x̄) stay exactly the same. Variance is unchanged, and so is the standard deviation.

加常数 b 对方差和标准差没有影响。由于方差度量的是与均值偏差平方的平均值,加上 b 使均值和每个数据点发生相同变化,因此偏差 (x − x̄) 完全不变。方差不变,标准差也不变。

Multiplying by a constant a, however, multiplies each deviation from the mean by a, so the squared deviations are multiplied by a². The variance is therefore multiplied by a². The standard deviation, being the square root of variance, is multiplied by |a|.

然而,乘以常数 a 会使每个与均值的偏差乘以 a,因此偏差的平方乘以 a²。方差因此乘以 a²。标准差作为方差的平方根,乘以 |a|。

New variance = a² × Old variance    New standard deviation = |a| × Old standard deviation


广告 / Sponsored

9. General Linear Transformation y = a x + b | 一般线性变换 y = a x + b

e summary statistics transform in predictable ways. The order of operations matters: multiplication is applied first, then addition. The formulas are:

当我们结合两种运算,对每个数据点进行形如 y = a x + b 的线性变换时,汇总统计量以可预测的方式变换。运算顺序很重要:先乘法后加法。公式如下:

New mean = a × (Old mean) + b

New median = a × (Old median) + b

New variance = a² × Old variance

New standard deviation = |a| × Old standard deviation

oes not affect spread. For range and IQR, the transformation y = a x + b gives new range = |a| × old range and new IQR = |a| × old IQR.

注意 b 的加法不出现在方差和标准差的公式中,这证实了位置的平移不影响离散度。对于极差和 IQR,变换 y = a x + b 给出新极差 = |a| × 旧极差,新 IQR = |a| × 旧 IQR。


10. Combined Transformations Example | 组合变换示例

, 3, 5, 7, 9. We transform each value by y = 3x − 4. First multiply by 3, then subtract 4.

原始数据集:2, 3, 5, 7, 9。我们用 y = 3x − 4 对每个值进行变换。先乘以 3,再减去 4。


11. Common Mistakes to Avoid | 要避免的常见错误

Many students forget that variance is multiplied by a², not by a, when data are scaled. Remember: standard deviation scales by |a|, so variance, being the square of standard deviation, must scale by a². Always use absolute value when the constant a could be negative, but variance uses a² which automatically handles the sign.

很多学生忘记当数据缩放时,方差乘以 a² 而不是 a。记住:标准差按 |a| 缩放,所以方差作为标准差的平方,必须按 a² 缩放。当常数 a 可能为负时,始终使用绝对值,但方差使用 a² 自动处理了符号。

Another common error is thinking that adding a constant changes the range or interquartile range. Addition simply shifts the data, so spread remains untouched. Only multiplication alters spread. Also, when calculating a new median after transformation, apply the same arithmetic operation to the old median instead of recalculating from the new dataset, which can save time in exams.

另一个常见错误是认为加常数会改变极差或四分位距。加法只是平移数据,因此离散度保持不变。只有乘法会改变离散度。另外,在变换后计算新中位数时,对旧中位数应用相同的算术运算即可,而无需从新数据集重新计算,这在考试中能节省时间。


12. Summary Table and Key Points | 总结表和关键点

The following table summarises the effect of adding a constant b and multiplying by a constant a on the main summary statistics. Assume a > 0 for simplicity; if a can be negative, use |a| for measures of spread.

下表总结了加常数 b 和乘常数 a 对主要汇总统计量的影响。为简化,假设 a > 0;若 a 可能为负,离散量度使用 |a|。

Statistic / 统计量 Adding b / 加 b Multiplying by a / 乘 a
Mean / 均值 + b × a
Median / 中位数 + b × a
Mode / 众数 + b × a
Range / 极差 Unchanged / 不变 × a
IQR / 四分位距 Unchanged / 不变 × a
Variance / 方差 Unchanged / 不变 × a²
Standard deviation / 标准差 Unchanged / 不变 × a

Mastering the effects of adding and multiplying by a constant builds a foundation for topics such as data coding, normal distribution standardisation, and correlation analysis. Always remember: addition shifts location, multiplication scales both location and spread, and the variance is affected by the square of the multiplier.

掌握加减乘除常数的影响,为数据编码、正态分布标准化和相关分析等主题奠定了基础。始终记住:加法平移位置,乘法缩放位置和离散度,而方差受乘数平方的影响。

Published by TutorHao | Mathematics Revision Series | aleveler.com

广告 / Sponsored
IBDP国际文凭计算机科学学生用书 高级及标准水平 Computer Science for the IB Diplo…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥524.0

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

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao