# Transforming variables

Let $W = X_1/X_2$ where $X_1$ and $X_2$ are normally distributed with means $\mu_1,\mu_2$, variances $\sigma_{1}^{2}, \sigma_{2}^{2}$ and correlation coefficient $\rho$. The exact distribution of $W$ and the standard approximation assuming $X_2 > 0$ is wanted.

Why is studying the distribution of $W$ the same as studying the distribution of $$Z = \frac{a+Y_1}{b+Y_2}$$ where $Y_1$ and $Y_2$ are $N(0,1)$? Hinkley mentions that $W$ can be expressed as $$\frac{\sigma_1}{\sigma_2} \sqrt{1-\rho^{2}} \left[\frac{\frac{\mu_{1}}{\sigma_{1}}+Y_1}{\frac{\mu_{2}}{\sigma_{2}}+Y_2} + \frac{\rho}{\sqrt{1-\rho^{2}}} \right]$$

Simplifying I get $$W = \frac{\sigma_1}{\sigma_2} \left[\frac{\sqrt{1-\rho^{2}} \left(\frac{\mu_1}{\sigma_1}+Y_1 \right)}{\frac{\mu_2}{\sigma_2}+Y_2}+ \rho \right]$$

$$= \frac{\sigma_1}{\sigma_2} \left[\frac{\sqrt{1-\rho^{2}} \left(\frac{\mu_1}{\sigma_1}+Y_1 \right)+\rho \left(\frac{\mu_2}{\sigma_2}+Y_2 \right)}{\frac{\mu_2}{\sigma_2}+Y_2} \right]$$

How is this equivalent to $W = X_1/X_2$?

• $Y$ is normal with mean $\nu$ if and only if $Y+a$ is normal with mean $\nu+a$. The ratio of normal seems to be treated here en.wikipedia.org/wiki/Ratio_distribution (google ratio distribution ...) – robin girard Apr 9 '13 at 18:09
• Aren't the $Y_i$ supposed to be independent? If not, then $\rho$ does not need to appear in these formulas at all. – whuber Apr 9 '13 at 19:08

The motivation for such a re-expression is to reduce the number of parameters that need to be studied. This particular re-expression exploits two things:

1. When we are free to shift the locations and scales of the numerator and denominator, we can create a formula for the ratio that looks like $Z$, but where the numerator and denominator might not be independent.

2. When the variables are jointly Normal (not just separately Normal), we can arrange for the numerator and denominator to be independent. This, of course, is where the correlation $\rho$ comes in.

The rest is relatively simple algebra: no additional or special properties of random variables are needed. All the steps are motivated by the preceding considerations and so are easy to anticipate. For completeness--and because I obtain a slightly different result--the details follow.

In any location-scale family the distributions are of the form $F_{\mu, \sigma, \theta}$ where

$$F_{\mu, \sigma, \theta}(x) = F_{0, 1, \theta}\left(\frac{x-\mu}{\sigma}; \theta\right)$$

(with $\sigma \gt 0$). (The parameter vector $\theta$ is absent in the Normal case but will appear in other situations, where typically $\theta$ is a "shape" parameter.)

This is equivalent to saying that any $X \sim F_{\mu, \sigma, \theta}$ can be obtained by rescaling and translating a "standard" variable $Y$,

$$X = \mu + \sigma Y$$

where $Y \sim F_{0, 1, \theta}$.

Suppose then that $X_i \sim F_{\mu_i, \sigma_i, \theta}$ are random variables obtained by rescaling and translating two variables $Y_i$. The axioms of arithmetic (of numbers, not of random variables) imply

$$\frac{X_1}{X_2} = \frac{\mu_1 + \sigma_1 Y_1}{\mu_2 + \sigma_2 Y_2} = \frac{\sigma_1}{\sigma_2}\frac{\mu_1/\sigma_1 + Y_1}{\mu_2/\sigma_2 + Y_2} = \sigma\frac{a+Y_1}{b+Y_2} = \sigma Z$$

with $\sigma=\sigma_1/\sigma_2$, $a=\mu_1/\sigma_1$, and $b=\mu_2/\sigma_2$. Whence $X_1/X_2$ is a scaled version of $Z$. The advantage gained by this purely algebraic manipulation is that the distribution of $Z$ depends only on the joint distribution of $(Y_1, Y_2)$ and not on the locations and scales $\mu_i$ and $\sigma_i$, thereby replacing four parameters by the two parameters $(a,b)$.

Let us specialize now to the case where $F$ is the family of Normal distributions (so we may drop the extraneous parameters $\theta$). Assuming $X_1$ and $X_2$ are bivariate normal, their joint distribution is determined by the parameters $\mu_i, \sigma_i$ together with their correlation $\rho$. The joint distribution of $(Y_1, Y_2)$ then also has correlation $\rho$. If we wish, we may re-express $Z$ as a ratio of independent Normal variates by observing that $(Y_1, Y_2)$ may be written as

$$(Y_1, Y_2) = (\rho Y_2 + \sqrt{1-\rho^2}U, Y_2)$$

where $U = (Y_1 - \rho Y_2)/\sqrt{1-\rho^2}$. Being a linear combination of jointly Normal variates, $U$ is also Normal, and it's straightforward to compute that it has unit variance and is uncorrelated with $Y_2$, whence $U$ and $Y_2$ are independent, as planned. Plugging this re-expression of $Y_1$ into $Z$ and doing some algebra yields

$$Z = \frac{a+Y_1}{b+Y_2} = \frac{a +(-b\rho + b\rho) + (\rho Y_2 + \sqrt{1-\rho^2}U)}{b+Y_2} = \rho + \frac{a-b\rho + \sqrt{1-\rho^2}U}{b + Y_2}.$$

Once again we can pull out a constant numerical factor so that the numerator and denominator have unit variances, obtaining

$$Z = \sqrt{1-\rho^2}\left(\frac{c + U}{b + Y_2} + \frac{\rho}{\sqrt{1-\rho^2}}\right)$$

with $c = (a-b\rho) / \sqrt{1-\rho^2} = (\mu_1/\sigma_1-\mu_2/\sigma_2\rho) / \sqrt{1-\rho^2}$.

This exhibits $X_1/X_2$ as the ratio of two unit-variance, independent Normal variates $c+U$ and $b+Y_2$, up to a shift (of $\rho/\sqrt{1+\rho^2}$) and change of scale (of $\sigma_1/\sigma_2 \sqrt{1-\rho^2}$). Thus, given that shifts and changes of scale are easy to handle, what had originally looked like a five-parameter problem (with parameters $\mu_1, \sigma_1, \mu_2, \sigma_2, \rho$) has been reduced to a two-parameter problem (with parameters $b, c$).

• What about the correlation term $\rho$? – poster Apr 9 '13 at 18:41
• That describes the joint distribution of $Y_1$ and $Y_2$. – whuber Apr 9 '13 at 19:06
• So $X_1/X_2 = \sigma Z$ is assuming that $X_1$ and $X_2$ are independent? If they are dependent then $X_1/X_2$ would include both $\rho$ and $\sigma$? – poster Apr 9 '13 at 19:31
• Well, that first assertion is true, but my solution makes no such assumption: it is perfectly general and applies when $X_1$ and $X_2$ are not independent, too. In the Normal setting, the distribution of $Z$ will depend on $\rho$ as well as on $a$ and $b$, but it's still the case that $X_1/X_2=\sigma Z$. – whuber Apr 9 '13 at 19:33
• I think it would actually be $\sqrt{1-\rho^{2}} \frac{X_1}{X_2}+\rho = \sqrt{1-\rho^{2}}Z+\rho$ from $$\frac{\sigma_1}{\sigma_2} \left[\frac{\sqrt{1-\rho^{2}} \left(\frac{\mu_1}{\sigma_1}+Y_1 \right)+\rho \left(\frac{\mu_2}{\sigma_2}+Y_2 \right)}{\frac{\mu_2}{\sigma_2}+Y_2} \right]$$ – poster Apr 9 '13 at 19:45

This result is proved in

Marsaglia, G. (2006). Ratios of normal variables. Journal of Statistical Software, Volume 16, Issue 4.

http://www.jstatsoft.org/v16/i04/paper

Proposition. For any two jointly normal variates $z$ and $w$ with means $\mu_z$, $\mu_w$, variances $\sigma_z^2$, $\sigma_w^2$ and correlation $\rho$, the distribution of $z/w$ is, after translation and change of scale, the same as that of $(a+x)/(b+y)$ with $x$, $y$ independent standard normal and $a$, $b$ non-negative constants. ...

This is one of the most recent papers on this topic. You may want to check the references in the paper as well as those papers that have cited it recently using google citations.