# Hypothesis testing: $H_0: \mu_1 \le \mu_2 \text{ vs } H_1: \mu_1 > \mu_2$ from two random samples

Let $$X_1,...,X_n ∼ N(\mu_1, \sigma_1^2 )$$ and $$Y_1,...,Y_m ∼ N(\mu_2, \sigma_2^2)$$ independent random samples with unknown parameters. Suppose we want to test the hypothesis:

$$H_0: \mu_1 \le \mu_2 \text{ vs } H_1: \mu_1 > \mu_2$$

I have two questions regarding this test:

1) Is there a way to compute the maximum likelihood ratio test statistic? I know that I need to compute $$\frac{max_{\Theta_0} L(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2)}{max_{\Theta} L(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2)}$$

where $$\Theta_0 = \{(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2): \mu_1 \le \mu_2 \}$$ and $$\Theta = \{(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2)\}$$

computing the critical points of the denominator (unresticted) is not to difficult, but I´m having problems maximazing the numerator. Is there an easy way to do it?

2)I have seen in some papers that the test statistic that is normaly used in this situation is : $$t=\frac{\bar X-\bar Y}{([S_1^2/(n-1)]+[S_2^2/(m-1)])^{1/2} }$$

where $$\bar X, \bar Y$$ are the sample means and $$S_1^2, S_2^2$$ are the sample variances, my question is: Why do we use this test statistic? Where does it come from? What is the intuition behind it? or is there any proof regarding this situation?

I would really appreciate any hints, suggestions or commentaries regarding this questions.

• You can compute the likelihood ratio (can you as a start compute the maximum of the likelihood for unconstrained $\mu_1,\mu_2,\sigma_1,\sigma_2$?). However you can not relate it to a p-value if that is what you eventually want to do (that is related to the Behrens Fisher problem). – Sextus Empiricus Feb 6 '20 at 14:49