Problem on deriving $E(x)$ of a geometric distribution

74 Views Asked by At

I want to derive the result that for a geometric distribution $$X \sim Geo(p)$$ The expected value is equal to $$E(x)=\frac{1}{p}$$

I have started off by using the definition of $E(x)$ being the mean

$$E(x)=\sum xP_x$$

And we can write $\sum xP_x$ as

$$\sum xP_x= p + 2qp + 3q^2p + 4q^3p......+ nq^{n-1}p $$

Multiplying $\sum xP_x$ by $q$ and then taking the difference of the two expressions

$$\left[\sum xP_x= p + 2qp + 3q^2p + 4q^3p......+ nq^{n-1}p \right] $$

$$-\left[ q\sum xP_x= qp + 2q^2p + 3q^3p + 4q^4p......+ (n-1)q^{n-1}p + nq^np \right]$$ $$\text{_________________________________________________________________}$$ $$\sum xP_x \left(1-q \right)=p+qp+q^2p.....+q^{n-1}p +nq^np$$ $$\text{_________________________________________________________________}$$

From here we can see that the right hand side excluding the last term forms the sum of a geometric progression hence we can use the formula for the sum of first $n$ terms of a geometric progression which is in this case $$\frac{p(1-q^n)}{1-q}$$ $$\because p=1-q$$ $$\therefore \frac{p(1-q^n)}{1-q} \iff 1-q^n$$

Now the expression simplifies to $$\sum xP_x \left(1-q \right)= 1-q^n + nq^np$$ $$\sum xP_x \left(1-q \right)= 1-q^n + nq^n(1-q)$$ $$\sum xP_x \left(1-q \right)= 1-q^n + nq^n - nq^{n+1}$$

At this point it is apparent I have made a mistake somewhere as even by simplifying it further

$$\sum xP_x \left(1-q \right)= 1-q^n(1 + n - nq)$$ $$\sum xP_x \left(1-q \right)= 1-q^n(1 + n(1 - q))$$ $$\sum xP_x = \frac{1-q^n(1 + np)}{\left(1-q \right)}$$

And I have no clue on how to proceed, where have I messed up or have I taken a wrong method entirely?

3

There are 3 best solutions below

3
On BEST ANSWER

there is a very simple way to do that:

$$\mathbb{E}[X]=\sum_{x=1}^{\infty}xpq^{x-1}=p\sum_{x=1}^{\infty}xq^{x-1}=$$

$$=p\sum_{x=1}^{\infty}\frac{d}{dq}q^x=p\frac{d}{dq}\sum_{x=1}^{\infty}q^x=$$

$$=p\frac{d}{dq}\frac{q}{1-q}=p\frac{1}{(1-q)^2}=\frac{1}{p}$$


Doing in your manner you get

$$\mathbb{E}[X]=p+2pq+3pq^2+4pq^3+\dots=p[1+2q+3q^2+4q^3+\dots]=pS$$

Now let's focus on the sum S

$$S=1+2q+3q^2+4q^3+\dots$$

$$Sq=q+2q^2+3q^3+4q^4+\dots$$

Subtracting member to member you get

$$S(1-q)=1+q+q^2+q^3+\dots$$

remembering the sum of a geometric series you immediately get

$$S(1-q)=\frac{1}{1-q}$$

thus

$$\mathbb{E}[X]=pS=\frac{p}{(1-q)^2}=\frac{1}{p}$$

2
On

There are four issues that I can see:

  1. $\sum xP_x \left(1-q \right)=p+qp+q^2p.....+q^{n-1}p +nq^np$ should have the last term as $-nq^p$.
  2. Your simplifications with $\frac{p(1-q^n)}{1-q}$ to $1-q^n$ are not valid because you can't multiply and divide terms by arbitrary things. I think you're trying to rearrange as if it were $\frac{p(1-q^n)}{1-q}=0$.
  3. What is $q$? If it is $1-p$ (as the symbol would generally be used to mean in this context) then you can simplify all cases of $1-q$ to $p$ and all $1-p$ to $q$.
  4. The sum shouldn't be up to $n$ in the first place, but infinite (from $k=1$ to $\infty$), because a geometric random variable can have arbitrarily large value rather than a maximum value of $n$.

Does this give you enough information to make another attempt?

0
On

The geometric distribution has two forms, the expectation you seek is for the form with probability mass function: $f_x(x)=p(1-p)^{x-1}, x=1,2,3,4,....$ By definition, this expectation is computed as: $$\mathbb{E}[x]=\sum_{x\geq1}xp(1-p)^{x-1}$$ We can then simplify this with the steps below: $$\mathbb{E}[x]=\sum_{x=1}^{\infty}xp(1-p)^{x-1}$$ $$\mathbb{E}[x]=\sum_{x=1}^{\infty}\dfrac{p}{(1-p)}\times x(1-p)^x$$ $$\mathbb{E}[x]=\dfrac{p}{(1-p)}\sum_{x=1}^{\infty}x(1-p)^x$$ But note that, $$\sum_{x=1}^{\infty}x(1-p)^x=(1-p)+2(1-p)^2+3(1-p)^3+4(1-p)^4+....$$ $$\sum_{x=1}^{\infty}x(1-p)^x=(1-p)[1+2(1-p)+3(1-p)^2+4(1-p)^3+.....]$$ $$\sum_{x=1}^{\infty}x(1-p)^x=(1-p)[1+(1-p)+(1-p)^2+(1-p)^3+...+(1-p)+2(1-p)^2+3(1-p)^3+...]$$ Observe that $1+(1-p)+(1-p)^2+(1-p)^3+...$ is a geometric series with common ratio $(1-p)$ and first term 1. Hence the sum to infinity is given by $\dfrac{a}{1-r}=\dfrac{1}{p}$. Also, $(1-p)+2(1-p)^2+3(1-p)^3+...=\sum_{x=1}^{\infty}x(1-p)^x$ hence, we have that:$$\sum_{x=1}^{\infty}x(1-p)^x=(1-p)[\dfrac{1}{p}+\sum_{x=1}^{\infty}x(1-p)^x]$$ Thus, $$\sum_{x=1}^{\infty}x(1-p)^x-(1-p)\sum_{x=1}^{\infty}x(1-p)^x=\dfrac{1-p}{p}$$ $$[1-(1-p)]\sum_{x=1}^{\infty}x(1-p)^x=\dfrac{1-p}{p}$$ $$p\sum_{x=1}^{\infty}x(1-p)^x=\dfrac{1-p}{p}$$ $$\sum_{x=1}^{\infty}x(1-p)^x=\dfrac{1-p}{p^2}$$ Now recall that $$\mathbb{E}[x]=\dfrac{p}{(1-p)}\sum_{x=1}^{\infty}x(1-p)^x$$ Hence, $$\mathbb{E}[x]=\dfrac{p}{(1-p)}\times \dfrac{1-p}{p^2}$$ $$\therefore \mathbb{E}[x]=\dfrac{1}{p}$$