User talk:None 8200

a calculation of a sum in Probability when calculating an expectation
$$\sum_{i=1}^n \frac{i}{2^i}=2-\frac{n+2}{2^n}$$

since

let $$S_n=\sum_{i=1}^n \frac{i}{2^i}$$, we have:

$$\frac{1}{2} S_n=\sum_{i=1}^n \frac{i}{2^{i+1}}=\sum_{i=1}^n \frac{i+1}{2^{i+1}}-\sum_{i=1}^n \frac{1}{2^i} = \sum_{i=1}^n \frac{i}{2^{i}}-\frac{1}{2}+\frac{n+1}{2^{n+1}}-\sum_{i=1}^n \frac{1}{2^i}=S_n-\frac{1}{2}+\frac{n+1}{2^{n+1}}-\sum_{i=1}^n \frac{1}{2^i}$$

we have:

$$\frac{1}{2} S_n=S_n-\frac{1}{2}+\frac{n+1}{2^{n+1}}-\sum_{i=1}^n \frac{1}{2^i}$$

Thus

$$\frac{1}{2} S_n=\frac{1}{2}-\frac{n+1}{2^{n+1}}+\sum_{i=1}^n \frac{1}{2^i}$$

and in the end

$$\sum_{i=1}^n \frac{i}{2^i}=2-\frac{n+2}{2^n}$$

This method is only an elemental method, in future we can use generating function in Probability to show it again.

None 8200 (talk) 23:28, 10 September 2008 (UTC)