If I have $\frac{X/n_1}{Y/n_2}$ where $X$ and $Y$ are independent chi-squared random variables, with degrees of freedom $n_1$ and $n_2$, respectively, then the distribution of this ratio is given by the $F$-distribution. If I have, instead, $\frac{X}{Y + k}$ where $k$ is a constant, what would the distribution be?
A variation on the $F$-distribution
-
0yes, in particular, k>0 – 2011-04-21
2 Answers
This question can be resolved via change of variables. Let's generalize slightly to consider two independent gamma-distributed random variables. Let $\newcommand{\G}{\Gamma}X\sim \G(r_1, \lambda)$ and $Y \sim \G(r_2, \lambda)$, where $\G(r,\lambda)$ denotes a distribution with density $ f(x\;;r,\lambda) = \frac{\lambda^r x^{r-1}}{\Gamma(r)} e^{-\lambda x} \mathbf{1}_{(x > 0)} \> . $
In what follows, we will need the following basic fact. Let $\beta > 0$ (for simplicity). Then, if $Z \sim \G(r, \lambda)$, $ \newcommand{\e}{\mathbb{E}} \e(Z^\beta) = \lambda^{-\beta} \frac{\G(r+\beta)}{\G(r)} \> . $ Note that there is no restriction that $\beta$ be an integer here.
Under the previously established notation, a chi-square random variable with $n$ degrees of freedom is also a $\Gamma(n/2, 1/2)$ random variable.
Define the transformation variables $U = X / (Y + k)$ and $V = Y$. Then the map $(X,Y) \mapsto (U,V)$ is one-to-one.
In particular, $X = U(V+k)$ and $Y = V\,$ so that the Jacobian is $ J = \left| \begin{matrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\ \end{matrix} \right| = \left| \begin{matrix} v+k & u \\ 0 & 1 \\ \end{matrix} \right| = v+k \> , $ and since $v > 0$, $k > 0$, we have that $|J| = J = v + k$.
The joint density of $(U,V)$ defined on $\{(u,v): u > 0, v > 0\}$ is thus $ f_{U,V}(u,v) = |J| f_{X,Y}(x,y) = \frac{\lambda^{r_1 + r_2}}{\G(r_1)} u^{r_1 - 1} e^{-\lambda k u} \cdot \frac{(v+k)^{r_1} v^{r_2-1}}{\G(r_2)} e^{-\lambda(1+u)v} \> . $
Now we are left to integrate out $v$ so that we can recover $f_U(u)$.
So, for $u > 0$, $ f_U(u) = \frac{\lambda^{r_1}}{\G(r_1)} u^{r_1 - 1} (1+u)^{-r_2} e^{-\lambda k u} \cdot \int_0^\infty (v+k)^{r_1} \frac{v^{r_2-1} (\lambda(1+u))^{r_2}}{\G(r_2)} e^{-\lambda(1+u)v} \,\mathrm{d}v \> . $
Observe that if $Z_u \sim \G(r_2, \lambda(1+u))$, then $ \e(Z_u+k)^{r_1} = \int_0^\infty (v+k)^{r_1} \frac{v^{r_2-1} (\lambda(1+u))^{r_2}}{\G(r_2)} e^{-\lambda(1+u)v} \,\mathrm{d}v \> , $ which provides a probabilistic interpretation of the integral.
Let's consider some special cases.
Case 1: $k = 0$.
$ \e(Z_u+k)^{r_1} = \e Z_u^{r_1} = (\lambda(1+u))^{-r_1} \frac{\G(r_1+r_2)}{\G(r_2)} $ and so
$ f_U(u) = \frac{\G(r_1+r_2)}{\G(r_1)\G(r_2)} u^{r_1 - 1} (1+u)^{-(r_1+r_2)} \> . $
From this, if $r_1 = n_1/2$, $r_2 = n_2/2$ and $\lambda = 1/2$, it's easy to see that $\frac{X/n_1}{Y/n_2} = \frac{n_2}{n_1}\frac{X}{Y+k} \sim F(n_1,n_2)$, as we should expect.
Case 2: $r_1$ is integral.
If $r_1$ is an integer (e.g., in the chi-square case, if the degrees of freedom of the numerator are even) then, $ \e(Z_u+k)^{r_1} = \sum_{i=0}^{r_1} {r_1 \choose i} k^{r_1-i} \e(Z_u^i) \>, $ and so the expression for $\e(Z_u^i)$ can be used to obtain a "closed-form" (at least if you admit the gamma function) expression for the density.
-
0@Didier, thanks for the kind remarks and the suggestions, which I've incorporated into the answer. I originally had $|J| = J = |\cdot| = v+k$ in that display equation, but thought that was overly explicit. Your remarks have changed my mind. Indicating the dependence on $u$ of $Z$ was also a very good suggestion. – 2011-04-23
Define $Z=X/(Y+c)$. Let's find the CDF $F_Z(x) = P( X/(Y+c) < x ) = P(X < Yx + cx)$.
Since Y is a random variable, we can calculate this as
$F_Z(x) = \int_0^\infty P(X < xy + cx) f_Y(y) \mathrm d y = \int_0^\infty F_X( x(y+c) ) f_Y(y) \mathrm d y$
Now differentiate by $x$ to get the PDF of $Z$:
$f_Z(x) = \int_0^\infty f_X( x(y+c) ) (y+c) f_Y(y) \mathrm d y$
Substituting the appropriate PDF, we get
$f_Z(x) = \frac{1}{2^k \gamma(k/2)^2} \int_0^\infty [x(y + c)/2]^{k/2-1} \mathrm e^{-x(y+c)/2} y^{k/2-1} \mathrm e^{-y/2} \mathrm d y$
which according to Mathematica evaluates to
$f_Z(x) = \frac{2^{\frac{1}{2}-k} c^{\frac{1}{2} (-1+k)} e^{\frac{1}{4} (c-c x)} \sqrt{\pi } (1+x)^{\frac{1}{2}-\frac{k}{2}} \text{BesselK}\left[\frac{1}{2} (-1+k),\frac{1}{4} c (1+x)\right] \text{Csc}\left[\frac{k \pi }{2}\right]}{\text{Gamma}\left[1-\frac{k}{2}\right] \text{Gamma}\left[\frac{k}{2}\right]^2}$
This assumes that $X$ and $Y$ have the same degrees of freedom, $k$.
ed: Corrected per @cardinal's warning.
-
0FWIW, the factor $\frac{\csc\frac{k\pi}{2}}{\Gamma\left(1-\frac{k}{2}\right)}$ in your last expression becomes indeterminate whenever $k$ is an even integer. Replace it with $\frac{\Gamma\left(\frac{k}{2}\right)}{\pi}$. – 2011-04-27