# Joint distribution of $Y$ and $S^2-Y^2$

Let $$\{X_i\}_{i=1}^n\overset{iid}{\sim}\mathcal{N}(\mu,\sigma^2)$$. Let $$\{b_i\}_{i=1}^n$$ be a sequence of numbers so that $$\sum_{i=1}^nb_i=0$$ and $$\sum_{i=1}^nb^2_i=1$$. Define $$S^2=\sum_{i=1}^n(X_i-\bar{X})^2 \text{ and } Y=\sum_{i=1}^nb_iX_i$$.

What can you say about the joint distribution of $$Y$$ and $$S^2-Y^2$$?

I only can get the marginal distribution of $$Y\sim\mathcal{N}(0,\sigma^2)$$, $$S^2\sim\sigma^2\chi_{n-1}^2$$ and $$Y^2/\sigma^2\sim\chi^2_{1}$$. What can we say about the joint distribution of $$Y$$ and $$S^2-Y^2$$? I tried Basu's theorem, based on the fact that $$S^2$$ is complete and sufficient for $$\sigma^2$$ but I cannot show anything using this...

• Hint: you can simultaneously diagonalize the quadratic forms $S^2$ and $Y^2.$
– whuber
Feb 16, 2021 at 16:38
• So $Y^2=b^TXX^Tb$ and $S^2 = X^TX-2X^T\bar{X}+\bar{X}^T\bar{X}$?
– Tan
Feb 17, 2021 at 0:39
• Write the forms as matrices. For instance, $Y^2 = X^\prime(bb^\prime)X$ has matrix $bb^\prime.$
– whuber
Feb 17, 2021 at 1:00

Denote $$n$$-by-$$1$$ vectors $$(b_1, b_2, \ldots, b_n)^\top$$ and $$(1, 1, \ldots, 1)^\top$$ by $$b$$ and $$e$$ respectively. By assumption, we have \begin{align*} e^\top b = 0, \quad b^\top b = 1. \tag{1}\label{1} \end{align*}

Without loss of generality, assume $$\sigma^2 = 1$$. In addition, since both $$Y$$ and $$S^2$$ are invariant under the translation transformation, we can answer the question under the simplified condition $$X_1, \ldots, X_n \text{ i.i.d. } \sim N(0, 1)$$. In other words, $$X := (X_1, \ldots, X_n)^\top \sim N_n(0, I_{(n)})$$.

As a standard trick in multivariate analysis, write $$S^2 = X^\top(I_{(n)} - n^{-1}ee^\top)X$$, $$Y = b^\top X$$. It then follows that \begin{align*} S^2 - Y^2 = X^\top(I_{(n)} - n^{-1}ee^\top - bb^\top)X := X^\top P X. \end{align*} Due to the condition $$\eqref{1}$$, it is straightforward to verify that the matrix $$P$$ is symmetric and idempotent, whence \begin{align*} \operatorname{rank}(P) = \operatorname{tr}(P) = \operatorname{tr}(I_{(n)}) - n^{-1}\operatorname{tr}(ee^\top) - \operatorname{tr}(bb^\top) = n - 1 - 1 = n - 2. \end{align*} It thus follows by the distribution of multivariate normal quadratic form that $$S^2 - Y^2 \sim \chi^2_{n - 2}$$. On the other hand, clearly we have $$Y = b^\top X \sim N(0, 1)$$.

Last, let's show $$Y$$ and $$S^2 - Y^2$$ are independent, which is true if one can show $$PX$$ and $$b^\top X$$ are independent in view of $$S^2 - Y^2 = X^\top P X = (PX)^\top(PX)$$ is a function of $$PX$$. This can be further reduced to show $$PX$$ and $$b^\top X$$ are uncorrelated, because both of them are normally distributed as linear transformations of $$X \sim N(0, I_{(n)})$$. This is also straightforward to verify by $$\eqref{1}$$: \begin{align*} \operatorname{Cov}(PX, b^\top X) = PI_{(n)}b = (I_{(n)} - n^{-1}ee^\top - bb^\top)b = b - b = 0. \end{align*}

In summary, for the joint distribution of $$Y$$ and $$S^2 - Y^2$$, we can "say" that

1. $$Y$$ and $$S^2 - Y^2$$ are independent.
2. The marginal distribution of $$Y$$ is $$N(0, 1)$$, the marginal distribution of $$S^2 - Y^2$$ is $$\chi^2_{n - 2}$$.

we know, $$\frac{(n-1)S^2}{\sigma^2} \sim \chi^2_{n-1}$$ $$Y = \sum_{i=1}^{n} b_iX_i$$ notice, this is a linear combination of normal random variables so, this should follow normal distribution with $$E(Y) = E(\sum_{i=1}^{n} b_iX_i)$$ $$= \sum_{i=1}^{n} b_i E(X_i)$$ $$= \mu.0$$ $$= 0$$ similarly check $$var(Y)=\sigma^2$$ i.e. $$Y \sim N(0,\sigma^2)$$ $$\frac{Y}{\sigma} \sim N(0,1)$$ $$\frac{Y^2}{\sigma^2} \sim \chi^2_1$$ now, $$\frac{(n-1)S^2}{\sigma^2}-\frac{Y^2}{\sigma^2} \sim \chi^2_{(n-1)-1}$$ now to check independence, you can check that the covariance of $$Y$$ and $$S^2-Y^2$$ is zero. my doubt is that, cov = 0 does not always implies independence.. :!