Jump to content

Harmonic mean

From Wikipedia, the free encyclopedia
(Redirected from Weighted harmonic mean)

Template:Short description In mathematics, the harmonic mean is a kind of average, one of the Pythagorean means.

It is sometimes used for ratios and rates such as speeds,[1][2] and is normally used for positive arguments only.[3]

The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the numbers, that is, the [[generalized f-mean|generalized Template:Mvar-mean]] with <math>f(x) = \frac{1}{x}</math>. For example, the harmonic mean of 1, 4, and 4 is <math display="block">\left(\frac{1^{-1} + 4^{-1} + 4^{-1}}{3}\right)^{-1} = \frac{3}{\frac{1}{1} + \frac{1}{4} + \frac{1}{4}} = \frac{3}{\frac{6}{4}} = \frac{3}{\frac{3}{2}}=2\,.</math>

Definition

The harmonic mean Template:Mvar of the positive real numbers <math>x_1, x_2, \ldots, x_n</math> is[4]<math display="block">H(x_1, x_2, \ldots, x_n) = \frac{n}{\displaystyle \frac1{x_1} + \frac1{x_2} + \cdots + \frac1{x_n}} = \frac{n}{\displaystyle \sum_{i=1}^n \frac1{x_i}}.</math>It is the reciprocal of the arithmetic mean of the reciprocals, and vice versa:<math display="block">\begin{align} H(x_1, x_2, \ldots, x_n) &= \frac{1}{\displaystyle A\left(\frac1{x_1}, \frac1{x_2}, \ldots \frac1{x_n}\right)}, \\ A(x_1, x_2, \ldots, x_n) &= \frac{1}{\displaystyle H\left(\frac1{x_1}, \frac1{x_2}, \ldots \frac1{x_n}\right)}, \end{align}</math>where the arithmetic mean is <math display="inline">A(x_1, x_2, \ldots, x_n) = \tfrac1n \sum_{i=1}^n x_i.</math>

The harmonic mean is a Schur-concave function.[5][6] It is greater than or equal to the minimum of its arguments: for positive arguments, <math display="block">\min(x_1,\ldots,x_n) \le H(x_1,\ldots,x_n) \le n\min(x_1,\ldots,x_n).</math> Indeed, if <math>m=\min(x_1,\ldots,x_n)</math>, then <math display="inline">\sum_{i=1}^n 1/x_i\leq n/m</math>, while <math display="inline">\sum_{i=1}^n 1/x_i\geq 1/m</math>, which gives the two inequalities from the definition above. Thus, the harmonic mean cannot be made arbitrarily large by changing some values to bigger ones while having at least one value unchanged.

The harmonic mean is also concave for positive arguments, an even stronger property than Schur-concavity.[5]

Relationship with other means

Template:QM AM GM HM inequality visual proof.svg For all positive data sets containing at least one pair of nonequal values, the harmonic mean is always the least of the three Pythagorean means,[7] while the arithmetic mean is always the greatest of the three and the geometric mean is always in between. (If all values in a nonempty data set are equal, the three means are always equal.)

It is the special case Template:Math of the power mean: <math display="block">H\left(x_1, x_2, \ldots, x_n\right) = M_{-1}\left(x_1, x_2, \ldots, x_n\right) = \frac{n}{x_1^{-1} + x_2^{-1} + \cdots + x_n^{-1}}</math>Since the harmonic mean of a list of numbers tends strongly toward the least elements of the list, it tends (compared to the arithmetic mean) to mitigate the impact of large outliers and aggravate the impact of small ones.

The arithmetic mean is often mistakenly used in places calling for the harmonic mean.[8] In the speed example below, for instance, finding the average speed based on equal amounts of distance, the arithmetic mean of 40 is incorrect. Since the arithmetic mean is always greater than or equal to the harmonic mean, this necessarily means 40 is larger than the correct answer.

The harmonic mean is related to the other Pythagorean means, as seen in the equation below. This can be seen by interpreting the denominator to be the arithmetic mean of the product of numbers Template:Mvar times but each time omitting the Template:Mvar-th term. That is, for the first term, we multiply all Template:Mvar numbers except the first; for the second, we multiply all Template:Mvar numbers except the second; and so on. The numerator, excluding the Template:Mvar, which goes with the arithmetic mean, is the geometric mean to the power Template:Mvar. Thus the Template:Mvar-th harmonic mean is related to the Template:Mvar-th geometric and arithmetic means. The general formula is <math display="block">H\left(x_1, \ldots, x_n\right) =

 \frac{\left(G\left(x_1, \ldots, x_n\right)\right)^n}
      {A\left(x_2 x_3 \cdots x_n, x_1 x_3 \cdots x_n, \ldots, x_1 x_2 \cdots x_{n-1}\right)} =
 \frac{\left(G\left(x_1, \ldots, x_n\right)\right)^n}
      {A\left(
        \frac{1}{x_1} {\prod\limits_{i=1}^n x_i},
        \frac{1}{x_2} {\prod\limits_{i=1}^n x_i},
        \ldots,
        \frac{1}{x_n} {\prod\limits_{i=1}^n x_i}
      \right)}.

</math>If a set of non-identical numbers is subjected to a mean-preserving spread — that is, two or more elements of the set are "spread apart" from each other while leaving the arithmetic mean unchanged — then the harmonic mean always decreases.[9]

Harmonic mean of two or three numbers

Two numbers

File:MathematicalMeans.svg
A geometric construction of the three Pythagorean means of two numbers, Template:Mvar and Template:Mvar. The harmonic mean is denoted by Template:Mvar in purple, while the arithmetic mean is Template:Mvar in red and the geometric mean is Template:Mvar in blue. Template:Mvar denotes a fourth mean, the quadratic mean. Since a hypotenuse is always longer than a leg of a right triangle, the diagram shows that Template:Math.
File:Harmonic mean graphical computation.svg
A graphical interpretation of the harmonic mean, Template:Mvar of two numbers, Template:Mvar and Template:Mvar, and a nomogram to calculate it. The blue line shows that the harmonic mean of 6 and 2 is 3. The magenta line shows that the harmonic mean of 6 and −2 is −6. The red line shows that the harmonic mean of a number and its negative is undefined as the line does not intersect the Template:Mvar axis.

For the special case of just two numbers, <math>x_1</math> and <math>x_2</math>, the harmonic mean can be written as:[4] <math display="block">H = \frac{2x_1 x_2}{x_1 + x_2} \qquad \text{ or } \qquad \frac{1}{H} = \frac{(1/x_1) + (1/x_2)}{2}.</math> (Note that the harmonic mean is undefined if <math>x_1 + x_2 = 0</math>, i.e. <math>x_1 = -x_2</math>.)

In this special case, the harmonic mean is related to the arithmetic mean <math>A = \frac{x_1 + x_2}{2}</math> and the geometric mean <math>G = \sqrt{x_1 x_2},</math> by[4] <math display="block">H = \frac{G^2}{A} = G\left(\frac{G}{A}\right).</math>

Since <math>\tfrac{G}{A} \le 1</math> by the inequality of arithmetic and geometric means, this shows for the Template:Math case that Template:Math (a property that in fact holds for all Template:Mvar). It also follows that <math>G = \sqrt{AH}</math>, meaning the two numbers' geometric mean equals the geometric mean of their arithmetic and harmonic means.

Three numbers

For the special case of three numbers, <math>x_1</math>, <math>x_2</math> and <math>x_3</math>, the harmonic mean can be written as:[4] <math display="block">H = \frac{3 x_1 x_2 x_3}{x_1 x_2 + x_1 x_3 + x_2 x_3}.</math>

Three positive numbers Template:Mvar, Template:Mvar, and Template:Mvar are respectively the harmonic, geometric, and arithmetic means of three positive numbers if and only if[10]Template:Rp the following inequality holds <math display="block">\frac{A^3}{G^3} + \frac{G^3}{H^3} + 1 \le \frac3{4} \left(1 + \frac{A}{H}\right)^2.</math>

Weighted harmonic mean

If a set of weights <math>w_1</math>, ..., <math>w_n</math> is associated to the data set <math>x_1</math>, ..., <math>x_n</math>, the weighted harmonic mean is defined by [11] <math display="block">

 H = \frac{\sum\limits_{i=1}^n w_i}{\sum\limits_{i=1}^n \frac{w_i}{x_i}}
   = \left( \frac{\sum\limits_{i=1}^n w_i x_i^{-1}}{\sum\limits_{i=1}^n w_i} \right)^{-1}.

</math>

The unweighted harmonic mean can be regarded as the special case where all of the weights are equal.

Examples

In analytic number theory

Prime number theory

The prime number theorem states that the number of primes less than or equal to <math>n</math> is asymptotically equal to the harmonic mean of the first <math>n</math> natural numbers.[12]

In physics

Average speed

In many situations involving rates and ratios, the harmonic mean provides the correct average. For instance, if a vehicle travels a certain distance Template:Mvar outbound at a speed <math>v_1</math> (e.g. 60 km/h) and returns the same distance at a speed <math>v_2</math> (e.g. 20 km/h), then its average speed is the harmonic mean of <math>v_1</math> and <math>v_2</math> (30 km/h), not the arithmetic mean (40 km/h). The total travel time is the same as if it had traveled the whole distance at that average speed. This can be proven as follows:[13]

<math display="block">\text{Average speed for the entire journey} = \frac{\text{Total distance traveled}}{\text{Sum of time for each segment}} = \frac{2s}{t_1 + t_2} = \frac{2s}{\frac{s}{v_1}+\frac{s}{v_2}} = \frac{2v_1v_2}{v_1+v_2} = 30</math>

However, if the vehicle travels for a certain amount of time at a speed <math>v_1</math> and then the same amount of time at a speed <math>v_2</math>, then its average speed is the arithmetic mean of <math>v_1</math> and <math>v_2</math>, which in the above example is 40 km/h.

<math display="block">\text{Average speed for the entire journey} = \frac{\text{Total distance traveled}}{\text{Sum of time for each segment}} = \frac{s_1+s_2}{2t} = \frac{v_1 t + v_2 t}{2t} = \frac{v_1+v_2}{2} = 40</math>

The same principle applies to more than two segments: given a series of sub-trips at different speeds, if each sub-trip covers the same distance, then the average speed is the harmonic mean of all the sub-trip speeds, and if each sub-trip takes the same amount of time, then the average speed is the arithmetic mean of all the sub-trip speeds. If neither is the case, then a weighted harmonic mean or weighted arithmetic mean is needed. For the arithmetic mean, the speed of each portion of the trip is weighted by the duration of that portion, while for the harmonic mean, the corresponding weight is the distance. In both cases, the resulting formula reduces to dividing the total distance by the total time.

However, one may avoid the use of the harmonic mean for the case of "weighting by distance". Pose the problem as finding the pace of the trip where pace (in hours per kilometer) is the inverse of speed. When trip pace is found, invert it so as to find the "true" average trip speed. For each trip segment <math>i</math>, the pace <math>p_i = \frac{1}{\text{speed}_i}</math>. Then take the weighted arithmetic mean of the <math>p_i \text{s}</math> weighted by their respective distances (optionally with the weights normalized so they sum to 1 by dividing them by trip length). This gives the true average pace (in time per kilometer). It turns out that this procedure, which can be done with no knowledge of the harmonic mean, amounts to the same mathematical operations as one would use in solving this problem by using the harmonic mean. Thus it illustrates why the harmonic mean works in this case.Template:Citation needed

Density

{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= Template:Ambox }}Template:Ifsubst }} Similarly, if one wishes to estimate the density of an alloy given the densities of its constituent elements and their mass fractions (or, equivalently, percentages by mass), then the predicted density of the alloy (exclusive of typically minor volume changes due to atom packing effects) is the weighted harmonic mean of the individual densities, weighted by mass, rather than the weighted arithmetic mean as one might at first expect. To use the weighted arithmetic mean, the densities would have to be weighted by volume. Applying dimensional analysis to the problem while labeling the mass units by element and making sure that only like element-masses cancel makes this clear.

Electricity

{{#invoke:Labelled list hatnote|labelledList|See also|ifexists=true}} If one connects two electrical resistors in parallel, one having resistance Template:Math (e.g., 60 Ω) and one having resistance Template:Math (e.g., 40 Ω), then the effect is the same as if one had used two resistors with the same resistance, both equal to the harmonic mean of Template:Math and Template:Math (48 Ω); the equivalent resistance, in either case, is 24 Ω (one-half of the harmonic mean). This same principle applies to capacitors in series or to inductors in parallel.Template:Cn

Average resistance for both resistors in parallel = Template:Sfrac = Template:Math Template:Math Template:Math

However, if one connects the resistors in series, then the average resistance is the arithmetic mean of Template:Math and Template:Math (50 Ω), with total resistance equal to twice this, the sum of Template:Math and Template:Math (100 Ω). This principle applies to capacitors in parallel or to inductors in series.

Average resistance for both resistors in series = Template:Sfrac = Template:Math Template:Math Template:Math

As with the previous example, the same principle applies when more than two resistors, capacitors or inductors are connected, provided that all are in parallel or all are in series.Template:Citation needed

The "conductivity effective mass" of a semiconductor is also defined as the harmonic mean of the effective masses along the three crystallographic directions.[14]

Optics

As for other optic equations, the thin lens equation Template:Math can be rewritten such that the focal length Template:Mvar is one-half of the harmonic mean of the distances of the subject Template:Mvar and object Template:Mvar from the lens.[15]

Two thin lenses of focal length Template:Math and Template:Math in series is equivalent to two thin lenses of focal length Template:Math, their harmonic mean, in series. Expressed as optical power, two thin lenses of optical powers Template:Math and Template:Math in series is equivalent to two thin lenses of optical power Template:Math, their arithmetic mean, in series.

In finance

The weighted harmonic mean is the preferable method for averaging multiples, such as the price–earnings ratio (P/E). If these ratios are averaged using a weighted arithmetic mean, high data points are given greater weights than low data points. The weighted harmonic mean, on the other hand, correctly weights each data point.[16] The simple weighted arithmetic mean when applied to non-price normalized ratios such as the P/E is biased upwards and cannot be numerically justified, since it is based on equalized earnings; just as vehicles speeds cannot be averaged for a roundtrip journey (see above).[17]

In geometry

In any triangle, the radius of the incircle is one-third of the harmonic mean of the altitudes.

For any point Template:Mvar on the minor arc Template:Mvar of the circumcircle of an equilateral triangle Template:Mvar, with distances Template:Mvar and Template:Mvar from Template:Mvar and Template:Mvar respectively, and with the intersection of Template:Mvar and Template:Mvar being at a distance Template:Mvar from point Template:Mvar, we have that Template:Mvar is half the harmonic mean of Template:Mvar and Template:Mvar.[18]

In a right triangle with legs Template:Mvar and Template:Mvar and altitude Template:Mvar from the hypotenuse to the right angle, Template:Math is half the harmonic mean of Template:Math and Template:Math.[19][20]

Let Template:Mvar and Template:Mvar (Template:Math) be the sides of the two inscribed squares in a right triangle with hypotenuse Template:Mvar. Then Template:Math equals half the harmonic mean of Template:Math and Template:Math.

Let a trapezoid have vertices Template:Mvar, Template:Mvar, Template:Mvar, and Template:Mvar in sequence and have parallel sides Template:Mvar and Template:Mvar. Let Template:Mvar be the intersection of the diagonals, and let Template:Mvar be on side Template:Mvar and Template:Mvar be on side Template:Mvar such that Template:Mvar is parallel to Template:Mvar and Template:Mvar. Then Template:Mvar is the harmonic mean of Template:Mvar and Template:Mvar. (This is provable using similar triangles.)

File:CrossedLadders.png
Crossed ladders. Template:Mvar is half the harmonic mean of Template:Mvar and Template:Mvar

One application of this trapezoid result is in the crossed ladders problem, where two ladders lie oppositely across an alley, each with feet at the base of one sidewall, with one leaning against a wall at height Template:Mvar and the other leaning against the opposite wall at height Template:Mvar, as shown. The ladders cross at a height of Template:Mvar above the alley floor. Then Template:Mvar is half the harmonic mean of Template:Mvar and Template:Mvar. This result still holds if the walls are slanted but still parallel and the "heights" Template:Mvar, Template:Mvar, and Template:Mvar are measured as distances from the floor along lines parallel to the walls. This can be proved easily using the area formula of a trapezoid and area addition formula.

In an ellipse, the semi-latus rectum (the distance from a focus to the ellipse along a line parallel to the minor axis) is the harmonic mean of the maximum and minimum distances of the ellipse from a focus.

In other sciences

In computer science, specifically information retrieval and machine learning, the harmonic mean of the precision (true positives per predicted positive) and the recall (true positives per real positive) is often used as an aggregated performance score for the evaluation of algorithms and systems: the F-score (or F-measure). This is used in information retrieval because only the positive class is of relevance, while number of negatives, in general, is large and unknown.[21] It is thus a trade-off as to whether the correct positive predictions should be measured in relation to the number of predicted positives or the number of real positives, so it is measured versus a putative number of positives that is an arithmetic mean of the two possible denominators.

A consequence arises from basic algebra in problems where people or systems work together. As an example, if a gas-powered pump can drain a pool in 4 hours and a battery-powered pump can drain the same pool in 6 hours, then it will take both pumps Template:Math, which is equal to 2.4 hours, to drain the pool together. This is one-half of the harmonic mean of 6 and 4: Template:Math. That is, the appropriate average for the two types of pump is the harmonic mean, and with one pair of pumps (two pumps), it takes half this harmonic mean time, while with two pairs of pumps (four pumps) it would take a quarter of this harmonic mean time.

In hydrology, the harmonic mean is similarly used to average hydraulic conductivity values for a flow that is perpendicular to layers (e.g., geologic or soil) - flow parallel to layers uses the arithmetic mean. This apparent difference in averaging is explained by the fact that hydrology uses conductivity, which is the inverse of resistivity.

In sabermetrics, a baseball player's Power–speed number is the harmonic mean of their home run and stolen base totals.

In population genetics, the harmonic mean is used when calculating the effects of fluctuations in the census population size on the effective population size. The harmonic mean takes into account the fact that events such as population bottleneck increase the rate genetic drift and reduce the amount of genetic variation in the population. This is a result of the fact that following a bottleneck very few individuals contribute to the gene pool limiting the genetic variation present in the population for many generations to come.

When considering fuel economy in automobiles two measures are commonly used – miles per gallon (mpg), and litres per 100 km. As the dimensions of these quantities are the inverse of each other (one is distance per volume, the other volume per distance) when taking the mean value of the fuel economy of a range of cars one measure will produce the harmonic mean of the other – i.e., converting the mean value of fuel economy expressed in litres per 100 km to miles per gallon will produce the harmonic mean of the fuel economy expressed in miles per gallon. For calculating the average fuel consumption of a fleet of vehicles from the individual fuel consumptions, the harmonic mean should be used if the fleet uses miles per gallon, whereas the arithmetic mean should be used if the fleet uses litres per 100 km. In the USA the CAFE standards (the federal automobile fuel consumption standards) make use of the harmonic mean.

In chemistry and nuclear physics the average mass per particle of a mixture consisting of different species (e.g., molecules or isotopes) is given by the harmonic mean of the individual species' masses weighted by their respective mass fraction.

Beta distribution

{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= Template:Ambox }}Template:Ifsubst }}

File:Harmonic mean for Beta distribution for alpha and beta ranging from 0 to 5 - J. Rodal.jpg
Harmonic mean for Beta distribution for Template:Math and Template:Math
File:(Mean - HarmonicMean) for Beta distribution versus alpha and beta from 0 to 2 - J. Rodal.jpg
(Mean - HarmonicMean) for Beta distribution versus alpha and beta from 0 to 2
File:Harmonic Means for Beta distribution Purple=H(X), Yellow=H(1-X), smaller values alpha and beta in front - J. Rodal.jpg
Harmonic Means for Beta distribution Purple Template:Math, Yellow Template:Math, smaller values alpha and beta in front
File:Harmonic Means for Beta distribution Purple=H(X), Yellow=H(1-X), larger values alpha and beta in front - J. Rodal.jpg
Harmonic Means for Beta distribution Purple Template:Math, Yellow Template:Math, larger values alpha and beta in front

The harmonic mean of a beta distribution with shape parameters Template:Mvar and Template:Mvar is: <math display="block">H = \frac{\alpha - 1}{\alpha + \beta - 1} \text{ conditional on } \alpha > 1 \, \, \& \, \, \beta > 0 </math>

The harmonic mean with Template:Math is undefined because its defining expression is not bounded in [0, 1].

Letting Template:Math <math display="block">H = \frac{\alpha - 1}{2 \alpha - 1}</math> showing that for Template:Math the harmonic mean ranges from 0 for Template:Math, to 1/2 for Template:Math.

The following are the limits with one parameter finite (non-zero) and the other parameter approaching these limits: <math display="block">\begin{align}

 \lim_{\alpha \to 0} H &= \text{ undefined } \\
 \lim_{\alpha \to 1} H &= \lim_{\beta \to \infty}  H = 0 \\
 \lim_{\beta \to 0}  H &= \lim_{\alpha \to \infty} H = 1

\end{align}</math>

With the geometric mean the harmonic mean may be useful in maximum likelihood estimation in the four parameter case.

A second harmonic mean (Template:Math) also exists for this distribution <math display="block">H_{1-X} = \frac{\beta - 1}{\alpha + \beta - 1} \text{ conditional on } \beta > 1 \, \, \& \, \, \alpha > 0</math>

This harmonic mean with Template:Math is undefined because its defining expression is not bounded in [ 0, 1 ].

Letting Template:Math in the above expression <math display="block">H_{1-X} = \frac{\beta - 1}{2 \beta - 1} </math> showing that for Template:Math the harmonic mean ranges from 0, for Template:Math, to 1/2, for Template:Math.

The following are the limits with one parameter finite (non zero) and the other approaching these limits: <math display="block">\begin{align}

 \lim_{\beta \to 0}  H_{1-X} &= \text{ undefined } \\
 \lim_{\beta \to 1}  H_{1-X} &= \lim_{\alpha \to \infty} H_{1-X} = 0 \\
 \lim_{\alpha \to 0} H_{1-X} &= \lim_{\beta \to \infty}  H_{1-X} = 1

\end{align}</math>

Although both harmonic means are asymmetric, when Template:Math the two means are equal.

Lognormal distribution

The harmonic mean (Template:Mvar) of the lognormal distribution of a random variable Template:Mvar is[22] <math display="block">H = \exp \left( \mu - \frac{1}{2} \sigma^2 \right),</math> where Template:Mvar and Template:Math are the parameters of the distribution, i.e. the mean and variance of the distribution of the natural logarithm of Template:Mvar.

The harmonic and arithmetic means of the distribution are related by <math display="block">\frac{\mu^*}{H} = 1 + C_v^2 \, ,</math> where Template:Math and Template:Math are the coefficient of variation and the mean of the distribution respectively..

The geometric (Template:Mvar), arithmetic and harmonic means of the distribution are related by[23] <math display="block">H \mu^* = G^2.</math>

Pareto distribution

The harmonic mean of type 1 Pareto distribution is[24] <math display="block">H = k \left( 1 + \frac{1}{\alpha} \right)</math> where Template:Mvar is the scale parameter and Template:Mvar is the shape parameter.

Statistics

For a random sample, the harmonic mean is calculated as above. Both the mean and the variance may be infinite (if it includes at least one term of the form 1/0).

Sample distributions of mean and variance

The mean of the sample Template:Mvar is asymptotically distributed normally with variance Template:Math. <math display="block">s^2 = \frac{m \left[\operatorname{E}\left(\frac{1}{x} - 1\right)\right]}{m^2 n}</math>

The variance of the mean itself is[25] <math display="block">\operatorname{Var}\left(\frac{1}{x}\right) = \frac{m \left[\operatorname{E}\left(\frac{1}{x} - 1\right)\right]}{n m^2}</math> where Template:Mvar is the arithmetic mean of the reciprocals, Template:Mvar are the variates, Template:Mvar is the population size and Template:Math is the expectation operator.

Delta method

{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= Template:Ambox }}Template:Ifsubst }}

Assuming that the variance is not infinite and that the central limit theorem applies to the sample then using the delta method, the variance is <math display="block">\operatorname{Var}(H) = \frac{1}{n}\frac{s^2}{m^4}</math> where Template:Mvar is the harmonic mean, Template:Mvar is the arithmetic mean of the reciprocals <math display="block">m = \frac{1}{n} \sum{ \frac{1}{x} }.</math>

Template:Math is the variance of the reciprocals of the data <math display="block">s^2 = \operatorname{Var}\left( \frac{1}{x} \right) </math> and Template:Mvar is the number of data points in the sample.

Jackknife method

A jackknife method of estimating the variance is possible if the mean is known.[26] This method is the usual 'delete 1' rather than the 'delete m' version.

This method first requires the computation of the mean of the sample (Template:Mvar) <math display="block">m = \frac{n}{ \sum{ \frac{1}{x} } }</math> where Template:Mvar are the sample values.

A series of value Template:Math is then computed where <math display="block">w_i = \frac{n - 1}{ \sum_{j \neq i} \frac{1}{x} }.</math>

The mean (Template:Mvar) of the Template:Math is then taken: <math display="block">h = \frac{1}{n} \sum{w_i}</math>

The variance of the mean is <math display="block">\frac{n - 1}{n} \sum{(m - w_i)}^2.</math>

Significance testing and confidence intervals for the mean can then be estimated with the t test.

Size biased sampling

Assume a random variate has a distribution Template:Math. Assume also that the likelihood of a variate being chosen is proportional to its value. This is known as length based or size biased sampling.

Let Template:Mvar be the mean of the population. Then the probability density function Template:Math of the size biased population is <math display="block">f^*(x) = \frac{x f(x)}{\mu}</math>

The expectation of this length biased distribution Template:Math is[25] <math display="block">\operatorname{E}^*(x) = \mu \left[ 1 + \frac{\sigma^2}{\mu^2} \right]</math> where Template:Math is the variance.

The expectation of the harmonic mean is the same as the non-length biased version Template:Math <math display="block"> E^*( x^{ -1 } ) = E( x )^{ -1 } </math>

The problem of length biased sampling arises in a number of areas including textile manufacture[27] pedigree analysis[28] and survival analysis[29]

Akman et al. have developed a test for the detection of length based bias in samples.[30]

Shifted variables

If Template:Mvar is a positive random variable and Template:Math then for all Template:Math[31] <math display="block">\operatorname{Var} \left[\frac{1}{(X + \epsilon)^q}\right] < \operatorname{Var} \left(\frac{1}{X^q}\right) .</math>

Moments

Assuming that Template:Mvar and Template:Math are > 0 then[31] <math display="block">\operatorname{E}\left[ \frac{1}{X} \right] \ge \frac{1}{ \operatorname{E}(X) }</math>

This follows from Jensen's inequality.

Gurland has shown that[32] for a distribution that takes only positive values, for any Template:Math <math display="block">\operatorname{E} \left(X^{-1}\right) \ge \frac{\operatorname{E} \left(X^{n-1}\right)}{\operatorname{E}\left(X^n\right)} .</math>

Under some conditions[33] <math display="block">\operatorname{E}(a + X)^{-n} \sim \operatorname{E}\left(a + X^{-n}\right)</math> where ~ means approximately equal to.

Sampling properties

Assuming that the variates (Template:Mvar) are drawn from a lognormal distribution there are several possible estimators for Template:Mvar: <math display="block">\begin{align}

 H_1 &= \frac{n}{ \sum\left(\frac{1}{x}\right) } \\
 H_2 &= \frac{\left( \exp\left[ \frac{1}{n} \sum \log_e(x) \right] \right)^2}{ \frac{1}{n} \sum(x) } \\
 H_3 &= \exp \left(m - \frac{1}{2} s^2 \right)

\end{align}</math> where <math display="block">m = \frac{1}{n} \sum \log_e (x)</math> <math display="block">s^2 = \frac{1}{n} \sum \left(\log_e (x) - m\right)^2</math>

Of these Template:Math is probably the best estimator for samples of 25 or more.[34]

Bias and variance estimators

A first order approximation to the bias and variance of Template:Math are[35] <math display="block">\begin{align}

 \operatorname{bias}\left[ H_1 \right] &= \frac{H C_v}{n} \\
  \operatorname{Var}\left[ H_1 \right] &= \frac{H^2 C_v}{n}

\end{align}</math> where Template:Math is the coefficient of variation.

Similarly a first order approximation to the bias and variance of Template:Math are[35] <math display="block">\begin{align}

 \frac{H \log_e \left(1 + C_v\right)}{2n} \left[ 1 + \frac{1 + C_v^2}{2} \right] \\
 \frac{H \log_e \left(1 + C_v\right)}{n} \left[ 1 + \frac{1 + C_v^2}{4} \right]

\end{align}</math>

In numerical experiments Template:Math is generally a superior estimator of the harmonic mean than Template:Math.[35] Template:Math produces estimates that are largely similar to Template:Math.

Notes

The Environmental Protection Agency recommends the use of the harmonic mean in setting maximum toxin levels in water.[36]

In geophysical reservoir engineering studies, the harmonic mean is widely used.[37]

See also

Template:Portal

Notes

Template:Notelist Template:Reflist

References

Template:Reflist

Template:Statistics

  1. ↑ Course Template:Webarchive
  2. ↑ Template:Cite book
  3. ↑ Template:Cite book
  4. ↑ 4.0 4.1 4.2 4.3 {{#invoke:citation/CS1|citation |CitationClass=web }}
  5. ↑ 5.0 5.1 Template:Cite book
  6. ↑ Template:Cite book
  7. ↑ Da-Feng Xia, Sen-Lin Xu, and Feng Qi, "A proof of the arithmetic mean-geometric mean-harmonic mean inequalities", RGMIA Research Report Collection, vol. 2, no. 1, 1999, http://ajmaa.org/RGMIA/papers/v2n1/v2n1-10.pdf Template:Webarchive
  8. ↑ *Statistical Analysis, Ya-lun Chou, Holt International, 1969, Template:ISBN
  9. ↑ Mitchell, Douglas W., "More on spreads and non-arithmetic means," The Mathematical Gazette 88, March 2004, 142–144.
  10. ↑ Inequalities proposed in "Crux Mathematicorum", {{#invoke:citation/CS1|citation |CitationClass=web }}.
  11. ↑ Ferger F (1931) The nature and use of the harmonic mean. Journal of the American Statistical Association 26(173) 36-40
  12. ↑ Template:Cite arXiv
  13. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  14. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  15. ↑ Template:Cite book
  16. ↑ Template:Cite book
  17. ↑ Template:Cite journal
  18. ↑ Template:Cite book
  19. ↑ Voles, Roger, "Integer solutions of <math>a^{-2}+b^{-2}=d^{-2}</math>," Mathematical Gazette 83, July 1999, 269–271.
  20. ↑ Richinick, Jennifer, "The upside-down Pythagorean Theorem," Mathematical Gazette 92, July 2008, 313–;317.
  21. ↑ Template:Cite book
  22. ↑ Aitchison J, Brown JAC (1969). The lognormal distribution with special reference to its uses in economics. Cambridge University Press, New York
  23. ↑ Rossman LA (1990) Design stream flows based on harmonic means. J Hydr Eng ASCE 116(7) 946–950
  24. ↑ Johnson NL, Kotz S, Balakrishnan N (1994) Continuous univariate distributions Vol 1. Wiley Series in Probability and Statistics.
  25. ↑ 25.0 25.1 Zelen M (1972) Length-biased sampling and biomedical problems. In: Biometric Society Meeting, Dallas, Texas
  26. ↑ Lam FC (1985) Estimate of variance for harmonic mean half lives. J Pharm Sci 74(2) 229-231
  27. ↑ Cox DR (1969) Some sampling problems in technology. In: New developments in survey sampling. U.L. Johnson, H Smith eds. New York: Wiley Interscience
  28. ↑ Davidov O, Zelen M (2001) Referent sampling, family history and relative risk: the role of length-biased sampling. Biostat 2(2): 173-181 {{#invoke:CS1 identifiers|main|_template=doi}}
  29. ↑ Zelen M, Feinleib M (1969) On the theory of screening for chronic diseases. Biometrika 56: 601-614
  30. ↑ Akman O, Gamage J, Jannot J, Juliano S, Thurman A, Whitman D (2007) A simple test for detection of length-biased sampling. J Biostats 1 (2) 189-195
  31. ↑ 31.0 31.1 Chuen-Teck See, Chen J (2008) Convex functions of random variables. J Inequal Pure Appl Math 9 (3) Art 80
  32. ↑ Gurland J (1967) An inequality satisfied by the expectation of the reciprocal of a random variable. The American Statistician. 21 (2) 24
  33. ↑ Sung SH (2010) On inverse moments for a class of nonnegative random variables. J Inequal Applic {{#invoke:CS1 identifiers|main|_template=doi}}
  34. ↑ Stedinger JR (1980) Fitting lognormal distributions to hydrologic data. Water Resour Res 16(3) 481–490
  35. ↑ 35.0 35.1 35.2 Limbrunner JF, Vogel RM, Brown LC (2000) Estimation of harmonic mean of a lognormal variable. J Hydrol Eng 5(1) 59-66 {{#invoke:citation/CS1|citation |CitationClass=web }}
  36. ↑ EPA (1991) Technical support document for water quality-based toxics control. EPA/505/2-90-001. Office of Water
  37. ↑ Muskat M (1937) The flow of homogeneous fluids through porous media. McGraw-Hill, New York