# Prove that the following running average is monotonically decreasing

Let $$S_n$$ be defined as $$\frac{1}{n}\sum_{t=1}^{t=n} [x^2+(p-q)x]$$ where $$x = 1-(1-p-q)^t$$. We want to find the conditions on $$p$$ and $$q$$ such that $$S_n$$ is monotonically decreasing for all $$n$$. $$0 < p,q < 1$$ and $$0 < 1-p-q < 1$$.

Note: Till now I have tried to get a closed bound expression for $$S_n$$ and differentiate it w.r.t. $$n$$ to get the conditions for a negative slope but it is getting really complex.

Another approach was to reduce this expression to the sum $$S_n = C (>0) + \frac{1}{n}\left[q\sum_{t=1}^{n} \lambda^{2t} + (p-q) \sum_{t=1}^{n} \lambda^t \right]$$ where $$\lambda=1-p-q$$. We know the upper bounds of the two sums, and since the denominator grows more rapidly than the numerator, it is sufficient to show that the numerator is positive to get a monotonically decreasing sequence.

• $p\geq q$ is a sufficient condition. Sep 6, 2020 at 10:34
• If $p\leq q$, you can rewrite the questions with $a=p+q$, and $b=q-p$, and the condition $1\geq a\geq b\geq 0$. Sep 6, 2020 at 10:41

$$S_n$$ is always increasing in $$n$$. Note that $$x$$ is increasing in $$t$$; therefore, if $$p\geq q$$, then $$x^2+(p-q)x$$ is increasing in $$t$$.
If $$q > p$$, then you can set $$a=1-p-q$$, and $$b=1-p+q$$. The condition is $$0, and $$x^2+(p-q)x=x(x-1+b)=(1-a^t)(b-a^t)$$, which is increasing in $$t$$.
• Hi Ron, Thanks for the insights. I can't see how you have taken the $\frac{1}{n}$ factor into account. $x^2 + (p-q)x$ is increasing in $t$, therefore its summation is also increasing in $t$ but won't the $n$ factor in the denominator attenuate it? Sep 6, 2020 at 12:41