总结四种平均数

Last Updated: 2024-01-31 11:41:13 Wednesday

-- TOC --

本文汇总了四种常见平均数的基本常识。它们有如下关系:

\(H\le G\le M\le RMS\)

算术平均数(M)

算术平均数,Arithmetic Mean,是最常见也是最好理解的平均数,又称均值,是统计学中最基本,最常用的一种平均指标,分为简单算术平均数加权算术平均数

简单算术平均数公式:

\(M=\cfrac{\sum\limits_{i=1}^n X_i}{n}\)

加权算术平均数公式:

\(M=\sum\limits_{i=1}^n X_i\cdot f_i,\ \sum\limits_{i=1}^n f_i=1\)

简单算术平均数可看做各数值权重全部相同的一种特殊情况的加权平均数。加权算数平均数常用于计算离散随机变量的期望值。

算术平均数的特点:

算术平均数虽然是一种常用的统计量,但也存在一些缺点:

几何平均数(G)

几何平均数,Geometric Mean,是一组数值的连乘积的n次根,其中n是数值的个数。换句话说,几何平均数是将一组数值相乘,然后取乘积的n次根作为结果。

几何平均数的计算公式:

\(G=\sqrt[n]{\prod\limits_{i=1}^n X_i}\)

算术平均数是加起来除以数量,几何平均数是乘起来按开数量的根号...

由此计算公式可以看出,几何平均数具有非负性!如果数据中存在负数或零,也不适合应用几何平均数。

Logarithmic property: One important characteristic of the geometric mean is its relationship to logarithms. Taking the logarithm of each data point and then calculating the arithmetic mean of the logarithms is equivalent to calculating the geometric mean of the original data, and then take logarithm. This property can be useful when dealing with multiplicative relationships, as taking the logarithm can transform them into additive relationships.

这段话可以用下面的表达式来说明,

\(\cfrac{\log{a}+\log{b}}{2}=\cfrac{1}{2}\log{ab}=\log{\sqrt[2]{ab}}\)

Stability under scaling: The geometric mean is scale-invariant, meaning that multiplying all the data points by a constant will result in the same geometric mean. This property makes the geometric mean useful for comparing data sets with different scales or units of measurement.

我们也可以用一个数学表达式来说明stability under scaling这个性质:

\(\sqrt[2]{2a\cdot 2b}=2\cdot\sqrt[2]{ab}\)

The geometric mean is commonly used in various fields to calculate average ratios or proportions. It is employed in areas such as demographic analysis, index numbers, production efficiency ratios, and price-earnings ratios in finance.

几何平均数常用来计算平均比例,例如在金融投资领域,用来表达CAGR。

SPEC benchmark最后给出的结果,就是一个几何平均数,因为这个值不会因为更换reference而改变。(更换reference,只是简单的多出来一个系数需要按需求调整,这就是用到了stability under scaling这个性质)

另一个几何平均数有关的绝对不等式如下:

\(\cfrac{x+y}{2}\ge\sqrt{xy},\ x\ge0,\ y\ge0\)

这个绝对不等式的推导,就是从绝对不等式\((a-b)^2\ge0\)开始。

调和平均数(H)

调和平均数,Harmonic Mean,是一组数值的倒数的算术平均数的倒数。

调和平均数的计算公式如下:

\(H=\cfrac{n}{\sum\limits_{i=1}^n \cfrac{1}{X_i}}\)

调和平均数受极端值影响较小,因为极大的倒数较接近于零,对调和平均数的影响减弱。调和平均数要求参与计算的数字不能为0。

调和平均数的应用场景:

平方平均数(RMS)

平方平均数,Root Mean Square,缩写为RMS,是一组数值的平方和的平均数的平方根。

RMS的计算公式:

\(RMS=\sqrt[2]{\cfrac{\sum\limits_{i=1}^n X_i^2}{n}}\)

从计算公式可以看出,平方平均数不可能是负数,即使参与计算的数字有负数,并且允许0的存在。

平方平均数常用于处理与振幅、能量、方差相关的数据,它具有以下特点和应用场景:

特点:

应用场景:

本文链接:https://cs.pynote.net/math/202308162/

-- EOF --

-- MORE --