Two-side composite hypothesis test

\(X_1,\dotsc,X_n \sim N(\mu,1)\)

\(H_0: \mu = \mu_0\)

\(H_1: \mu \neq \mu_0\)

\[\Lambda = \frac{L(\mu_0|x)}{L(\overline{x}|x)}\]

given that the sample mean \(\overline{x}\) is the MLE of \(\mu\).

\[\Lambda = \frac{exp \left[ - \sum_{i=1}^{n} (x_i - \mu_0)^2 / 2 \right] }{exp \left[ - \sum_{i=1}^{n} (x_i - \overline{x})^2 / 2 \right] } = exp \left[ \left( - \sum_{i=1}^{n} (x_i - \mu_0)^2 + \sum_{i=1}^{n} (x_i - \overline{x})^2\right) / 2 \right] = exp \left[ \frac{- n(\overline{x}-\mu_0)^2}{2} \right]\]

\[R = \{ x: \Lambda(x) < c \} = \{ x: |\overline{x} - \mu_0 | > \sqrt{-2(\log{c}) / n} \}\]

Simple hypothesis test

\(X_1,\dotsc,X_n \sim N(\mu,1)\)

\(H_0: \mu = \mu_0\)

\(H_1: \mu = \mu_1\)

\[\Lambda = \frac{L(\mu_0|x)}{L(\mu_1|x)}\]

\[\Lambda = \frac{exp \left[ - \sum_{i=1}^{n} (x_i - \mu_0)^2 / 2 \right] }{exp \left[ - \sum_{i=1}^{n} (x_i - \mu_1)^2 / 2 \right] } = exp \left[ \left( - \sum_{i=1}^{n} (x_i - \mu_0)^2 + \sum_{i=1}^{n} (x_i - \mu_1)^2\right) / 2 \right]\]

Example

If we have just one random variable \(X \sim N(\mu,1)\) and

\(H_0: \mu = 0\)

\(H_1: \mu = d'\)

then

\[\Lambda = exp \left( - d' \left( x - d' / 2\right)\right)\]

and

\[\log{\Lambda} = -d' \left( x - d' / 2\right)\]

Thus

\[R = \{x: \Lambda(x) < c \} = \{x: \log \Lambda(x) < \log c \} = \{x: \log \Lambda(x) < \lambda \}\]

\[\text{If }x > \frac{\lambda}{d'} + \frac{d'}{2} \text{ then }a=a_1\] \[\text{If }x < \frac{\lambda}{d'} + \frac{d'}{2} \text{ then }a=a_0\]

In this case, the value of the random variable can be directly compared to a criterium.