# Calculate Probability Given Probability Generating Function

I've come across a statistics problem that I can't seem to figure out how to solve:

"A certain discrete random variable has probability generating function: $$\pi_x(q) = \dfrac{1}{3}\dfrac{2+q}{2-q}$$ Compute p(x) for x = 0,1,2,3,4,5. (Hint: the formula for summing a geometric series will help you expand the denominator)."

I'm not entirely sure what sort of answer this problem requires. q is not given, so is it only possible to solve this in terms of q? What would be a good way to start solving this problem (especially since I don't know of any way to solve for p(x) given a probability generating function)? Any help would be greatly appreciated.

-
You're looking for the coefficients of $q^0,q^1,\cdots$ –  user21436 Feb 26 '12 at 3:10

Now recall the definition of the generating function : $$\pi_x(q) = \sum_{k=0}^{\infty} \mathbb P(X = k) q^k.$$ By unicity of generating functions you gain $\mathbb P(X = k) = \frac 1{3 \cdot 2^{k-1}}$ if $k \ge 1$, and $\mathbb P(X = 0) = \frac 13$.