Is there any way to calculate one? If it't not clear what I mean, here's an example:
Starting with an initial value, keep multiplying it by some random amount on the interval [1, 2] at regular intervals, indefinitely.
What if you want to compute the expected value of the product after a given amount of time.
If it was randomly multiplying by a discrete set of values (1, 1.1, 1.2, ..., 2), then we'd need only take the 11th root of the product of these 11 values. (geometric mean)
But if it's varying continuously on 1 + continuum, then I don't see a straightforward way to compute the expected factor.
I wrote a program in python that tries to approximate this:
parameters
startInterval = 1 endInterval = 2 numSubIntervals = 1000000
variables
product = 1 intervalStep = (float(endInterval) - float(startInterval))/numSubIntervals exponent = float(1)/numSubIntervals
calculation
for i in range(1, numSubIntervals+1): product = product * pow((startInterval + intervalStep*i), exponent)
output
print "geometric mean of the interval (", startInterval, ", ", endInterval, ") is ", product
And as far as I can test, this works.
But is there some formula or more simplistic approach to this computation?
The logarithm of the geometric mean should be the arithmetic mean of the logarithms. (If the random points are uniformly distributed, the logarithm of the experimental geometric mean converges to the integral of the logarithm divided by the length of the interval.) So the formula is
$$\begin{align} \exp \left(\frac{1}{b-a}\int_a^b\log x\,dx\right) &= \exp \left(\left[\frac{x\log x - x}{b-a}\right]_a^b \right)\\ &= \exp \left(\frac{b\log b - a\log a}{b-a} - 1\right)\\ &= \frac{1}{e} \left(\frac{b^b}{a^a}\right)^{1/(b-a)}\\ &= \frac{b^{b/(b-a)}}{e\cdot a^{a/(b-a)}}. \end{align}$$