# If $X$ and $Y$ are two chi-squared random variables what is the density of $X(1+Y)$.

Given two chi-squared random variables $$X$$ and $$Y$$ with $$n$$ respectively $$m$$ degrees of freedom. Denote by $$f_X$$ the density function of $$X$$. Moreover, $$X$$ is independent of $$Y$$. I am interested in the density function of $$Z=X(1+Y)$$. My approach is the following:

1. Define $$Q:=1+Y$$. $$Q$$ is a random chi-squared distributed variable. Compute the density function $$f_Q(x)$$ of $$Q$$.
2. $$Z=XQ$$ follows a product distribution (since $$Q$$ is still independent of $$X$$ right?). Therefore the density function is given by $$f_Z(z)=\int_{-\infty}^\infty f_X(x)f_Q(z/x)\frac{1}{|x|}dx$$.

1. Is it valid?
2. How do I compute $$f_Q(x)$$. I know that by adding a constant the new random variable $$Q$$ is still chi-squared distributed but with a different scale and shift. But how do I get these?
3. The density function of a chi-squared variable is only defined for positive values. Hence the integral should only go from $$0$$ to $$\infty$$ and is only defined for $$z>0$$. Right?

The overall approach is fine, however you state that $$Q=Y+1$$ follows a $$\chi$$-squared distribution, which is wrong. The $$\chi$$-squared distribution is concentrated on $$[0,\infty)$$ but $$Q$$ is concentrated on $$[1,\infty)$$. The density of $$Q$$ can however easily be calculated as $$f_Q(q) = f_Y(q-1)$$.
You are correct that we should only consider $$x>0$$, when integrating, but you also have to consider the fact that $$f_Q(q)=0$$ for $$q<1$$. This means that $$f_Q(\frac{z}{x}) = 0$$ for $$0 and thus $$f(z)=\int_{-\infty}^\infty f_X(x)f_Q(\frac{z}{x})\frac{1}{|x|} \: dx = \int_0^z f_X(x) f_Q(\frac{z}{x}) \frac{1}{|x|} \: dx = \int_0^z f_X(x) f_Y(\frac{z}{x} - 1) \frac{1}{|x|} \: dx$$ for any $$z>0$$.
• Hello, thank you very much for our answer! One small question, since the integral goes from 0 to z we can get rid of the absolute value of x in the fraction and just write x right? So in conclusion we have $f(z)=\int_0^z f_X(x)f_Y(\frac{z}{x}-1)\frac{1}{x}dx$ – samabu Jun 1 at 6:58
• Yes, you can replace $|x|$ by $x$. – Leander Tilsted Kristensen Jun 1 at 14:31