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?


1 Answer 1


I haven't checked everything but comparing your F-test/confidence interval to what is derived for hypothesis $H_m$ here... https://www.jstor.org/stable/2236125?seq=11#metadata_info_tab_contents ...the degrees of freedom are different. The test statistic is also different but may be written down in a way that makes it look more similar to yours if probably not quite exactly identical.

In fact, the equality of two multivariate means is tested as a standard using Hotelling's $T^2$ distribution https://en.wikipedia.org/wiki/Hotelling%27s_T-squared_distribution ...which can be written down as equivalent to an F-distribution, but I don't think it's exactly yours.

You can not say that $\hat \mu_0=\hat \mu_1=\hat\mu_2$, because (1) if I understand your notation correctly, these are the estimators and not the true parameters, and the esimators are computed from the data and are equal if they're equal, otherwise not. What you probably mean is whether you can say that $\mu_0=\mu_1=\mu_2$ if the null hypothesis is not rejected, but you can't say that either, because (2) non-rejection of a null hypothesis never implies that the null hypothesis is true, it just means that your data are compatible with it (and may well also be compatible with other hypotheses).

If you assume $\mu_0=\mu_1=\mu_2$, the ML estimator should just be what you get when you throw the two samples together, which means that you should divide by $n=n_1+n_2$ rather than $n_1+n_2-2$. (Actually it seems that the denominator of your $S$ also is the denominator of the best unbiased estimator, which is not the MLE; the MLE is biased, same $S_x$ and $S_y$.)

  • $\begingroup$ Thank you! And so what would be $\hat{\mu_0}$ equal to? $\endgroup$
    – user255658
    Jan 24, 2021 at 14:23
  • $\begingroup$ The mean of all observations. $\endgroup$ Jan 24, 2021 at 14:24
  • 1
    $\begingroup$ Sorry, that was meant to be $\frac{1}{n_1+n_2}$!! Yes, I saw this one a while ago, and while it would help me with estimating $\hat{\Sigma_0}$ for a case where I have only one random sample, it doesn't show how to find it with 2 samples.. $\endgroup$
    – user255658
    Jan 24, 2021 at 17:08
  • 1
    $\begingroup$ So by what I understand, it's constructed the following way(?): Let $u_i=x_i+y_i$. Then $\hat{\Sigma_0}=\frac{1}{n_1+n_2}\sum^{n_1+n_2}_{i=1}(u_i-\hat{\mu_0})(u_i-\hat{\mu_0})^T$? But then, what if $n_1\neq n_2$? $\endgroup$
    – user255658
    Jan 24, 2021 at 17:16
  • 1
    $\begingroup$ Who said you should add the observations up? It's the one you wrote in an earlier comment but with the wrong factor $\frac{1}{n_1-n_2}$. $\endgroup$ Jan 24, 2021 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.