# Math Help - Condition distribution - stuck

1. ## Condition distribution - stuck

If $Y | \Lambda = \lambda$ ~Poi $(\lambda)$ and $\Lambda$ ~ Exp $(\mu)$, find the distribution of Y.
There is a hint about looking up the gamma function but I can't see how to use it in this case yet.

I am also confused with $Y | \Lambda = \lambda$ ~Poi $(\lambda)$.

Does this mean Pr $( Y | \Lambda = \lambda) = \frac{\lambda^{\lambda}}{\lambda !} e^{- \lambda}$?

2. NO it means that, we just know lambda...

$P ( Y=y | \Lambda = \lambda) = \frac{\lambda^{y}}{y!} e^{- \lambda}$

where y=0,1,2,3.....

I'm sure I can solve this, but before I attempt it I want to know how you write

this density Exp $(\mu)$.

3. Originally Posted by matheagle
I want to know how you write

this density Exp $(\mu)$.
The pdf of $X$ which has an Exp $(\mu)$ distribution is

$f(x) = \mu e^{-\mu x} , x \geq 0$ and 0 otherwise.

4. I'm glad I asked, since that's not the exponential density I use.
I just solved this. The answer looks weird, but is a valid distribution.

It's a geo with $p={\mu\over \mu+1}$

I hate using f(x) when talking about discrete distributions, but this is a mixture of discete and continuous.
Multiplying the conditional of Y given lambda with the distribution of lambda gives you the joint distribution of Y and lambda.

That being said, this joint density is

$f(y,\lambda )={e^{-\lambda}\lambda^y\over y!}\mu e^{-\mu\lambda}$

So, the marginal of Y is

$g(y)=\int_0^{\infty}{e^{-\lambda}\lambda^y\over y!}\mu e^{-\mu\lambda}d\lambda$

NOW, what I do instead of making a substitution I just recognize the GAMMA density and note that ALL densities integrate to one.

$={\mu\over y!}\int_0^{\infty}\lambda^ye^{-\lambda(\mu+1)}d\lambda$ (you could make a substitutin and then use the gamma function, but I prefer...)

$={\mu\Gamma(y+1)\over (\mu+1)^{y+1}y!}\int_0^{\infty}{ (\mu+1)^{y+1}\over \Gamma(y+1)}\lambda^{(y+1)-1}e^{-\lambda(\mu+1)}d\lambda$

the integral is one, NOT how I write my gamma, but I did it your way
also $\Gamma(y+1)=y!$ since y is an integer.
This reduces to

$={\mu\over (\mu+1)^{y+1}}$

or

$=\Biggl({\mu\over \mu+1}\Biggr)\Biggl({1\over \mu+1}\Biggr)^y =pq^y$

y=0,1,2,... which is that geo.

5. Originally Posted by matheagle
I'm glad I asked, since that's not the exp density I use.
Can I ask, what do you use?

6. I prefer the beta, or mu in your case to be in the denominator

$f(x) = {1\over\mu} e^{-x/\mu}$

Note that I left out a bunch of minus signs earlier tonight.

7. This is a good example of what I am trying to master, therefore, I'd like to try to summarise the approach used here. We are given a conditional distribution for Y on Lambda and told the (marginal?) distribution for Lambda. We are asked to find the (marginal?) distribution of Y.

1. First, if Y is conditioned on Lambda distributed according to some distribution (here Poisson), that means that Y is the random variable in the Poisson formula, as here:

Originally Posted by matheagle
NO it means that, we just know lambda...

$P ( Y=y|\Lambda=\lambda) = \frac{\lambda^{y}}{y!} e^{- \lambda}$

where y=0,1,2,3.....
2. Next, we find the joint density according to the standard formula

$f_{Y,\Lambda}(y,\lambda)=f_{Y|\Lambda}(y,\lambda)f _{Y|{\Lambda}}(\lambda)$

3. And finally to find $f_Y(y)$ we integrate (or summate) the joint density over the range of Lambda. Whether this is integration or summation will be determined by the type of Lambda variable, right? Here Lambda is exponentially distributed, therefore, continous, therefore, we integrate.

Does it make sense?

8. Note the corrected marginal density...

Originally Posted by Volga
This is a good example of what I am trying to master, therefore, I'd like to try to summarise the approach used here. We are given a conditional distribution for Y on Lambda and told the (marginal?) distribution for Lambda. We are asked to find the (marginal?) distribution of Y.

1. First, if Y is conditioned on Lambda distributed according to some distribution (here Poisson), that means that Y is the random variable in the Poisson formula, as here:

2. Next, we find the joint density according to the standard formula

$f_{Y,\Lambda}(y,\lambda)=f_{Y|\Lambda}(y,\lambda)f _{\Lambda}}(\lambda)$

3. And finally to find $f_Y(y)$ we integrate (or summate) the joint density over the range of Lambda. Whether this is integration or summation will be determined by the type of Lambda variable, right? Here Lambda is exponentially distributed, therefore, continous, therefore, we integrate.

Does it make sense?

It's just like P(A,B)=P(A|B)P(B)
{"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": 27, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9657745957374573, "perplexity": 827.1366308257464}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "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": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-22/segments/1432207929656.4/warc/CC-MAIN-20150521113209-00202-ip-10-180-206-219.ec2.internal.warc.gz"}