recursive mean computation

3.3k Views Asked by At

Wondering if someone can help my feeble mind understand one part of the formula shown below:

$$\mu_k = {1\over k}\sum_{j=1}^{k} x_j \tag 1$$ $$ = {1\over k} \left( x_k + \sum_{j=1}^{k-1}x_j \right) \tag 2$$ $$= {1\over k} \left(x_k + (k-1)\mu_{k-1} \right) \tag 3$$ $$ = \mu_{k-1} + {1\over k} \left(x_k - \mu_{k-1} \right) \tag 4$$

so to expand more on where my confusion is I understand algebriaclly how to get from 1 to 2, and from 3 to 4, it's going from 2 to 3 where I lack understanding, specifically, how does:

$$\sum_{j=1}^{k-1}x_j = (k-1)\mu_{k-1}$$

I have the feel that it is related to it's recursive nature, or maybe I'm just totally confused. Could someone please explain this to me?

EDIT:

thanks to the comments it's done by using the definition of $\mu_{k-1}$

$$\mu_{k-1} = {1\over (k-1)}\sum_{j=1}^{k-1}x_j$$

so indeed it is equal:

$$ \sum_{j=1}^{k-1}x_j = (1-k)* {1\over (k-1)}\sum_{j=1}^{k-1}x_j$$

2

There are 2 best solutions below

0
On BEST ANSWER

From your definition you have \begin{equation*} \mu_{k-1}=\frac{1}{k-1}\sum_{j=1}^{k-1}x_{j} \iff (k-1)\mu_{k-1}=\sum_{j=1}^{k-1}x_{j} \end{equation*}

0
On

$$\sum_{j=1}^{k-1}x_j = (k-1)\mu_{k-1}\iff \mu_{k-1}= \frac {\sum_{j=1}^{k-1}x_j}{(k-1)}$$

That is the definition of $\mu_{k-1}$