# Testing a nonstandard hypothesis: constructing test statistic, finding rejection region and obtaining $p$-value

I have a sample of size $$n=1$$ (a single observation $$x_1$$) from a random variable $$X\sim N(\mu,\sigma^2)$$. The variance $$\sigma^2$$ is known, but the expectation $$\mu$$ is unknown. I would like to test the null hypothesis $$H_0\colon \quad \mu=0 \quad \text{or} \quad \mu=2$$ against the alternative $$H_1\colon \quad \mu=1 \quad \text{or} \quad \mu=3.$$ My significance level is $$\alpha=0.05$$.

Questions: How do I test this using the frequentist approach? Specifically:

1. What test statistic may I use?
2. How do I find the rejection region?
3. How do I calculate the $$p$$-value?

This is related to my continuing efforts to understand the $$p$$-value as in

and my studies of likelihood ratio testing:

• Likelihood ratio test: en.wikipedia.org/wiki/Likelihood-ratio_test Jan 26, 2021 at 8:36
• @stans, looks like a great starting point! This should give me the test statistic in a straightforward way. But how do I find the rejection region and the $p$-value? Can I simply (i) find the likelihood maximizer among $\{0,2\}$, denote it $\hat\mu_0$, (ii) find the likelihood maximizer among $\{1,3\}$, denote it $\hat\mu_1$ and (iii) proceed as if $H_0\colon \mu=\hat\mu_0$ and $H_1\colon \mu=\hat\mu_1$? Could you recommend a textbook that introduces LR testing in an accessible way and treats cases like mine in addition to the simplest cases? Jan 26, 2021 at 8:50
• I guess, you could simulate the distribution of the exact LR statistic under the conservative subcase of the null hypothesis. By "conservative" I mean the one which is harder to detect: $\mu = 2$. Then the rejection region is the right tail of the distribution of LR statistic... Regarding the ML estimates of $\mu$, they want you to find i) the estimate on $\{0, 2\}$ and ii) the estimate on $\{0, 1, 2, 3\}$... I learned LR test from Lehman's "Theory of Point Estimation" but there are probably friendlier books. Unfortunately, I do not know of a reference tackling your exact problem. Jan 26, 2021 at 9:04
• Did I understand your question correctly? Jan 26, 2021 at 9:04
• You're welcome, Richard. Jan 26, 2021 at 10:15

Some intuition can be gained from considering a likelihood ratio (LR) test. The following interactive graph shows how the LR varies with $$\sigma$$. Three snapshots are provided below.

The dotted red line is the likelihood under $$H_0$$, $$\text{L}(x_1\mid \mu=0 \ \text{or} \ \mu=2)$$.
The dashed blue line is the likelihood under $$H_0 \cup H_1$$, $$\text{L}(x_1\mid \mu=0 \ \text{or} \ \mu=1 \ \text{or} \ \mu=2 \ \text{or} \ \mu=3)$$.
The solid black line is the likelihood ratio, $$\text{LR}(x_1\mid\dots) = \frac{ \text{L}(x_1\mid \mu=0 \ \text{or} \ \mu=2) }{ \text{L}(x_1\mid \mu=0 \ \text{or} \ \mu=1 \ \text{or} \ \mu=2 \ \text{or} \ \mu=3) }$$.

The top figure is for $$\sigma=0.25$$. The middle figure is for $$\sigma=0.5$$. The bottom figure is for $$\sigma=1$$.

Observations

• For small $$\sigma$$ we have good precision and the LR test has two rejection regions (RRs): around $$1$$ and well beyond $$2$$. When $$\sigma$$ grows, the RR around $$1$$ shrinks and eventually disappears (for a fixed significance level $$\alpha$$). The RR to the right of $$2$$ starts further and further away.
• The precise boundaries of RRs depend on the significance level in addition to $$\sigma$$.
(I know I have specified $$\alpha=0.05$$, but this is a general comment.)
• The $$p$$-value is the area under the LR curve where $$x$$ is such that $$\text{LR}(x\mid\dots)\leq\text{LR}(x_1\mid\dots)$$ for the particular $$x_1$$ that we have observed.