Command Palette
Search for a command to run...
Harmonic Mean
Date
Harmonic meanIt is a method of calculating the average, which is divided into two forms: simple and weighted. The weighted harmonic mean is a variation of the weighted arithmetic mean. In most cases, we only know the sum of the values of a certain sign in each group, m, but lack information about the total number of units f. Therefore, we cannot directly use the weighted arithmetic mean method to calculate, but use the weighted harmonic mean.
The formula for calculating the weighted arithmetic mean is:
latex {A\text{ }=\text{ }\frac{{{ \sum {x\mathop{{}}\nolimits\_{{i}}f\mathop{{}}\nolimits\_{{i}}}}}}{{{ \sum {f\mathop{{}}\nolimits\_{{i}}}}}}} \Leftrightarrow \frac{{1}}{{\frac{{{ \sum {f\mathop{{}}\nolimits\_{{i}}}}}}{{{ \sum {x\mathop{{}}\nolimits\_{{i}}f\mathop{{}}\nolimits\_{{i}}}}}}}}\mathop{{ \Longleftrightarrow }}\limits^{{\text{Set}\text{ }m\mathop{{}}\nolimits\_{{i}}=x\mathop{{}}\nolimits\_{{i}}f\mathop{{}}\nolimits\_{{i}}}}\frac{{1}}{{{\frac{{{ \sum {\frac{{m\mathop{{}}\nolimits\_{{i}}}}{{x\mathop{{}}\nolimits\_{{i}}}}}}}}{{{ \sum {m\mathop{{}}\nolimits\_{{i}}}}}}}}}\Leftrightarrow \frac{{{ \sum {m\mathop{{}}\nolimits\_{{i}}}}}}{{{ \sum {\frac{{m\mathop{{}}\nolimits\_{{i}}}}{{x\mathop{{}}\nolimits\_{{i}}}}}}}}\text{ }=\text{ }H}
That is, the weighted harmonic mean formula is:
latexH = ∑_i=1nx_im_i∑_i=1nm_i
When latexm_i = 1, the formula degenerates into the simple harmonic mean formula:
latex {H\text{ }=\text{ }\frac{{n}}{{{\mathop{ \sum }\nolimits\_{{i=1}}^{{n}}{\frac{{1}}{{x\mathop{{}}\nolimits\_{{i}}}}}}}}\text{ }=\text{
That is, take the arithmetic mean of the reciprocals of n data and then take the reciprocal.
References
【1】Arithmetic mean, geometric mean, harmonic mean, square mean and moving average
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.