14

Assume that $ X = X_1 + X_2+\cdots+ X_n $ where $X_i \sim N(0,\sigma^2)$ are independent.

My question is, what distribution does

$$ Z = \frac{X^2}{X_1^2 + X_2^2 + \cdots + X_n^2}$$

follow? I know from here that the ratio of two chi-squared random variables expressed as $\frac{W}{W + Y}$ follows a Beta distribution. I think that this assumes independence between $W$ and $Y$. In my case though, the denominator of $Z$ contains the components of $X$ squared.

I think $Z$ must also follow a variation of the Beta distribution but I am not sure. And if this assumption is correct, I don't know how to prove it.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
x0dros
  • 165
  • 1
  • 7
  • 7
    Because the distribution of the denominator is invariant under rotations, you can rotate $X$ to equal $\sqrt{n}X_1$, which reduces your question to something familiar :-). – whuber Mar 03 '14 at 22:23
  • I hope what I'm going to say is not silly but, you say the denominator ($ X_1^2 + .. + X_n^2$) is invariant under rotation and that I can rotate the *nominator* ($ X $) to get an expression scaled and similar to the one resulting in a $beta$ distribution. Is this a typo or since the fact that $X$ is invariant under rotation, is so obvious (which I missed), you did not bother and just pointed out the rotation in-variance of the denominator? – x0dros Mar 03 '14 at 23:32
  • 1
    I'm pretty sure @whuber means exactly what was typed there. When you say 'nominator' do you mean 'numerator'? – Glen_b Mar 04 '14 at 04:34
  • @Glen_b Oh, such a stupid mistake, sorry. Yes I mean numerator. Can you please explain further why I can use $X = \sqrt n X_1$ ? – x0dros Mar 04 '14 at 12:37
  • 3
    When you rotate anything you (by definition) preserve its length. Therefore the variance of any rotated version of $X$ must equal the variance of $X$, which is $1+1+\cdots+1=n$: that's where the $\sqrt{n}$ term comes from. – whuber Mar 04 '14 at 15:37
  • 1
    @whuber Your answer seems very interesting indeed but I have some doubts about it. When you say that I can rotate $X$ to become equal to $\sqrt nX_1$, this basically means that I can rewrite the numerator of $Z$ as $nX_1^2$ and consequently, $Z$ itself turns into $n\frac{X_1^2}{X_1^2+X_2^2+\cdots+X_n^2}$. Now, if I assume $W=X_1^2$ and $Y=X_2^2+\cdots+X_n^2$ and since $W$ and $Y$ are independent, I can assume that $Z=n\frac{W}{W+Y}$ has a $\beta$ distribution and so forth. Am I getting your point up to now? So, here is my confusion. Before using the concept of rotational invariance and modifyi – ssah Mar 04 '14 at 17:45
  • 1
    Welcome to the site, @ssah. This isn't an answer to the OP's question. Please only use the "Your Answer" field to provide answers. If you have your own question, click the `[ASK QUESTION]` at the top & ask it there, then we can help you properly. Since you are new here, you may want to take our [tour](https://stats.stackexchange.com/about), which contains information for new users. – gung - Reinstate Monica Mar 04 '14 at 18:04
  • Thanks @gung, I intended to put it as a comment but it said that I need to have 50 reputations to do that and I saw no other way to express myself other than using the answer field. Surprisingly, I still cannot comment on the other answer while I can do it here. I still need to learn how to navigate and your information will definitely help. Thanks a lot. – ssah Mar 04 '14 at 18:45
  • Yes, you simply are not allowed to comment until your reputation >50. That is frustrating sometimes (like now), but it is a design feature of the SE system. My impression is that you have the ability to produce high quality questions & answers here, so you could get to 50 in time, if you want. – gung - Reinstate Monica Mar 04 '14 at 18:49
  • 1
    @ssah Nothing magic at all: although $W$ and $Y$ are independent, note that the numerator ($W$) and the denominator ($W+Y$) are *explicitly* dependent because they are based on a common variable $W$. The rotation has merely clarified the nature of the original dependence. – whuber Mar 04 '14 at 19:08
  • 1
    @whuber Let's assume that we have the same problem but without the $X_1^2$ in the denominator. With your reasoning, we have $nX_1^2$ in the numerator and $X_2^2 + \cdots + X_n^2$ in the denominator. Thus, while the initial problem is the ratio of two dependent r.v.s, your modification will be the ratio of two independent r.v.s. What I'm trying to say is that your reasoning which said "The rotation has merely clarified the nature of the original dependence" does not seem to be valid anymore. – ssah Mar 05 '14 at 04:49
  • 2
    @ssah You err in your application of my reasoning: without the $X_1^2$ in the denominator, its distribution is no longer invariant to arbitrary rotations of $(X_1,\ldots, X_n),$ and so the conclusions no longer hold. – whuber Mar 05 '14 at 17:04

1 Answers1

8

This post elaborates on the answers in the comments to the question.


Let $X = (X_1, X_2, \ldots, X_n)$. Fix any $\mathbf{e}_1\in\mathbb{R}^n$ of unit length. Such a vector may always be completed to an orthonormal basis $(\mathbf{e}_1, \mathbf{e}_2, \ldots, \mathbf{e}_n)$ (by means of the Gram-Schmidt process, for instance). This change of basis (from the usual one) is orthogonal: it does not change lengths. Thus the distribution of

$$\frac{(\mathbf{e}_1\cdot X)^2}{||X||^2}=\frac{(\mathbf{e}_1\cdot X)^2}{X_1^2 + X_2^2 + \cdots + X_n^2} $$

does not depend on $\mathbf{e}_1$. Taking $\mathbf{e}_1 = (1,0,0,\ldots, 0)$ shows this has the same distribution as

$$\frac{X_1^2}{X_1^2 + X_2^2 + \cdots + X_n^2}.\tag{1} $$

Since the $X_i$ are iid Normal, they may be written as $\sigma$ times iid standard Normal variables $Y_1, \ldots, Y_n$ and their squares are $\sigma^2$ times $\Gamma(1/2)$ distributions. Since the sum of $n-1$ independent $\Gamma(1/2)$ distributions is $\Gamma((n-1)/2)$, we have determined that the distribution of $(1)$ is that of

$$\frac{\sigma^2 U}{\sigma^2 U + \sigma^2 V} = \frac{U}{U+V}$$

where $U = X_1^2/\sigma^2 \sim \Gamma(1/2)$ and $V = (X_2^2 + \cdots + X_n^2)/\sigma^2 \sim \Gamma((n-1)/2)$ are independent. It is well known that this ratio has a Beta$(1/2, (n-1)/2)$ distribution. (Also see the closely related thread at Distribution of $XY$ if $X \sim$ Beta$(1,K-1)$ and $Y \sim$ chi-squared with $2K$ degrees.)

Since $$X_1 + \cdots + X_n = (1,1,\ldots,1)\cdot (X_1, X_2, \cdots, X_n) = \sqrt{n}\,\mathbf{e}_1\cdot X$$

for the unit vector $\mathbf{e}_1=(1,1,\ldots,1)/\sqrt{n}$, we conclude that $Z$ is $(\sqrt{n})^2 = n$ times a Beta$(1/2, (n-1)/2)$ variate. For $n\ge 2$ it therefore has density function

$$f_Z(z) = \frac{n^{1-n/2}}{B\left(\frac{1}{2}, \frac{n-1}{2}\right)} \sqrt{\frac{(n-z)^{n-3}}{z}}$$

on the interval $(0,n)$ (and otherwise is zero).


As a check, I simulated $100,000$ independent realizations of $Z$ for $\sigma=1$ and $n=2,3,10$, plotted their histograms, and superimposed the graph of the corresponding Beta density (in red). The agreements are excellent.

Figure

Here is the R code. It carries out the simulation by means of the formula sum(x)^2 / sum(x^2) for $Z$, where x is a vector of length n generated by rnorm. The rest is just looping (for, apply) and plotting (hist, curve).

for (n in c(2, 3, 10)) {
  z <- apply(matrix(rnorm(n*1e5), nrow=n), 2, function(x) sum(x)^2 / sum(x^2))
  hist(z, freq=FALSE, breaks=seq(0, n, length.out=50), main=paste("n =", n), xlab="Z")
  curve(dbeta(x/n, 1/2, (n-1)/2)/n, add=TRUE, col="Red", lwd=2)
}
whuber
  • 281,159
  • 54
  • 637
  • 1,101