How to find $P(X=r)$ from probability generating function of $X$?

I have a probability generating function

$$G_X(s) = \frac{p+ps}{1-s+p+ps}$$

and I need to find $P(X=r)$.

How do I get this from the probability generating function? I was thinking about finding the Mac Laurin expansion of $G_X(s)$ and finding the general formula for the coefficient of $s^r$, but that's proving very difficult.

Thanks

• The derivatives get more and more complicated each time, so finding a general rth derivative is looking quite hard :( is there any other way? Dec 20 '13 at 15:22

The Maclaurin expansion idea is good. Note that if we find the expansion of $\frac{1}{1-s+p+ps}$, multiplying this by $p(1+s)$ will not be difficult.
Rewrite the bottom as $1+p-s(1-p)$, and then as $(1+p)\left(1-s\frac{1-p}{1+p}\right)$. To make things look nicer, let $a=\frac{1-p}{1+p}$. Then we have $$\frac{1}{1-s+p+ps}=\frac{1}{1+p}\cdot\frac{1}{1-as}.$$ But $$\frac{1}{1-as}=1+as+a^2s^2+a^3s^3+a^4s^4+\cdots$$ (geometric series).