# Distribution of the ratio of two related chi-square variates

Suppose a binormal population $$X_1, X_2 \sim \mathcal{N}(0,\Sigma)$$ where $$\Sigma$$ is obtained from $$\sigma^2$$ the variance of each item, assumed equal, and $$\rho$$, the correlation between pairs. We sample $$n$$ pairs from that population.

We can compute two sorts of variances from these data. (1) The variance of the difference $$V_D = var(X_1 - X_2)$$ which is known to follow a $$\chi^2$$ distribution with df equals to $$n-1$$. More precisely,

$$V_D \sim \sigma_D^2 \frac{\chi^2_{n-1}}{n-1}$$

where $$\sigma_D$$, the variance of the difference is related to the population variance and the population correlation by $$\sigma_D^2 = 2\sigma^2 (1-\rho)$$.

(2) The pooled variance, that is in the present case, the mean of the two sample variances, $$var(X_1)$$ and $$var(X_2)$$. From Ben here, we have this excellent approximation:

$$V_p \sim \sigma^2 \frac{\chi^2_\nu}{\nu}$$

where $$\nu = 2(n-1)/(1+\rho^2)$$.

My question: what is the distribution of $$Z$$, the ratio of these two variates, each following correlated chi-square distributions,

$$Z= \frac{V_D}{V_p}$$

Can we also know the correlation between $$V_D$$ and $$V_p$$ and how this correlation depends on the population $$\rho$$? (as $$\rho$$ tends to -1, the $$v_d$$ vs. $$v_p$$ sample correlation tends to +1).

Edit

Note that an approximate solution involving a chi-square distribution may be more useful than the exact solution, even though the exact solution is probably possible to find.

A simple simulation showing the $$v_D/v_p$$ ratio from 100,000 samples from a population with $$\rho=0.5$$, $$n=10$$ (and $$\sigma$$=1) suggests that it is similar-looking to a $$\chi^2$$ distribution (see below). The mean here is expected to be $$2 (1-\rho) = 1$$. The sample correlation between the $$v_D$$s and the $$v_p$$s is found to be $$0.316 \approx 1 / \sqrt{10}$$.

Note

In case it may help, $$Z$$ can be rewritten as

$$Z = 2\left(1-2\frac{cov(X_1,X_2)}{var(X_1)+var(X_2)}\right)$$

If you assume that $$X_1$$ and $$X_2$$ have the same variance $$\sigma^2$$, namely that $$\Sigma = \sigma^2\begin{pmatrix} \;1 & \rho\\ \rho & \;1 \end{pmatrix}$$, then you can see by diagonalizing $$\Sigma$$ that $$x_1 := X_1+X_2$$ and $$x_2 :=X_1-X_2$$ are independent with variances $$2\sigma^2(1 \pm \rho)$$ respectively.

Furthermore from the properties of the covariance of the sum we have: $$\text{svar}(X_1) + \text{svar}(X_2) = \frac{1}{2}(\text{svar}(x_1) + \text{svar}(x_2))$$

(I use $$\text{svar}$$ to distinguish sample variance from variance)

Therefore you can express $$V_D$$ and $$V_p$$ in term of the two independent variables $$s_1^2 = \text{svar}(x_1)$$, $$s_2^2 =\text{svar}(x_2)$$ such that

$$V_D = s_2^2 , \quad V_p = \frac{1}{4}(s_1^2 + s_2^2)$$

Where by the well known distribution of the sample variance we know that

$$\frac{n-1}{2\sigma^2(1+\rho)}s_1^2 \sim \chi^2_{n-1}, \quad \frac{n-1}{2\sigma^2(1-\rho)}s_2^2 \sim \chi^2_{n-1}$$

or equivalently $$s_{1,2}^2 \sim \text{Gamma}((n-1)/2,4\sigma^2(1 \pm \rho)/(n-1))$$.

Your desired ratio is $$Z = 4\frac{s_2^2}{s_1^2 + s_2^2}$$

Notice that this implies that $$0 \le Z \le 4$$, So a $$\chi^2$$ approximation will probably not work very well (note also that when $$\rho \to 1$$ $$s_2^2 \to 0$$ so $$Z$$ becomes concentrated at 0, and likewise when $$\rho \to -1$$ $$s_1^2 \to 0$$ so $$Z$$ becomes concentrated at 4).

In fact the distribution of such a ratio of gamma variables is known in closed from and is given in this case by : (See e.g. here)

$$Z/4 \sim f(z)$$

$$f(z) = \frac{z^{k-1}(1-z)^{k-1}}{r^k B(k,k)} \left(1 + \frac{1-r}{r}z \right)^{-2k}, \quad 0 < z < 1.$$

Where $$k = (n-1)/2$$ , $$r = \frac{1-\rho}{1+\rho}$$ and $$B(\cdotp ,\cdotp)$$ is the Beta function.

Furthermore you can easily calculate the correlation between $$V_D$$ and $$V_p$$ : $$\text{Cov}(V_D,V_p) = \text{Cov}( s_2^2 ,\frac{1}{4}(s_1^2 + s_2^2)) = \frac{1}{4} \text{var}(s_2^2) = \frac{2\sigma^4(1-\rho)^2}{n-1}$$

$$\text{var}(V_p) = \frac{1}{16} (\text{var}(s_1^2) + \text{var}(s_2^2))= \frac{\sigma^4(1+\rho^2)}{n-1}$$

$$\rho_{V_D,V_p} = \frac{\text{Cov}(V_D,V_p)}{\sqrt{\text{var}(V_D)\text{var}(V_p)}} = \frac{1-\rho}{\sqrt{2(1+\rho^2)}}$$

(Note that when $$\rho=1/2$$ you get exactly $$1/2\sqrt{2*5/4)} = 1/\sqrt{10}$$ )

• Încredible! the fit is perfect!!! $f(z)$ superimposes perfectly on the histograms from simulations (why am I doubting?). Many, many thanks! Feb 15, 2022 at 15:54
• happy to help :-) Feb 15, 2022 at 16:04
• Digging a little bit, I found that this $f$distribution is a Generalized Beta distribution [en.wikipedia.org/wiki/Generalized_beta_distribution] with parameters $a=1$, $b=r$, and $c=1-r$. Feb 15, 2022 at 19:26
• Yes interesting. more specifically it is in the Beta family sub-class (B) of this generalized Beta distribution Feb 16, 2022 at 9:58