# How do you find the Probability Generating Function?

1. May 24, 2009

### Orphen89

1. The problem statement, all variables and given/known data

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}$$

3. 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?

2. May 24, 2009

### Random Variable

$$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)}$$

3. May 24, 2009

### Orphen89

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.

4. May 24, 2009

### Random Variable

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

Last edited: May 24, 2009
5. May 27, 2009

### Orphen89

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...

6. May 27, 2009

### Random Variable

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: May 27, 2009
7. May 27, 2009

### Orphen89

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...)

8. May 27, 2009

### Random Variable

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

9. May 27, 2009

### Orphen89

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...?) >_<

10. May 27, 2009

### Random Variable

see below

Last edited: May 27, 2009
11. May 27, 2009

### Random Variable

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: May 27, 2009
12. May 27, 2009

### Random Variable

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.

13. May 27, 2009

### Orphen89

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

14. May 28, 2009

### Random Variable

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}$$