Let $X_1,...,X_{n_1}$ be an i.i.d. sample from $N_p(\mu_1,\Sigma)$ and let $Y_1,...,Y_{n_2}$ be an independent sample from $N_p(\mu_2,\Sigma)$, for some $\mu_1,\mu_2 \in \mathbb{R}^p$ and some invertible, $p\times p$ positive definite matrix $\Sigma$.
I would like to test the hypothesis $H_0 : \mu_1=\mu_2$ vs $H_1 : \mu_1 \neq\mu_2$. I would also like to find the maximum likelihood estimators under $H_0$, i.e $(\hat{\mu_0},\hat{\Sigma_0})$ which maximises the constrained likelihood function $\overline{L}(\mu,\Sigma)=L(\mu,\mu,\Sigma)$
And so here's how I try to do it:
From previous deductions, I have found that the unbiased MLE for $\Sigma$ is $S=\frac{1}{n_1-n_2-2}\biggl(\sum^{n_1}_{i=1}(x_i-\hat{\mu_1})(x_1-\hat{\mu_1})^T+\sum^{n_2}_{i=1}(y_i-\hat{\mu_2})(y_i-\hat{\mu_2})^T\biggr)$
Ando so if we set $S_x=\frac{1}{n_1-1}\sum^{n_1}_{i=1}(x_i-\hat{\mu_1})(x_1-\hat{\mu_1})^T$ and $S_y=\frac{1}{n_2-1}\sum^{n_2}_{i=1}(y_i-\hat{\mu_2})(y_i-\hat{\mu_2})^T$
$\Rightarrow S_p=\frac{n_1-1}{n_1+n_2-2}S_x+\frac{n_2-1}{n_1+n_2-2}S_y$ is the pooled variance.
The $T^2$ test statistic for testing $H_0 : \mu_1=\mu_2$ is $$\biggl(\frac{1}{n_1}+\frac{1}{n_2}\biggr)^{-1}(\hat{\mu_1}-\hat{\mu_2})^TS_p^{-1}(\hat{\mu_1}-\hat{\mu_2})\sim \frac{n_1+n_2-2}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}$$
Hence a $100(1-\alpha)$% confidence region can be formed from
$$\mathbb{P}\biggl(T^2\leq \frac{n_1+n_2-2}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}(\alpha)\biggr)=1-\alpha$$
So, in this context, can I say that $\hat{\mu_0}=\hat{\mu_1}=\hat{\mu_2}$?
And then $\hat{\Sigma_0}=S_0=\frac{1}{n_1-n_2-2}\biggl(\sum^{n_1}_{i=1}(x_i-\hat{\mu_0})(x_1-\hat{\mu_0})^T+\sum^{n_2}_{i=1}(y_i-\hat{\mu_0})(y_i-\hat{\mu_0})^T\biggr)$
Would this be correct?