I gave a talk on Fermi problems and a method for approaching them using the approximate geometric mean at the Maths Jam gathering in 2017. This post is a write up of that talk with some extras added in from useful discussion afterwards.

Enrico Fermi apparently had a knack for making rough estimates with very little data. Fermi problems are problems which ask for estimations for which very little data is available. Some standard Fermi problems:

- How many piano tuners are there in New York City?
- How many hairs are there on a bear?
- How many miles does a person walk in a lifetime?
- How many people in the world are talking on their mobile phones right now?

Hopefully you get the idea. These are problems for which little data is available, but for which intelligent guesses can be made. I have used problems of this type with students as an exercise in estimation and making assumptions. Inspired by a tweet from Alison Kiddle, I have set these up as a comparison of which is bigger from two unknowable things. Are there more cats in Sheffield or train carriages passing through Sheffield station every day? That sort of thing.

The point of these is not to look up information or make wild guesses, but instead to come up with a back-of-the-envelope, ‘wrong, but useful‘, orders of magnitude estimate. Some ‘rules’, if you want to play with these the way I would:

- don’t look up information;
- don’t make precise calculations using calculator or computer;
- be imprecise — there are 400 days in a year, people are 2m tall, etc.;
- round numbers where possible and calculate in your head.

One approach is to estimate by bounding – come up with numbers that are definitely too small and too large, and then use an estimate that is an average of these. But which average?

Say I think some quantity is bigger than 2 but smaller than 400. The arithmetic mean would be $\mathrm{AM}(2,400)=\frac{2+400}{2}=201$. The geometric mean would be $ \mathrm{GM}(2,400)=\sqrt{2\times 400} = 28.28\!\ldots$.

Which is a better estimate? The arithmetic mean is half the upper bound, but 100 times the lower bound. On this basis, for an ‘order of magnitude’-type estimate, you might agree that the geometric mean is a better average to use here. Following my Maths Jam talk, Rob Low said that the geometric mean makes more sense for an order of magnitude estimate, since it corresponds to the arithmetic mean of logs. To see this, consider \[

\begin{align*}

\log(\mathrm{GM}(A, B)) &= \log(\sqrt{AB}) \\

&= \log((AB)^{\frac{1}{2}}) \\

&= \frac{1}{2}\log(AB) \\

&= \frac{1}{2}(\log(A) + \log(B)) = \mathrm{AM}(\log(A), \log(B)) \text{.}

\end{align*}

\]

So, geometric mean it is. However, taking a square root is not usually easy in your head, and we want to avoid making precise calculations by calculator or computer. Enter the approximate geometric mean.

### Approximate Geometric Mean

For the approximate geometric mean, take $2=2 \times 10^0$ and $400=4 \times 10^2$, then the AGM of $2$ and $400$ is: \[ \begin{align*}

\frac{2+4}{2} \times 10^{\frac{0+2}{2}} &= 3 \times 10^1\\

&= 30 \approx 28.28\!\ldots = \sqrt{2\times 400} = \mathrm{GM}(2,400) \text{.}

\end{align*} \]

Why does this work? Let $A=a \times 10^x$ and $B=b \times 10^y$. Then \[

\begin{align*}

\mathrm{GM}(A,B)=\sqrt{AB}&=\sqrt{ab \times 10^{x+y}}\\

&=\sqrt{ab} \times 10^{\frac{x+y}{2}} \text{,}

\end{align*}

\]

and \[\mathrm{AGM}(A,B) = \frac{a+b}{2} \times 10^{\frac{x+y}{2}}\text{.}\]

Setting aside the $10^{\frac{x+y}{2}}$ term, which appears in both averages, is it obvious that, for single digit numbers $>0$, \[\mathrm{GM}(a,b)=\sqrt{ab} \approx \frac{a+b}{2}=\mathrm{AM}(a,b) \text{?} \]

There is a standard result that says \[ \begin{align*}

0 \le (x-y)^2 &= x^2 – 2xy + y^2\\

&= x^2 + 2xy + y^2 – 4xy\\

&= (x+y)^2 – 4xy \text{.}

\end{align*} \]

Hence \[ \begin{align*}

4xy &\le (x+y)^2\\

\sqrt{xy} &\le \frac{x+y}{2} \text{,}

\end{align*} \]

with equality iff $x=y$. So $\mathrm{GM}(a,b)\le\mathrm{AM}(a,b)$, but are they necessarily close?

By exhaustion, it is straightforward to show (for single-digit integers, given the rule to round numbers where possible) that the largest error occurs when $a=1$ and $b=9$. Then \[ \sqrt{1 \times 9} = 3 \ne 5 = \frac{1+9}{2} \] and the error is $2$ which, relative to the biggest number $9$ might be seen as quite significant.

I’d say you are not likely to use this method if the numbers are of the same order of magnitude, because the idea is to come up with fairly wild approximations and if they were quite close it might be sensible to think of them as not really different. Then the error is going to be at least one order of magnitude smaller than the upper bound, i.e. $10^\frac{x+y}{2} \ll 10^y$. For example, if your numbers were $1$ and $900$ (as a pretty bad case), then: \[ \mathrm{GM}(1,900)=\sqrt{900}=30 \ne 50=\mathrm{AGM}(1,900) \] and a difference of $20$ on a top value of $900$ is not as significant as a difference of $2$ was on a top value of $9$.

So I suppose I would argue that this makes the error relatively insignificant. However, this thinking left me somewhat unsatisfied. I felt there ought to be a nicer way to demonstrate why the approximate geometric mean works as an approximation for the geometric mean. Following my talk at Maths Jam, Philipp Reinhard has been thinking about this, and he will share his thoughts in a post here in a few days (the post is now online).

### One edge case

I didn’t have time to fit into my talk what I would recommend if the two numbers differed by an odd number of orders of magnitude. For example, $\mathrm{AGM}(1,1000)$ generates another square root in $1 \times 10^{\frac{3}{2}}$ – precisely what we were trying to avoid! What I have recommended to students is to simply rewrite one of the numbers so that the difference in exponents is even. For example, writing $1=1 \times 10^0$ and $1000 = 10 \times 10^2$ gives \[\mathrm{AGM}(1,1000)=5.5 \times 10^{1} \text{.}\]

Following Maths Jam, the esteemed Colin Beveridge made the sensible suggestion of just treating $10^{\frac{1}{2}}$ as $3$, making \[

\begin{align*}

&\mathrm{AGM}(1,1000)\\

&= 1 \times 10^{\frac{3}{2}}\\

&\approx 1 \times 3^3 = 27\text{.}

\end{align*}

\]

This increases our problems, though, because we have the potential to deal with larger differences (hence larger errors) than when dealing with single-digit numbers. Actually, it was wondering why this increased error happens that got me thinking seriously on this topic in the first place. I’ll stop now to let Philipp share what he has been thinking on this.

## One Response to “Approaching Fermi problems with the approximate geometric mean”