Based on a sample of i.i.d. Normal random variables $X_1, . . . , X_n$ with mean µ and variance $σ^2$, propose a test with asymptotic level 5% for the hypotheses: $$ H_0: µ > σ$$ $$ H_1: µ \leq σ$$ What is the p-value of your test if the sample has size n = 100, the sample average is 2.41 and the sample variance is 5.20 ? If the sample size is n = 100, the sample average is 3.28 and the sample variance is 15.95 ? In the latter case, do you reject H0 at level 5% ? At level 10% ?
-
https://en.wikipedia.org/wiki/One-_and_two-tailed_tests – Jun 23 '20 at 14:32
-
You can say $H_0: \mu \ge \sigma$ and $H_1: \mu \lt \sigma$. Your version is slightly harder to deal with as the natural test is based on assuming $\mu=\sigma$ with small values of $m$ compared with $s$ being seen as "extreme" – Henry Jun 23 '20 at 15:02
-
Unfortunately, they are not given. – student Jun 23 '20 at 16:26
-
Sorry, I had deleted my comment "are either $\sigma$ or $\mu$ known" as I observed that sample variances and means are given which suggests both are unknown. Where does this question come from? One way to solve is to reformulate as $H_0: \mu = \sigma$ and developing a complicated test of the form $M_n > S_n(1-c)$ that requires one to compose a Gaussian with a chi distribution. – Michael Jun 23 '20 at 16:57
2 Answers
As $n$ is great enuogh, you can use an asymptotic test:
$$\Lambda =-2 \log \lambda (\mathbf{x})\sim \chi_{(r)}^2$$
Where $\lambda (\mathbf{x})$ is the generalized likelihood ratio and $r$ is the number of parameters specified in $\mathcal{H}_0$.
As $\mathcal{H}_0 $ is concerned you can consider $\mu=\sigma$. The hypothesis system does not change because of the definition of the size $\alpha$,
$$\alpha=\sup_{\theta \in \Theta_0}\mathbb{P}[ \lambda (\mathbf{x})<k] $$
- 8,290
- 33,201
- 4
- 17
- 35
The Tommik answer is likely the intended one for this textbook-like problem. I may as well explain my (likely nonstandard) approach from my earlier comment:
Assume $\sigma, \mu$ are unknown, and $\sigma>0$. You can reformulate the problem (as in a comment by Henry) as: $$ H_0: \mu \geq \sigma, \quad H_1: \mu < \sigma $$ then devolop a test that accepts $H_0$ if $$ M_n > S_n(1-c)$$ where $M_n, S_n^2$ are the sample mean and variance, and $c$ is a to-be-determined constant chosen to ensure $P[M_n \leq S_n(1-c)] \leq \alpha$ whenever $H_0$ holds (where $\alpha$ is either $0.05$ or $0.1$). Then, assuming $H_0$ holds: \begin{align} P[M_n \leq S_n(1-c)] &= P\left[\frac{\sqrt{n}(M_n-\mu)}{\sigma} \leq \frac{\sqrt{n}(S_n(1-c) - \mu)}{\sigma}\right]\\ &=P\left[\frac{\sqrt{n}(M_n-\mu)}{\sigma} \leq (1-c)\sqrt{\frac{n}{n-1}}\sqrt{\frac{(n-1)S_n^2}{\sigma^2}} - \frac{\mu}{\sigma}\sqrt{n}\right]\\ &\leq P\left[\frac{\sqrt{n}(M_n-\mu)}{\sigma} \leq (1-c)\sqrt{\frac{n}{n-1}}\sqrt{\frac{(n-1)S_n^2}{\sigma^2}} - \sqrt{n}\right] \end{align} where the final inequality holds because we assume $\mu \geq \sigma$ (and in fact this inequality holds with equality if $\mu = \sigma$).
It is known that (amazingly) $M_n$ and $S_n$ are independent and so the following variables $G$ and $X_{n-1}$ are independent: \begin{align} G &= \frac{\sqrt{n}(M_n-\mu)}{\sigma} \sim N(0,1)\\ X_{n-1} &= \sqrt{\frac{(n-1)S_n^2}{\sigma^2}} \sim \mbox{chi($n-1$) variable} \end{align} So we get (using independence of $G$ and $X_{n-1}$): \begin{align} P[M_n \leq S_n(1-c)] &\leq P\left[G \leq X_{n-1}(1-c)\sqrt{\frac{n}{n-1}} - \sqrt{n}\right]\\ &= \int_0^{\infty} F_G\left(x(1-c)\sqrt{\frac{n}{n-1}} - \sqrt{n}\right)f_{X_{n-1}}(x)dx \end{align} where equality holds if we assume $\mu = \sigma$, and where $F_G(x) = \int_{-\infty}^x \frac{1}{\sqrt{2\pi}} e^{-t^2/2}dt$ is the CDF of a standard Gaussian, and $f_{X_{n-1}}(x)$ is the PDF of the chi($n-1$) variable. So we search for the smallest value $c>0$ for which $$ \int_0^{\infty} F_G\left(x(1-c)\sqrt{\frac{n}{n-1}} - \sqrt{n}\right)f_{X_{n-1}}(x)dx \leq \alpha $$
For a given $c$ value, you can numerically integrate to find the left-hand-side. Then play around with $c$ to yield a result close to the desired $\alpha$.(As I mentioned in my comment, this is a complicated integral to evaluate.)
- 26,378