Substitution of variable in integral

259 Views Asked by At

I'm having some difficulties with working with integrals. I stumbled upon the following exercise in my probability book:

Let $X$ and $Y$ be independent random variables having, respectively, the gamma distribution with parameters $s$ and $\lambda$, and the gamma distribution with parameters $t$ and $\lambda$. Then $Z=X+Y$ has density function

$\begin{aligned} f_Z(z)=&\int_{-\infty}^\infty f_X(x)f_Y(z-x)\,\mathrm{d}x\\ =&\begin{cases}\int_0^zf_X(x)f_Y(z-x)\,\mathrm{d}x&\text{if }z>0,\\ 0&\text{otherwise.} \end{cases} \end{aligned}$

Right, so far so good. But then they plug in the density functions for $X$ and $Y$, and I don't understand how they do the substitution $y=x/z$.

For $z>0$,

$\begin{align}f_Z(z)=\frac{1}{\Gamma (s)\Gamma (t)}\lambda^{s+t}e^{-\lambda z}\int_0^z x^{s-1}(z-x)^{t-1}\,\mathrm{d}x\end{align}$.

Substitue $y=x/z$ in the last integral to obtain

$\begin{align}f_Z(z)=\frac{1}{\Gamma (s)\Gamma (t)}\lambda^{s+t}\left[\int_0^1y^{s-1}(1-y)^{t-1}\,\mathrm{d}y\right]z^{s+t-1}e^{-\lambda z}.\end{align}$

So I have two questions:

1) How did they come up with $y=x/z$?

2) How does this substitution work? Can I just replace all $x$ by $yz$ and that's it? Or should I apply integration by substitution, in the sense of

$\begin{aligned}\int_{\phi(a)}^{\phi(b)}f(x)\,\mathrm{d}x=\int_a^b f(\phi(t))\phi '(t)\,\mathrm{d}t\end{aligned}.$

1

There are 1 best solutions below

1
On BEST ANSWER

$$ \int_0^z x^{s-1}(z-x)^{t-1}dx = \int_0^z x^{s-1}z^{t-1}\left(1-\frac{x}{z}\right)^{t-1}dx = z^{t-1}z^{s-1} \int_0^z \left(\frac{x}{z}\right)^{s-1}\left(1-\frac{x}{z}\right)^{t-1}dx $$ let $y = \frac{x}{z}$ with the limits transforming like so - $(0,z)\to(0, z/z) = (0,1)$ Then we have $$ dx = zdy $$ so we have $$ \int_0^z x^{s-1}(z-x)^{t-1}dx = z^{t-1}z^{s-1}z \int_0^1 y^{s-1}\left(1-y\right)^{t-1}dy = z^{t+s-1}\int_0^1 y^{s-1}\left(1-y\right)^{t-1}dy $$