# Math Help - Integrating exponential distribution

1. ## Integrating exponential distribution

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

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

$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 $\theta$, please could someone give me a hand.

Thanks!

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

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

$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 $\theta$, please could someone give me a hand.

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

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

Therefore, the marginal pdf f(x) is:

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

$F(x) = \int_{0}^{x} \frac{\alpha}{\beta} \left(1 + \frac{t}{\beta} \right)^{-\alpha - 1} dt = ........$

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

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

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

Peter

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

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

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

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

RonL

5. Thanks for the reply - now on the second part:

$\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:

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

$dv = g (\theta )$

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

$\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:

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

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

7. thanks, here is my attempt so far, not sure where to go next...

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

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

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

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

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

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

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

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

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

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

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

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

$
\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!

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

$= \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$

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

$= \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 .......