Solved – Show that for a Geometric distribution, the probability generating function is given by $\frac{ps}{1-qs}$, $q=1-p$

geometric-distributionprobabilityself-study

Suppose that $X$ has a geometric distribution with probability mass function $P(X=x) = q^{i-1}p$, $i=1,2,…$ and $q=1-p$

Show that its probability generating function is given by $ \pi(s)=\frac{ps}{1-qs}$. Hence show that $E(x)=\frac{1}{p}$ and $Var(X)=\frac{q}{p^2}$

Hi everyone, I am doing this question for exam practice, and I can't seem to get the correct answer. And to be honest, I am just working through it mechanically and don't have a great understanding of the probability generating functions.

Here is what I have:

$$\pi(s)=E(S^X)=\sum^\infty_{i=0}q^{i-1}p\cdot s^i$$
$$= p\sum^\infty_{i=0}q^{i-1}\cdot s^i=p\sum^\infty_{i=0}\frac{q^i}{q}\cdot s^i$$
$$=\frac{p}{q}\sum^\infty_{i=0}(qs)^i$$

Then using the sum of a geometric series formula, I get:

$$=\frac{p}{q}(\frac{1}{1-qs})$$

Now I am stuck. I feel like I am close, but am just missing something. I'll be ok with deriving the expected value and variance once I can get past this part.

As an addition I was wondering if anyone could also give me a bit of an 'idiots' explanation of the probability generating function, as I am struggling to understand it conceptually. $s$ seems to be the dependent variable, but my lecturer hasn't explained what exactly it is.

Many thanks in advance!

Best Answer

It's normal you'd arrive at the wrong answer in this case. The problem is that your index is wrong. There are two definitions for the pdf of a geometric distribution. The one you use, where $E(X)=\frac{1}{p}$ is defined from 1 to infinity. At zero it is not defined. So, the generating function needs to take this into account, as well.

$$\pi(s)=E(S^X)=\sum^\infty_{i=1}q^{i-1}ps^i$$ $$= ps\sum^\infty_{i=1}(qs)^{i-1}=ps\sum^\infty_{i=0}(qs)^i$$ $$=\frac{ps}{1-qs}$$

If you use the alternative definition, where $P(Y=y)=q^ip$, then the pdf is defined at zero. In this case the generating function converges to $\frac{p}{1-qs}$.

As for what $s$ represents, as far as I know it represents nothing. Generating functions are derived functions that hold information in their coefficients. They are sometimes left as an infinite sum, sometimes they have a closed form expression. Take a look at the wikipedia article, which give some examples of how they can be used. Here and here.wiki article probability generating functions and wiki article generating functions