We are given a random vector $X \sim N_p(0, I)$, meaning $X$ follows a standard multivariate normal distribution in $p$ dimensions. We are also given a $p \times p$ idempotent matrix $A$ with rank $(A) = k$, where $k < p$. We need to determine the distribution of the statistic $\frac{X'AX}{X'X}$.
For an idempotent matrix $A$ ($A^2=A$), its trace equals its rank. Therefore, $tr(A) = k$. Also, $A$ is symmetric.
Let $U = X'AX$ and $V = X'(I-A)X$. We established that $U \sim \chi^2_k$ and $V \sim \chi^2_{p-k}$, and they are independent.
The statistic we are interested in is $\frac{X'AX}{X'X}$. We can rewrite this using $U$ and $V$: $ \frac{X'AX}{X'X} = \frac{U}{U+V} $
There is a known result in statistics: If $U \sim \chi^2_m$ and $V \sim \chi^2_n$ are independent, then the variable $\frac{U}{U+V}$ follows a Beta distribution, specifically $Beta(\frac{m}{2}, \frac{n}{2})$.
Applying this result to our variables $U$ and $V$: $ \frac{U}{U+V} \sim Beta(\frac{k}{2}, \frac{p-k}{2}) $
Therefore, the distribution of $\frac{X'AX}{X'X}$ is $Beta(\frac{k}{2}, \frac{p-k}{2})$.
Let $Y_1, Y_2, \ldots, Y_{10}$ be independent and identically distributed bivariate normal $N_2(0, \Sigma)$ where $\Sigma = \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix}$. Let $a = (2\ 1)^T$ and $A = \sum_{i=1}^{10} Y_i Y_i^T$, then the distribution of $\frac{5}{3} (a^T A^{-1} a)^{-1}$ is