Hypothesis Testing - Likelihood Ratio Test Example (1)
Example) Mathematical Statistics by Keith Knight, Chapter 7-19
Let $X_{1}, X_{2},...X_{n}$ be iid N$(\mu,\sigma^2)$. Both are unknown.
We want to test $H_{0}: \mu=\mu_{0}$ vs. $H_{1}: \mu \neq \mu_{0}$.
$\triangleright$ Solution.
As we know the MLE of $\mu$ and $\sigma ^2$ are follwing: $\widehat{\mu}=\bar{X}$, and $\widehat{\sigma^2}=\frac{1}{n}\sum(X_{i}-\bar{X})^2$.
Under the $H_{0}$, the MLE of $\widehat{\sigma^2_{0}}= \frac{1}{n}\sum(X_{i}-\mu_{0})^2$.
$f(x_{1},... x_{n};\mu, \sigma^2)= \prod_{i=1}^{n} \frac{1}{\sigma\sqrt{2\pi}}\exp[-\frac{(x_{i}-\mu)^2}{2\sigma^2}]= (2\pi\sigma^2)^{-\frac{n}{2}} \exp[-\frac{\sum(X_{i}-\mu)}{2\sigma^2}]$
* We know the Likelihood Ratio test will reject $H_{0}$ when $\Lambda$ $\geq$ k,
where $\Lambda = (\frac{\widehat{\sigma^2_{0}}}{\widehat{\sigma^2}})^\frac{n}{2}$, and k is chosen based on the level of the test is specifed $\alpha$.
$\frac{\widehat{\sigma^2_{0}}}{\widehat{\sigma^2}}=\frac{\sum(X_{i}-\mu_{0})^2}{\sum(X_{i}-\bar{X})^2} = 1+\frac{n(\bar{x}-\mu_{0})}{\sum(X_{i}-\bar{x})^2}$
* Why? $\sum ((X_{i}-\bar{x})+(\bar{x}-\mu_{0}))^2=\sum(X_{i}-\bar{x})^2+n(\bar{x}-\mu_{0})^2$ !!
* But Wait!! We can use the T distribution, where $T=\frac{\sqrt{n}(\bar{x}-\mu_{0})}{S}$, where $S^2= \frac{1}{n-1}\sum(X_{i}-\bar{x})^2$!
Therefore, we can rearrange the EQTN; $=1+\frac{1}{n-1}(\frac{n(\bar{x}-\mu_{0})}{s^2})=1+\frac{T^2}{n-1}$
Therefore, when $H_{0}$ is true, T has student T distribution with n-1 degree of freedom.
Now we know the distribution of Lambda, we can define the rejection region.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment