# Thread:

1. ## probability generating function of a poisson random variable

i should start by asking is anyone on the forum well versed in the coalescent theory?

i have a problem in a derivation

if the number of mutations is given by

$P_n(z) = E exp((z-1)\frac{\theta}{2}(nT_n + ..... + 2T_2))$

as one can see this is the probability generating function of a poisson random variable with random mean. where $\lambda = \frac{\theta}{2}(nT_n + ..... + 2T_2)$

now from here i can write this as a product

so

$P_n(z) = \prod_{j=2}^n E\left(e^{(z-1)\frac{\theta}{2}_j T_j}\right)$

Now im confused what to do. If i have the probability generating function how do i find the density function (derivative?)

the next step in the derivation should be

$P_n(z) = \prod_{j=2}^n \left(1 - (z-1)\cdot \frac{j \theta /2}{j(j-1)/2}\right)^{-1}$

I cant for the life of me figure out how this was found from the pgf. PLEASE ANY IDEAS ARE WELCOME, SO IF NO ONE KNOWS THE ANSWER SUGGEST ANYTHING.

many thanks

chogo

2. perhaps i should rather ask

if i had

$P(z) = E\left(e^{(z-1)\lambda}\right)$

how would i remove the E

3. Originally Posted by chogo

if i had

$P(z) = E\left(e^{(z-1)\lambda}\right)$

how would i remove the E
Are you sure that is the right formula? Because there is no random variable in $e^{(z-1)\lambda},$ it is a constant with respect to the expectation and $P(z) = E\left(e^{(z-1)\lambda}\right) = e^{(z-1)\lambda}.$ When specifying an expectation, the random variable involved should be made clear, for example, by writing $P(z) = E_X z^X$ when the random variable is $X.$

4. thank you jakeD sorry yeah i should not have put the expectation there. My bad. Was just trying to write something simpler to see if anyone had any suggestions

The expectation is valid in my original equation, where the random variable is $T_j$

the thing is how did the person who did that derivation remove the expectation? and arrive at the second formula.

->

any suggestions?

i thank you so much for your help

5. Originally Posted by chogo
thank you jakeD sorry yeah i should not have put the expectation there. My bad. Was just trying to write something simpler to see if anyone had any suggestions

The expectation is valid in my original equation, where the random variable is $T_j$

the thing is how did the person who did that derivation remove the expectation? and arrive at the second formula.

->

any suggestions?

i thank you so much for your help
What is the distribution of the random variable $T_j ?$ You haven't said. The expectation uses that distribution.

Let $M_{T_j}(t)$ be the moment generating function of $T_j .$ Then comparing the first and second equations

$E_{T_j} (e^{(z-1)\theta T_j / 2j}) = M_{T_j}((z-1)\theta/2j ) = (1 - t 2j/(j-1))^{-1}$

where $t = (z-1)\theta / 2j.$ Then

$M_{T_j}(t) = (1 - t 2j/(j-1))^{-1} = \frac{(j-1)/2j}{(j-1)/2j - t}$

which is the MGF of a Gamma(1,(j-1)/2j) distribution, that is, an exponential distribution with parameter $\lambda = (j-1)/2j.$ So it appears that is the distribution of $T_j.$ Is that correct?

6. My original comment won't work, but I have to wonder if "E" isn't supposed to be a " $\Sigma$?"

-Dan

7. firstly JakeD and topsquark i cant thank you enough

Top shark, yes its definitley an E

yes $T_j$ is assumed to be exponentially distributed

also yes this term does cancel out

and becomes

$P_n(z) = \prod^n_{j=2}\left(1-\frac{(z-1)\theta}{j-1}\right)^{-1}$

did he substitute a value for $T_j$?

i dont know why the original equation which is of the form of a poisson generating function becomes what is is now, which you said is a gamma(1,1).

im almost 100% certain this is not wrong, as its a very famous theory developed in mathematical biology and very well founded.

thank you so much for you help again its really much appreciated. If you want i can write the entire derivation our for you guys, will this help?

8. what did you do here

this seems to be exactly what i need

9. Originally Posted by chogo
firstly JakeD and topsquark i cant thank you enough

Top shark, yes its definitley an E

yes $T_j$ is assumed to be exponentially distributed

also yes this term does cancel out

and becomes

$P_n(z) = \prod^n_{j=2}\left(1-\frac{(z-1)\theta}{j-1}\right)^{-1}$

did he substitute a value for $T_j$?

i dont know why the original equation which is of the form of a poisson generating function becomes what is is now, which you said is a gamma(1,1).

im almost 100% certain this is not wrong, as its a very famous theory developed in mathematical biology and very well founded.

thank you so much for you help again its really much appreciated. If you want i can write the entire derivation our for you guys, will this help?
This post appears to be looking at my post before I finished editing it. So it responds to comments of mine I resolved and edited out.

10. Originally Posted by JakeD
Let $M_{T_j}(t)$ be the moment generating function of $T_j .$ Then comparing the first and second equations

$E_{T_j} (e^{(z-1)\theta T_j / 2j}) = M_{T_j}((z-1)\theta/2j ) = (1 - t 2j/(j-1))^{-1}$

where $t = (z-1)\theta / 2j.$
Originally Posted by chogo
what did you do here

this seems to be exactly what i need
The explanations before and after this equation are needed. I used the definition of moment generating function and then equated corresponding parts of your first and second equations while substituting in the variable $t.$

11. thank your help is invaluable. but one last problem. Like you before i used the definition

$M(t) = E(e^{t,x})$

to go from $E_{t_j}(e^{(z-1)\theta T_j/2j}) = M_{t_j}((z-1)\theta T_j/2)$

but when you said you compared the forms of the first and second equations to arrive at the third equation im not fully satistifed.

Is there a formal definition which says the moment generating function i have is equal to $(1-t2_j / (j-1))^{-1}$

where

12. Originally Posted by JakeD
What is the distribution of the random variable $T_j ?$ You haven't said. The expectation uses that distribution.

Let $M_{T_j}(t)$ be the moment generating function of $T_j .$ Then comparing the first and second equations

$E_{T_j} (e^{(z-1)\theta T_j / 2j}) = M_{T_j}((z-1)\theta/2j ) = (1 - t 2j/(j-1))^{-1}$

where $t = (z-1)\theta / 2j.$ Then

$M_{T_j}(t) = (1 - t 2j/(j-1))^{-1} = \frac{(j-1)/2j}{(j-1)/2j - t}$

which is the MGF of a Gamma(1,(j-1)/2j) distribution, that is, an exponential distribution with parameter $\lambda = (j-1)/2j.$ So it appears that is the distribution of $T_j.$ Is that correct?
Originally Posted by chogo
thank your help is invaluable. but one last problem. Like you before i used the definition

$M(t) = E(e^{t,x})$

to go from $E_{t_j}(e^{(z-1)\theta T_j/2j}) = M_{t_j}((z-1)\theta T_j/2)$

but when you said you compared the forms of the first and second equations to arrive at the third equation im not fully satistifed.

Is there a formal definition which says the moment generating function i have is equal to $(1-t2_j / (j-1))^{-1}$

where
I was trying to deduce what the distribution of $T_j$ was because you didn't say what it was. So I deduced it was an exponential distribution with parameter $\lambda = (j-1)/2j.$ Is this correct?

Now you know what the distribution of $T_j$ is. So you can say what the moment generating function for $T_j$ is. I was working backwards to deduce the distribution; you can work forwards knowing the distribution.

I got that $M_T (t) = \frac{\lambda}{\lambda - t} = (1 - t/\lambda)^{-1}$ when $T \sim \text{Exp}(\lambda)$ from a probability text. See Exponential distribution - Wikipedia, the free encyclopedia .

13. sheer brilliance! thanks alot for the help
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 52, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9428588151931763, "perplexity_flag": "head"}