[step:Compute the inverse-Wishart quadratic form by rotating the Gaussian vector]Set $m=n-1$. We prove the following distributional identity: if $Y \sim \mathcal{N}_p(0,I_p)$, $B \sim W_p(m,I_p)$, $m \ge p$, and $Y$ is independent of $B$, then
\begin{align*}
\frac{m-p+1}{p}Y^\top B^{-1}Y \sim F_{p,m-p+1}.
\end{align*}
Define the nonnegative random variable $R: \Omega \to [0,\infty)$ by
\begin{align*}
R = (Y^\top Y)^{1/2}.
\end{align*}
Then $R^2=Y^\top Y \sim \chi^2_p$. On the event $Y\ne 0$, choose an orthogonal matrix $Q_Y \in \mathbb{R}^{p \times p}$ such that
\begin{align*}
Q_YY = R e_1,
\end{align*}
where $e_1=(1,0,\dots,0)^\top \in \mathbb{R}^p$. Since $Y=0$ has probability $0$, this defines the relevant distribution almost surely.
Conditional on $Y$, the matrix
\begin{align*}
A = Q_Y B Q_Y^\top
\end{align*}
has distribution $W_p(m,I_p)$ and is independent of $R^2$, because the standard Wishart law is invariant under deterministic orthogonal conjugation and $B$ is independent of $Y$. Hence
\begin{align*}
Y^\top B^{-1}Y
&= (Q_YY)^\top (Q_YBQ_Y^\top)^{-1}(Q_YY) \\
&= R^2 e_1^\top A^{-1}e_1.
\end{align*}
[claim:Schur complement of a standard Wishart matrix]
Let $A \sim W_p(m,I_p)$ with $m \ge p$. Write $A$ in block form
\begin{align*}
A =
\begin{pmatrix}
a_{11} & a_{12}^\top \\
a_{12} & A_{22}
\end{pmatrix},
\end{align*}
where $a_{11} \in \mathbb{R}$, $a_{12} \in \mathbb{R}^{p-1}$, and $A_{22} \in \mathbb{R}^{(p-1)\times(p-1)}$. Then $A_{22}$ is invertible almost surely, and the Schur complement
\begin{align*}
C_A = a_{11}-a_{12}^\top A_{22}^{-1}a_{12}
\end{align*}
satisfies
\begin{align*}
C_A \sim \chi^2_{m-p+1}.
\end{align*}
Moreover,
\begin{align*}
e_1^\top A^{-1}e_1 = C_A^{-1}.
\end{align*}
[/claim]
[proof]
Represent $A$ as
\begin{align*}
A = G^\top G,
\end{align*}
where $G: \Omega \to \mathbb{R}^{m \times p}$ is a random matrix whose entries are independent $\mathcal{N}(0,1)$ random variables. Partition $G$ by columns as
\begin{align*}
G = (g_1\; G_2),
\end{align*}
where $g_1: \Omega \to \mathbb{R}^m$ is the first column and $G_2: \Omega \to \mathbb{R}^{m \times (p-1)}$ is the remaining column block. Then
\begin{align*}
a_{11} &= g_1^\top g_1, &
a_{12} &= G_2^\top g_1, &
A_{22} &= G_2^\top G_2.
\end{align*}
Since $m \ge p$, the Gaussian matrix $G_2$ has rank $p-1$ almost surely, so $A_{22}=G_2^\top G_2$ is invertible almost surely.
On this event, define the [orthogonal projection](/theorems/437) matrix $P_2: \mathbb{R}^m \to \mathbb{R}^m$ onto $\operatorname{Range}(G_2)$ by
\begin{align*}
P_2 = G_2(G_2^\top G_2)^{-1}G_2^\top.
\end{align*}
Then
\begin{align*}
C_A
&= g_1^\top g_1 - g_1^\top G_2(G_2^\top G_2)^{-1}G_2^\top g_1 \\
&= g_1^\top(I_m-P_2)g_1.
\end{align*}
Conditional on $G_2$, the matrix $I_m-P_2$ is an orthogonal projection of rank
\begin{align*}
m-(p-1)=m-p+1.
\end{align*}
Since $g_1 \sim \mathcal{N}_m(0,I_m)$ and $g_1$ is independent of $G_2$, the quadratic form $g_1^\top(I_m-P_2)g_1$ has conditional distribution $\chi^2_{m-p+1}$. This conditional distribution does not depend on $G_2$, so $C_A \sim \chi^2_{m-p+1}$.
Finally, the block inverse formula for an invertible block matrix with invertible lower-right block gives
\begin{align*}
e_1^\top A^{-1}e_1
=
\left(a_{11}-a_{12}^\top A_{22}^{-1}a_{12}\right)^{-1}
=
C_A^{-1}.
\end{align*}
[/proof]
By the claim,
\begin{align*}
Y^\top B^{-1}Y = \frac{R^2}{C_A},
\end{align*}
where $R^2 \sim \chi^2_p$ and $C_A \sim \chi^2_{m-p+1}$. The random variables $R^2$ and $C_A$ are independent because $R^2$ is a function of $Y$ and $C_A$ is computed from the conditionally rotated Wishart matrix, whose conditional distribution is independent of $Y$. Therefore, by the definition of the $F$ distribution as a ratio of independent normalized chi-square variables,
\begin{align*}
\frac{m-p+1}{p}Y^\top B^{-1}Y
=
\frac{R^2/p}{C_A/(m-p+1)}
\sim F_{p,m-p+1}.
\end{align*}[/step]