Apologies if this is a newbie math comment, as I’m not great at math, but is there a way to calculate a kind of geometric expected value? The geometric mean seems to require positive numbers, and expected values can have negative terms. Also, how would you apply probability weights?
Not in general. As you say, GM requires positive numbers, but there’s a reason for this: imagine GM as log-scaling everything and then performing AM on the results.
So to get the GM of 10 and 1000:
Realize that 10 = 10^1, 1000 = 10^3
Then average 1 and 3 to get 2.
So your result is 10^2=100.
But now notice that:
0.01 is 10^-2
0.00001 is 10^-5
0.0000000001 is 10^-10
0 is 10^[negative infinity]?
-1 is...uh...
and so the GM of 1 million and 0.00000000000000000000000001 is 0.00000000000001, and the GM of 1 billion and 0 is 0. This won’t really lend itself to calculating a GM of a list including a negative number.
One thing you can do, though, which makes sense if you are e.g. calculating your utility as log(your net worth) in various situations, is calculate the GM of [your current net worth + this value].
For instance, if you are considering a gamble that has a 50% chance of gaining you $2000 and a 50% chance of losing you $1000:
If your net worth is $1000, this replaces $1000 with a 50% chance of $3000 and a 50% change of $0. Since GM(3000, 0) = 0, this is worse than just staying with the $1000 .
If your net worth is $2000, this replaces $2000 with a 50% chance of $4000 and a 50% chance of $1000. Since GM(4000, 1000) = 2000, you are indifferent.
If your net worth is $4000, this replaces $4000 with a 50% chance of $6000 and a 50% chance of $3000. Since GM(6000, 3000) ~= 4242, this is better than staying with the $4000.
The geometric expected value for the +100% or −60% gamble in the post is straightforward.
If you gain 100% and then lose 60% (or lose 60% and then gain 100%), overall you’ll end up down 20% from where you started since (1 + 100%) * (1 − 60%) = 2 * 0.4 = 80% = 1 − 20%. This loss is what’s expected over two iterations, so the loss over one iteration is sqrt(80%) = 89.44% = 1 − 10.56%, so the expected loss is that 10.56% of your starting capital per flip.
Nothing says you can’t take the geometric mean of a series that includes negative numbers, just that if you have an even number of elements, but an odd number of negative elements, you’ll get a complex answer.
To weight the elements of your series, you should be able to take the geometric mean of p(X)*X, then divide by the geometric mean of your p(X).
Apologies if this is a newbie math comment, as I’m not great at math, but is there a way to calculate a kind of geometric expected value? The geometric mean seems to require positive numbers, and expected values can have negative terms. Also, how would you apply probability weights?
Not in general. As you say, GM requires positive numbers, but there’s a reason for this: imagine GM as log-scaling everything and then performing AM on the results.
So to get the GM of 10 and 1000:
Realize that 10 = 10^1, 1000 = 10^3
Then average 1 and 3 to get 2.
So your result is 10^2=100.
But now notice that:
0.01 is 10^-2
0.00001 is 10^-5
0.0000000001 is 10^-10
0 is 10^[negative infinity]?
-1 is...uh...
and so the GM of 1 million and 0.00000000000000000000000001 is 0.00000000000001, and the GM of 1 billion and 0 is 0. This won’t really lend itself to calculating a GM of a list including a negative number.
One thing you can do, though, which makes sense if you are e.g. calculating your utility as log(your net worth) in various situations, is calculate the GM of [your current net worth + this value].
For instance, if you are considering a gamble that has a 50% chance of gaining you $2000 and a 50% chance of losing you $1000:
If your net worth is $1000, this replaces $1000 with a 50% chance of $3000 and a 50% change of $0. Since GM(3000, 0) = 0, this is worse than just staying with the $1000 .
If your net worth is $2000, this replaces $2000 with a 50% chance of $4000 and a 50% chance of $1000. Since GM(4000, 1000) = 2000, you are indifferent.
If your net worth is $4000, this replaces $4000 with a 50% chance of $6000 and a 50% chance of $3000. Since GM(6000, 3000) ~= 4242, this is better than staying with the $4000.
The geometric expected value for the +100% or −60% gamble in the post is straightforward.
If you gain 100% and then lose 60% (or lose 60% and then gain 100%), overall you’ll end up down 20% from where you started since (1 + 100%) * (1 − 60%) = 2 * 0.4 = 80% = 1 − 20%. This loss is what’s expected over two iterations, so the loss over one iteration is sqrt(80%) = 89.44% = 1 − 10.56%, so the expected loss is that 10.56% of your starting capital per flip.
https://www.lesswrong.com/posts/DMxe4XKXnjyMEAAGw/the-geometric-expectation
The geometric (and also arithmetic) average is over remaining net worth (divided by initial net worth), which is always positive.
I was also confused about this, so I looked at the code. But you can also figure this out from looking at the graph that starts at 1.
Edit: said something very silly about weighting.
Nothing says you can’t take the geometric mean of a series that includes negative numbers, just that if you have an even number of elements, but an odd number of negative elements, you’ll get a complex answer.
To weight the elements of your series, you should be able to take the geometric mean of p(X)*X, then divide by the geometric mean of your p(X).