24
$\begingroup$

Is there anything significant about a geometric mean and arithmetic mean that fall very close to one another, say ~0.1%? What conjectures can be made about such a data set?

I've been working on analyzing a data set, and I notice that ironically the values are very, very close. Not exact, but close. Also, a quick sanity check of the arithmetic mean-geometric mean inequality as well as a review of data acquisition reveal that there is nothing fishy about the integrity of my data set in terms of how I came up with the values.

$\endgroup$
  • 6
    $\begingroup$ Small note: First check your data are all positive; an even number of negative values might leave you with a positive product, and some packages may not flag the potential problem (the AM-GM inequality relies on the values being all positive). See for example (in R): x=c(-5,-5,1,2,3,10); prod(x)^(1/length(x)) $\:\quad$ [1] 3.383363 (while the arithmetic mean is 1) $\endgroup$ – Glen_b Jun 28 '16 at 23:50
  • 1
    $\begingroup$ To elaborate on @Glen_b's point, a dataset $\{-x,0,x\}$ always has equal arithmetic and geometric mean, namely zero. However we can spread the three values as far apart as we wish. $\endgroup$ – hardmath Jun 29 '16 at 20:41
  • $\begingroup$ Both arithmetic and geometric means have the same generalized formula, with $p=1$ giving the former and $p \rightarrow 0$ giving the latter. It then becomes intuitively clear that the two becomes closer and closer to each other when the data values $x$ are more and more all equal, approaching constant. $\endgroup$ – ttnphns Jun 30 '16 at 6:58
29
$\begingroup$

The arithmetic mean is related to the geometric mean through the Arithmetic-Mean-Geometric-Mean (AMGM) inequality which states that:

$$\frac{x_1+x_2+\cdots+x_n} n \geq \sqrt[n]{x_1 x_2\cdots x_n},$$

where equality is achieved iff $x_1=x_2=\cdots=x_n$. So probably your data points are all very close to each other.

$\endgroup$
  • 4
    $\begingroup$ This is right. Typically, the smaller the variance of the values, the closer the two means. $\endgroup$ – Michael M Jun 28 '16 at 20:06
  • 16
    $\begingroup$ The variance would have to be small BY COMPARISON to the sizes of the observations. Thus it is the coefficient of variation, $\sigma/\mu$, that would have to be small. $\qquad$ $\endgroup$ – Michael Hardy Jun 28 '16 at 20:20
  • 1
    $\begingroup$ Does AMGM stand for anything? If so, it would be nice to have it spelled out. $\endgroup$ – Richard Hardy Jun 29 '16 at 8:37
  • $\begingroup$ @RichardHardy: AMGM stands for 'arithmetic mean - geometric mean' $\endgroup$ – user64106 Jun 29 '16 at 9:09
  • 1
    $\begingroup$ @user1108, thanks, actually, I got it after reading the other posts. I just think it could be spelled out in the answer (not only in the comments). $\endgroup$ – Richard Hardy Jun 29 '16 at 9:38
15
$\begingroup$

Elaborating on the answer of @Alex R, one way to see the AMGM inequality is as a Jensen's inequality effect. By Jensen's inequality: $$ \log\left( \frac{1}{n} \sum_i x_i \right) \geq \frac{1}{n} \sum_i \log x_i $$ Then take the exponential of both sides: $$ \frac{1}{n} \sum_i x_i \geq \exp\left( \frac{1}{n} \sum_i \log x_i \right) $$

The right hand side is the geometric mean since $ \left(x_1 \cdot x_2 \cdot \ldots \cdot x_n \right)^{1/n} = \exp\left(\frac{1}{n} \sum_i \log x_i \right) $

When does the AMGM inequality hold with near equality? When the Jensen's inequality effect is small. What drives the Jensen's inequality effect here is the concavity, the curvature of the logarithm. If your data is spread across an area where the logarithm has curvature, the effect will be big. If your data is spread across a region where the logarithm is basically affine, then the effect will be small.

For example, if the data has little variation, is clumped together in a sufficiently small neighborhood, then the logarithm will look like an affine function in that region (a theme of calculus is that if you zoom in enough on smooth, continuous function, that it will look like a line). For data sufficiently close together, the arithmetic mean of the data will be close to the geometric mean.

$\endgroup$
12
$\begingroup$

Let's investigate the range of $x_1\le x_2 \le \cdots \le x_n$ given that their arithmetic mean (AM) is a small multiple $1+\delta$ of their geometric mean (GM) (with $\delta \ge 0$). In the question, $\delta\approx 0.001$ but we don't know $n$.

Since the ratio of these means does not change when the units of measurement are changed, pick a unit for which the GM is $1$. Thus, we seek to maximize $x_n$ subject to the constraint that $x_1+x_2+\cdots+x_n = n(1+\delta)$ and $x_1\cdot x_2\cdots x_n = 1$.

This will be done by making $x_1=x_2=\cdots=x_{n-1}=x$, say, and $x_n=z \ge x$. Thus

$$n(1+\delta) = x_1 + \cdots + x_n = (n-1)x + z$$

and

$$1 = x_1\cdot x_2 \cdots x_n = x^{n-1}z.$$

The solution $x$ is a root between $0$ and $1$ of

$$(1-n)x^n + n(1+\delta)x^{n-1} - 1.$$

It is easily found iteratively. Here are the graphs of the optimal $x$ and $z$ as a function of $\delta$ for $n=6, 20, 50, 150$, left to right:

Figure

As soon as $n$ reaches any appreciable size, even a tiny ratio of $1.001$ is consistent with one large outlying $x_n$ (the upper red curves) and a group of tightly clustered $x_i$ (the lower blue curves).

At the other extreme, suppose $n=2k$ is even (for simplicity). The minimum range is achieved when half the $x_i$ equal one value $x \le 1$ and the other half equal another value $z \ge 1$. Now the solution (which is easily checked) is

$$x^k = 1+\delta \pm \sqrt{\delta^2 + 2\delta}.$$

For tiny $\delta$, we may ignore the $\delta^2$ as an approximation and also approximate the $k^\text{th}$ root to first order, giving

$$x \approx 1 + \frac{\delta-\sqrt{2\delta}}{k};\ z \approx 1 + \frac{\delta+\sqrt{2\delta}}{k}.$$

The range is approximately $\sqrt{32\delta}/n$.

In this manner we have obtained upper and lower bounds on the possible range of the data. We have learned that they depend heavily on the amount of data $n$. The upper bound shows the range can be appreciable even for tiny $\delta$, thereby improving our sense of just how close to each other the data points really need to be--and placing a lower limit on their range, too.

Similar analyses, just as easily carried out, can inform you--quantitatively--of how tightly clustered the $x_i$ might be in terms of any other measure of spread, such as their variance or coefficient of variation.

$\endgroup$
  • $\begingroup$ On the right of your right hand graph you seem to have $n=150, \delta=0.002, x\approx 0.9954, z \approx 1.983, k=75$. I do not see how these values are near your stated formulae approximations which seem to give $x \approx 0.99918, z\approx 1.00087$. Perhaps I have misunderstood $\endgroup$ – Henry Jun 29 '16 at 15:56
  • $\begingroup$ @Henry I don't know how you came up with those numbers. When $n=150$, the requirements are that $x^{149} z=1$ and $149x + z=150(1.002)=150.3$. Neither of those comes close to being true for the values you supply. When you plug in $x=0.995416$ and $z=1.98308$, you get the correct values. $\endgroup$ – whuber Jun 29 '16 at 16:37
  • $\begingroup$ I tried what looks to me like your $z \approx 1 + \dfrac{\delta+\sqrt{2\delta}}{k} = 1+\dfrac{0.002+\sqrt{2\times 0.002} }{75} \approx 1.00087$ and similarly for $x$. But now I see this is answering a different question $\endgroup$ – Henry Jun 29 '16 at 16:46
  • $\begingroup$ @Henry That solves a different problem: those are the values that give a minimum range. I did not post graphs for those. Indeed, with your $x$ and $z$ we have $75x+75z\approx 150.3$ and $x^{75}z^{75}\approx 1$, as required. $\endgroup$ – whuber Jun 29 '16 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.