# How do you find the Probability Generating Function?

## Homework Statement

Consider a branching process with branching probabilities given by P0=1/2 and Pj=1/3$$^{j}$$ for j $$\geq$$ 1

Find the probability generating function: $$\sum^{\infty}_{n=0} p_{n}x^{n}$$

## The Attempt at a Solution

Now, the answer is supposed to be G(x) = (x+3)/(2(3-x)), but I really have no idea how to get this answer. I've checked it up on the internet and haven't found anything that looks even vaguely helpful, and since I'm only meeting my tutor later in the week I'm pretty much stuck on my own for this one. Is there some sort of formula you can use to find the probability generating function? If possible, could you please show me how to get that answer from the given data?

Thanks in advance.

## Answers and Replies

$$G(x) = \frac {1}{2} + \frac {1}{3} x + \frac {1}{9} x^{2} + \frac {1}{27} x^{3} + ...$$

$$1 + \frac {1}{3} x + \frac {1}{9} x^{2} + \frac {1}{27} x^{3} + ... = \frac {1}{1 - \frac {x}{3}} = \frac {3}{3 - x }$$

$$G(x) = \frac {3} {3-x} - \frac {1}{2} = \frac {x+3}{2(3-x)}$$

Thanks for the quick reply! I just have two questions: In the second line, is it supposed to be 1/2 or 1? And in the third line, you're basically just subtracting the p0 value from G(x) right?

Thanks for the help.

Thanks for the quick reply! I just have two questions: In the second line, is it supposed to be 1/2 or 1? And in the third line, you're basically just subtracting the p0 value from G(x) right?

Thanks for the help.

The second line is a geometric series. But it's 1/2 more than what we want.

Last edited:
Sorry I just have one more question - does this mean that for p0= 1/3, p1=1/4, p2=1/6 and pn=1/2^n that the probability generating function is equal to -(7x-6)/(4(x-2)) + 1/3 + (1/4)x + (1/6)x^2?

Also, if it is incorrect, could someone please show me the correct method? For some reason I'm having a fair bit of difficulty getting my mind around this...

Thanks in advance.

Are you saying that $$p_{n}= (\frac {1}{2})^{n}$$ for n > 2?

Then your answer is correct if $$\sum^{\infty}_{3}p_{n}x^{n} = -\frac {7x-6}{4(x-2)}$$

but that's not what I'm getting

Last edited:
Sorry about that! I forgot about that part - it is pn=1/2^n for n $$\geq$$ 3. Thanks for all the help Random Variable, I appreciate it (all this Generating Function stuff is going to be on an exam coming up in a few weeks...)

I'm getting $$\frac {x^{3}}{4(2-x)}$$

Really? I think you might be right, because I can remember hearing that that was the answer...

I originally thought that (using the data), I could create a probability generating function with a/(1-a) - 1/3 - 1/4 - 1/6, with a = x/2

Do you know where I have gone wrong, (or if I even have the right equation...?) >_<

see below

Last edited:
We know $$1 + \frac {1}{2} x + \frac {1}{4} x^{2} + \frac {1}{8} x^{3} + \frac {1}{16}x^{4} + ... = \frac {1}{1 - \frac {x}{2}}$$ (infinite geometric series with common ratio x/2 and first term of 1)

What we want is $$\frac {1}{8} x^{3} + \frac {1}{16} x^{4} + \frac {1}{32}x^5+ ...$$

so subtract the terms we don't want

$$\frac {1}{1 - \frac {x}{2}} - 1 - \frac {1}{2}x - \frac {1}{4}x^2$$

Last edited:
As a side note, to find the mean of a discrete probability distribution, take the derivative of the associated probability generating function and evaluate it at x=1.

Wow, I think I finally understand how to do it now. Thanks for all the help Random Variable, you managed to explain the probability generating function to me better than my tutor =D

And if you take the second derivative of a probability generating function and evaluate it at x=1, you'll get

$$E(X(X-1)) = E(X^{2}) - E(X) = E(X^{2}) - \mu$$

and since $$V(X) = E[(X- \mu)^{2}] = E(X^{2}) - \mu^2$$

$$V(X) = E(X(X-1)) + \mu -\mu^{2}$$