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]:

Introduced in 2007
 (6.0)