Results 1 to 3 of 3

Thread: Second moment of geometric random variable

  1. #1
    Newbie
    Joined
    Nov 2017
    From
    Canada
    Posts
    2

    Second moment of geometric random variable

    If we define the geometric pmf as P(X = x) = (1-p)^{x-1} p, the second moment of a geometric random variable should be (2-p)/p^2. However, when I try to derive it, I'm getting 2(1-p)/p^2. Can somebody help me find the error in my derivation?

    Let q = 1-p.

    E(X^2) = \sum_{x=1}^\infty x^2 (1-p)^{x-1} p = \sum_{x=1}^\infty x^2 q^{x-1} p =\sum_{x=1}^\infty x \large( \dfrac{d}{dq} q^x \large) p = p \dfrac{d}{dq} \sum_{x=1}^\infty x q^x
    = pq \dfrac{d}{dq} \sum_{x=1}^\infty x q^{x-1} = pq \dfrac{d}{dq} \sum_{x=1}^\infty \dfrac{d}{dq} (q^x) = pq \dfrac{d^2}{dq^2} \sum_{x=1}^\infty q^x = pq \dfrac{d^2}{dq^2} \large( \dfrac{q}{1-q} \large)
    = pq \dfrac{d}{dq} [(1-q)^{-2}] = 2pq(1-q)^{-3} = \dfrac{2pq}{p^3} = \dfrac{2(1-p)}{p^2}
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Nov 2017
    From
    Canada
    Posts
    2

    Re: Second moment of geometric random variable

    I realize my error. In the second line, I took the q outside of the derivative with respect to q.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,923
    Thanks
    2491

    Re: Second moment of geometric random variable

    $\displaystyle \sum \limits_{x=1}^\infty ~x\left(\dfrac{d}{dq}~q^x\right)p \neq p \dfrac {d}{dq}\left( \displaystyle \sum \limits_{x=1}^\infty~x q^x\right)$

    what you probably have to do is

    $\displaystyle \sum \limits_{x=1}^\infty ~x^2 q^{x-1}p =

    \displaystyle p\sum \limits_{x=1}^\infty~\left(q \dfrac{d^2}{{dq}^2}\left(q^x\right) + \dfrac{d}{dq}\left(q^x\right)\right)$

    and proceed as you did before.

    a minor nit: One doesn't use $x$ for integer variables. Use $i,j,k,m,n$ instead
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Moment Generating Function of Standard Normal random variable
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: Apr 22nd 2013, 05:30 AM
  2. Replies: 1
    Last Post: Mar 24th 2012, 11:06 AM
  3. Geometric Random Variable
    Posted in the Statistics Forum
    Replies: 6
    Last Post: Nov 8th 2010, 12:15 PM
  4. Geometric Random Variable.
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: May 22nd 2010, 09:52 PM
  5. Geometric random variable
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: Aug 11th 2009, 02:48 AM

/mathhelpforum @mathhelpforum