Exercise 5.10 Derive the weighted-average update rule (5.8) from (5.7). Follow the pattern of the derivation of the unweighted rule (2.3)
According to:
Vn≐∑k=1n−1WkGk∑k=1n−1Wk,n≥2(5.7)
V_{n} \doteq \frac{\sum_{k=1}^{n - 1}W_k G_k}{\sum_{k=1}^{n - 1}W_k} \text{,} \qquad n \geq 2 \qquad \text{(5.7)} \\
Vn≐∑k=1n−1Wk∑k=1n−1WkGk,n≥2(5.7)
and denote CnC_nCn as the weights given to the first n returns. So formula (5.7) is transferred to:
Vn≐∑k=1n−1WkGkCn−1,n≥2
V_{n} \doteq \frac{\sum_{k=1}^{n - 1}W_k G_k}{C_{n-1}} \text{,} \qquad n \geq 2
Vn≐Cn−1∑k=1n−1WkGk,n≥2
then we have:
Vn+1≐∑k=1nWkGkCn,n≥1
V_{n+1} \doteq \frac{\sum_{k=1}^{n}W_k G_k}{C_n} \text{,} \qquad n \geq 1
Vn+1≐Cn∑k=1nWkGk,n≥1
∴Vn+1=∑k=1n−1WkGkCn+WnGnCn=Cn−1CnVn+WnGnCn=(1−WnCn)Vn+WnGnCn=Vn+WnCn(Gn−Vn),n≥1,(5.8)
\begin{aligned}
\therefore V_{n+1} &= \frac{\sum_{k=1}^{n - 1}W_k G_k}{C_n}+\frac{W_nG_n}{C_n}\\
&=\frac{C_{n-1}}{C_{n}} V_n +\frac{W_nG_n}{C_n} \\
&= (1 - \frac{W_n}{C_n})V_n + \frac{W_nG_n}{C_n} \\
&=V_n + \frac{W_n}{C_n}(G_n - V_n), \qquad n \geq 1, \qquad \text{(5.8)}
\end{aligned}
∴Vn+1=Cn∑k=1n−1WkGk+CnWnGn=CnCn−1Vn+CnWnGn=(1−CnWn)Vn+CnWnGn=Vn+CnWn(Gn−Vn),n≥1,(5.8)
This derivation is very easy.