# Problem with the mean

1. Apr 22, 2013

### trenekas

Suppose that you playing the game. You have n moves. on each move you win the game with probability p. Your winning amount is equal to move number. For example if you win in first move your winning amount is 1, if you win in n move, your winning amount is equal to n, and if you not win, your winning amount is 0. Need to prove that average winning amount is: (1+n(1-p)^n+1-(n+1)(1-p)^n)/p

My try:

1/n $\sum$ k*p(1-p)^k-1, for k=1 to n.
And tryed to do something but nothing goes on. For example:
1/n(n*p*(1-p)^n-1+(n-1)*p*(1-p)^n-2+...+(n-n+1)*p*(1-p)n-n
but cant get the right answer.
Thanks for helping.

2. Apr 22, 2013

### tiny-tim

hello trenekas!

(try using the X2 button just above the Reply box )

what is ∑ kak-1 ?

(and why are you dividing by n ?)

3. Apr 23, 2013

### trenekas

ok i dont need divide by n :) :D but later ill try to solve that because now i'm in the university lol. when i'll back home :D

4. Apr 23, 2013

### trenekas

Last edited: Apr 23, 2013
5. Apr 23, 2013

### tiny-tim

what does kak-1 remind you of?

6. Apr 23, 2013

### trenekas

derivative of a^k:D ok thanks. now ill try myself.

Last edited: Apr 23, 2013
7. Apr 23, 2013

### trenekas

ok. its time to ask the help :D
after few rearrangements:
p * Ʃ k(1-p)k-1
So k(1-p)k-1=((1-p)k)'
First of all i calculated the sum of ((1-p)k)
Ʃ((1-p)k)= (1-(1-p)n+1)/p
When calculated derivative of that:
-(n+1)(1-p)n*p-1(1-(1-p)n+1)/p2
And all this multiply by p.
And i got:
-(n+1)(1-p)n*p-1(1-(1-p)n+1)/p=-(n+1)(1-p)n*p-1+(1-p)n+1)/p
but it is different than i need to get. Where is mistake? Or no mistake? Thanks

8. Apr 23, 2013

### tiny-tim

hi trenekas!

it's a bit difficult to tell, because you're using 1-p instead of a,

but i think if you replace the p in …
by p-1, and then adjust the rest to make up for it, you'll get the same as wolfram

9. Apr 23, 2013

### trenekas

but i cant replace because of rules of composition functions. maybe somwhere else is mistake.

10. Apr 23, 2013

### tiny-tim

yes you can, just subtract (n+1)(1-p)n from the first part, and add it to the second part (total zero)

11. Apr 23, 2013

### trenekas

oh :D thanks!