HarmonicMean

HarmonicMean[list]

gives the harmonic mean of the values in list.

Details

  • For the list {x1,x2,,xn}, the harmonic mean is given by .
  • HarmonicMean handles both numerical and symbolic data.
  • HarmonicMean[{{x1,y1,},{x2,y2,},}] gives {HarmonicMean[{x1,x2,}],HarmonicMean[{y1,y2,}]}.

Examples

open allclose all

Basic Examples  (2)

Harmonic mean of symbolic values:

Harmonic mean of columns of a matrix:

Scope  (9)

Exact input yields exact output:

Approximate input yields approximate output:

HarmonicMean for a matrix gives columnwise means:

Works with large arrays:

SparseArray data can be used just like dense arrays:

Find the harmonic mean of WeightedData:

Find the harmonic mean of EventData:

Find the harmonic mean of a TimeSeries:

Find the harmonic mean of data involving quantities:

Generalizations & Extensions  (1)

Compute results for a SparseArray:

Applications  (1)

Find the harmonic mean for the heights of children in a class:

Properties & Relations  (4)

HarmonicMean is the inverse of Mean of the inverse of the data:

HarmonicMean is logarithmically related to GeometricMean for positive values:

For positive data, HarmonicMean[d]GeometricMean[d]Mean[d]:

Prove the inequality symbolically:

HarmonicMean[Range[n]] is inversely related to HarmonicNumber[n]:

Wolfram Research (2007), HarmonicMean, Wolfram Language function, https://reference.wolfram.com/language/ref/HarmonicMean.html.

Text

Wolfram Research (2007), HarmonicMean, Wolfram Language function, https://reference.wolfram.com/language/ref/HarmonicMean.html.

CMS

Wolfram Language. 2007. "HarmonicMean." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HarmonicMean.html.

APA

Wolfram Language. (2007). HarmonicMean. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HarmonicMean.html

BibTeX

@misc{reference.wolfram_2022_harmonicmean, author="Wolfram Research", title="{HarmonicMean}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/HarmonicMean.html}", note=[Accessed: 09-June-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_harmonicmean, organization={Wolfram Research}, title={HarmonicMean}, year={2007}, url={https://reference.wolfram.com/language/ref/HarmonicMean.html}, note=[Accessed: 09-June-2023 ]}