Exponentially weighted Average

I have a kind of confusion about the linkage of (beta) with the number of days. While explaining the exponential curve, prof Andrew says with (beta =0.9) the value of the curve falls down to 1/3 of the initial value within 10 days. I don’t understand what’s with 1/3 and how it comes in the picture. If someone can please throw a light on it in layman’s words I’ll be highly grateful.

This is just an “exponentially weighted moving average”. That’s a standard concept. I think the “rule of thumb” is that it basically approximates an average over the last 1/(1 - beta) terms. Googling “exponentially weighted moving average” will get you plenty of hits. As you compute more terms, the earlier terms get multiplied by beta^n. So for example with beta = 0.9, try computing the powers of beta. Then just work out the first few cycles and it should become pretty intuitive what is going on.

0.9^2 = 0.81
0.9^3 = 0.729
0.9^4 = 0.65

0.9^8 = 0.43

0.9^10 = 0.349

You can see where this is going …

2 Likes

Thank you, I totally understand the process of achieving 1/3- as you clearly displayed we’re heading towards 0.33 which is nothing but 1/3 of the initial value after 10 days. I’m more concerned about the significance of this 1/3, what does it mean/justify?
Hoping to hear from you

Hi, @deepNewbie.

It’s just meant to give you an approximate idea. My understanding is that 1/e (roughly 1/3) was chosen for convenience, since:

It’s easy to compute and, by that point, the contribution of additional terms is small enough and only gets exponentially smaller, as @paulinpaloalto showed you.

2 Likes

There is no special significance or deep meaning to the value 1/3. That just happens to be approximately what you get when you take 0.9^10. With a different beta value, you’ll get a different multiplier for the early terms after 10 iterations or some other number of iterations. E.g. 0.8^10 = 0.1, so the influence of the early terms fades even more quickly. The point is that the beta value matters, right? The relationship that @nramon points out is what happens in the limit as epsilon → 0. You can try some examples:

0.9^(1/0.1) = 0.35
0.8^(1/0.2) = 0.32
0.6^(1/0.4) = 0.28

0.99^(1/0.01) = 0.3660
0.999^(1/0.001) = 0.3677

1/e = 0.3679…

3 Likes

Agreed, @paulinpaloalto. The lecture clearly states this is
just a useful approximation

2 Likes

You’re right that there is actually a mathematical relationship there, as expressed by the formula you gave. But from a practical point of view, it’s just a “rule of thumb” as you say. In any particular case, we just need to fiddle with the beta value to get the behavior we want.

2 Likes

@paulinpaloalto @nramon Thank you, I got it.

1 Like