Originally Posted by

**theodds** If $\displaystyle X$ is binomial, then the summation is wrong; your pmf has the kernal of a geometric random variable, but if $\displaystyle X$ is really geometric then you need to be summing over the positive integers.

I'll assume you actually want to find $\displaystyle EX$ for geometric X; what you want to calculate is

$\displaystyle E(X) = \sum_{x = 1} ^ \infty x p (1 - p) ^ {x-1} $

In which case the gimmick is to notice that $\displaystyle

x(1-p)^{x - 1} = -\frac{d}{dp}(1-p)^x .

$

The idea behind this is to interchange the infinite sum and the taking of the derivative, which is justified, though you would have to take a course in real analysis to see why.

If you really do want to calculate the expected value of a binomial, your pmf is totally wrong, and it would probably help if you used the right one, i.e. what undefined posted.