Exponentially weighted average, sum of weights

averagegeometric seriessummation

I'm just wondering how to actually prove that the weights of an exponentially weighted average sum to 1, like

$(1-\alpha)^n + \displaystyle\sum_{i=1}^n \alpha (1-\alpha)^{n-i} = 1$

where $\alpha \in (0, 1]$

This is mentioned in Reinforcement Learning, Barto & Sutton, first sentence of p33. Intuitively it holds true but I'd like to understand the proof of it.

Best Answer

First of all you can put $\alpha$ and $(1-\alpha)^n$ in front of the sigma sign:

$$(1-\alpha)^n + (1-\alpha)^{n}\cdot \alpha\sum_{i=1}^n (1-\alpha)^{-i} $$

Factoring out $(1+\alpha)^n$

$$(1-\alpha)^n \left(1+\alpha\sum_{i=1}^n (1-\alpha)^{-i}\right) $$

That means, that the brackets must be $(1-\alpha)^{-n}$, since $(1-\alpha)^n\cdot (1-\alpha)^{-n}=1 \quad (\color{red}*)$

The sum is the partial sum of a $\color{grey}{\textrm{geometric series}}$, where $\sum\limits_{i=1}^n x^i=x\cdot \frac{x^n-1}{x-1}$. Thus

$$1+\alpha\sum_{i=1}^n \left(\frac1{1-\alpha}\right)^{i}=1+\frac{\alpha}{1-\alpha}\frac{\left(\frac1{1-\alpha}\right)^{n}-1}{\frac1{1-\alpha}-1}$$

$(1-a)\cdot \left( \frac1{1-\alpha}-1\right)=1-1+a=a$. Therefore the denominator is $\alpha$.

$$1+\alpha\frac{\left(\frac1{1-\alpha}\right)^{n}-1}{\alpha}=1+\left(\frac1{1-\alpha}\right)^{n}-1=\left(\frac1{1-\alpha}\right)^{n}=(1-\alpha)^{-n}$$

This is was we wanted at $(\color{red}*)$

Related Question