# Thread: Show that E(X)=np

1. ## Show that E(X)=np

Show that E(X)=np when X is a binomial random variable.

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

We need to factor out np and change the limits to n-1

I get $\displaystyle np\sum_{x=1}^{n-1}x(1-p)^{x-1}$

Now let y=x-1 so we get $\displaystyle np\sum_{y=0}^{n-1}(y+1)(1-p)^{y}$

Here's where I get stuck. Could anyone show me how to arrange this into a sum of the geometric series? All hints are welcome.

2. Originally Posted by oldguynewstudent
$\displaystyle E(X)=\sum_{x=1}^{n}xp(1-p)^{x-1}$
Where did this come from? I think it should be

$\displaystyle \displaystyle E(X)=\sum_{k=1}^{n}k\binom{n}{k}p^k(1-p)^{n-k}$

Edit: Actually though I think the answer can be gotten in the manner of this post. I think you'll just end up with $\displaystyle \displaystyle\sum_{k=1}^n p$

3. 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.

4. 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.
Thank you for the quick response. Yes I did have it stated incorrectly. The professor went through the whole chapter in one lecture and it was scheduled for 2 lectures in the syllabus so I am a little behind on this. Attached is the definition in the book and the problem.

With this in mind, can you give me a hint on how to factor out np ( p is already factored out) and get the limits to y=0 to y=n-1? That is where I am having trouble. Thanks.

5. That isn't the definition of the binomial pmf, it's the definition of the geometric pmf. The summation you want to calculate is the one posted by undefined.

6. Originally Posted by theodds
That isn't the definition of the binomial pmf, it's the definition of the geometric pmf. The summation you want to calculate is the one posted by undefined.
Thank you so much for clearing this up. I must really concentrate on my combinatorics class now, since those problems are due tomorrow and this isn't due until next Wed. I will try to get back to this later tonight. I really appreciate all the help I get from the wonderful people here.

7. Why not use the MGF instead here.
Have you covered that yet?

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# e(x)=np from pdf

Click on a term to search for related topics.