# Integrating exponential distribution

• Jun 1st 2008, 03:02 PM
peterpan
Integrating exponential distribution
$\displaystyle Prob(X \leq x | \theta) = 1 - e^{- \theta x}$

$\displaystyle \theta$ is gamma distribution so that the PDF of $\displaystyle \theta$ is $\displaystyle g( \theta )$

$\displaystyle g( \theta ) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} \theta^{\alpha -1}e^{ - \beta \theta}$

Find the marginal distribution of X.

Stuck on trying to integrate with respect to $\displaystyle \theta$, please could someone give me a hand.

Thanks!
• Jun 1st 2008, 04:53 PM
mr fantastic
Quote:

Originally Posted by peterpan
$\displaystyle Prob(X \leq x | \theta) = 1 - e^{- \theta x}$

$\displaystyle \theta$ is gamma distribution so that the PDF of $\displaystyle \theta$ is $\displaystyle g( \theta )$

$\displaystyle g( \theta ) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} \theta^{\alpha -1}e^{ - \beta \theta}$

Find the marginal distribution of X.

Stuck on trying to integrate with respect to $\displaystyle \theta$, please could someone give me a hand.

Thanks!

$\displaystyle \Pr(X \leq x | \theta) = F(x| \theta) = 1 - e^{- \theta x}$

$\displaystyle f(x|\theta) = \frac{\partial}{\partial x}F(x|\theta) = \theta\ e^{-\theta x}$

Therefore, the marginal pdf f(x) is:

$\displaystyle f(x) = \int_0^\infty f(x|\theta) \, g(\theta) \, d\theta = \int_0^\infty g(\theta) \, \theta \, e^{-\theta x} d\theta = \underbrace{ \frac{\alpha}{\beta}(1 + x/\beta)^{-\alpha - 1}}_{\text{Laplace transform of} ~ g(\theta) \, \theta }$
for x > 0 and zero otherwise

Furthermore (in anticipation), now that you've got the marginal pdf of X you can get the cdf by integrating this pdf:

$\displaystyle F(x) = \int_{0}^{x} \frac{\alpha}{\beta} \left(1 + \frac{t}{\beta} \right)^{-\alpha - 1} dt = ........$
• Jun 2nd 2008, 12:53 AM
peterpan
Hi mr fantastic,

Thank for your help, much appreciated. Would you mind explaining the first two steps as im not sure why we do these, is the change from F -> f a typo, or does it have meaning? Why do we differentiate with respect to x?

$\displaystyle \Pr(X \leq x | \theta) = F(x| \theta) = 1 - e^{- \theta x}$

$\displaystyle f(x|\theta) = \frac{\partial}{\partial x}F(x|\theta) = \theta\ e^{-\theta x}$

Peter
• Jun 2nd 2008, 02:53 AM
CaptainBlack
Quote:

Originally Posted by peterpan
Hi mr fantastic,

Thank for your help, much appreciated. Would you mind explaining the first two steps as im not sure why we do these, is the change from F -> f a typo, or does it have meaning? Why do we differentiate with respect to x?

$\displaystyle \Pr(X \leq x | \theta) = F(x| \theta) = 1 - e^{- \theta x}$

$\displaystyle f(x|\theta) = \frac{\partial}{\partial x}F(x|\theta) = \theta\ e^{-\theta x}$

Peter

$\displaystyle F$ is the (conditional) cumulative distribution and $\displaystyle f$ the (conditional) density.

RonL
• Jun 2nd 2008, 01:08 PM
peterpan
Thanks for the reply - now on the second part:

$\displaystyle \int_0^\infty g(\theta) \, \theta \, e^{-\theta x} d\theta = \underbrace{ \frac{\alpha}{\beta}(1 + x/\beta)^{-\alpha - 1}}_{\text{Laplace transform of} ~ g(\theta) \, \theta }$

how did you make this step? Do you have to use a Laplace transformation (i am not familiar with these at all) ? can you not integrate by parts with:

$\displaystyle u = \theta e^{-\theta x}$

$\displaystyle dv = g (\theta )$
• Jun 2nd 2008, 06:06 PM
mr fantastic
Quote:

Originally Posted by peterpan
Thanks for the reply - now on the second part:

$\displaystyle \int_0^\infty g(\theta) \, \theta \, e^{-\theta x} d\theta = \underbrace{ \frac{\alpha}{\beta}(1 + x/\beta)^{-\alpha - 1}}_{\text{Laplace transform of} ~ g(\theta) \, \theta }$

how did you make this step? Do you have to use a Laplace transformation (i am not familiar with these at all) ? can you not integrate by parts with:

$\displaystyle u = \theta e^{-\theta x}$

$\displaystyle dv = g (\theta )$

Being lazy, I went for the easy option.

It can be done by parts. If you need a hand, don't hesitate to say so.
• Jun 3rd 2008, 12:45 PM
peterpan
thanks, here is my attempt so far, not sure where to go next...

$\displaystyle \int_0^\infty g(\theta) \theta e^{-\theta x} d\theta$

$\displaystyle \int_0^\infty \frac{\beta^{\alpha}}{\Gamma(\alpha)} \theta^{\alpha-1}e^{-\beta \theta}\theta e^{-\theta x} d\theta$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)} \int_0^\infty \theta^{\alpha-1} \theta e^{-\beta \theta} e^{-\theta x} d\theta$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)} \int_0^\infty \theta^{\alpha} e^{- \theta(\beta + x)} d\theta$

let $\displaystyle t = \theta(\beta +x)$
$\displaystyle \theta = \frac{t}{\beta + x}$
$\displaystyle d\theta = \frac{dt}{\beta + x}$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)(\beta + x)} \int_0^\infty \left(\frac{t}{\beta+x}\right)^{\alpha} e^{- t} dt$
• Jun 3rd 2008, 04:49 PM
mr fantastic
Quote:

Originally Posted by peterpan
thanks, here is my attempt so far, not sure where to go next...

$\displaystyle \int_0^\infty g(\theta) \theta e^{-\theta x} d\theta$

$\displaystyle \int_0^\infty \frac{\beta^{\alpha}}{\Gamma(\alpha)} \theta^{\alpha-1}e^{-\beta \theta}\theta e^{-\theta x} d\theta$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)} \int_0^\infty \theta^{\alpha-1} \theta e^{-\beta \theta} e^{-\theta x} d\theta$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)} \int_0^\infty \theta^{\alpha} e^{- \theta(\beta + x)} d\theta$

let $\displaystyle t = \theta(\beta +x)$
$\displaystyle \theta = \frac{t}{\beta + x}$
$\displaystyle d\theta = \frac{dt}{\beta + x}$

$\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)(\beta + x)} \int_0^\infty \left(\frac{t}{\beta+x}\right)^{\alpha} e^{- t} dt$

You're in the bell lap!

$\displaystyle = \frac{\beta^{\alpha}}{\Gamma(\alpha) \, (\beta + x)} ~ \frac{1}{(\beta+x)^{\alpha}} ~ \int_0^\infty t^{\alpha} e^{- t} \, dt$

$\displaystyle = \frac{\beta^{\alpha}}{\Gamma(\alpha)} ~ \frac{1}{\beta^{\alpha+1} \left(1 + \frac{x}{\beta} \right)^{\alpha + 1}} ~ \int_0^\infty t^{\alpha} e^{- t} \, dt$

$\displaystyle = \frac{1}{\Gamma(\alpha)} ~ \frac{1}{\beta \, \left(1 + \frac{x}{\beta} \right)^{\alpha + 1}} ~ \Gamma(\alpha + 1)$

$\displaystyle = \frac{1}{\Gamma(\alpha)} ~ \frac{1}{\beta \, \left(1 + \frac{x}{\beta} \right)^{\alpha + 1}} ~ \alpha \, \Gamma(\alpha)$

and the result (given in my first reply) is easily seen .......