Lecture 15. C) Example: Hypothesis Test

From Significant Statistics
Jump to navigation Jump to search

Example: Hypothesis Test

Let [math]X_{1}..X_{n}[/math] be a random sample with Poisson distribution

[math]f\left(\left.x\right|\theta\right)=\frac{\theta^{x}\exp\left(-\theta\right)}{x!},\,x\in\left\{ 0,1,...\right\}[/math]

and let us test [math]H_{0}:\theta=6[/math] vs. [math]H_{1}:\theta\neq6[/math] at the 10% level.

Let

[math]n=100[/math] and [math]\sum_{i=1}^{n}x_{i}=500[/math].

[math]\widehat{\theta}_{ML}[/math] calculation

[math]l\left(\theta\right)=\sum_{i=1}^{n}\log\left(\frac{\theta^{x_{i}}\exp\left(-\theta\right)}{x!}\right)=\sum_{i=1}^{n}\left(x_{i}\log\left(\theta\right)-\theta-\log\left(x!\right)\right)[/math]

Taking the foc:

[math]\begin{aligned} foc\left(\theta\right):\, & \frac{\sum x_{i}}{\theta}-n=0\\ \Leftrightarrow & \widehat{\theta}_{ML}=\frac{\sum x_{i}}{n}=\frac{500}{100}=5.\end{aligned}[/math]

We can also verify that we have found a maximum:

[math]soc\left(\theta\right):\,-\frac{\sum x_{i}}{\theta^{2}}\lt 0.[/math]

Information Matrix

The single observation information matrix is:

[math]I\left(\theta\right)=-E_{\theta}\left(l^{''}\left(\theta\right)\right)=-E_{\theta}\left(-\frac{X_{i}}{\theta^{2}}\right)=\frac{\theta}{\theta^{2}}=\frac{1}{\theta}.[/math]

(We could have also used [math]E_{\theta}\left(l^{'}\left(\theta\right)^{2}\right)[/math], and would have obtained the same result.)

Finally, define the following two estimators for the information matrix (for a single observation):

[math]\begin{aligned} I_{1} & =I\left(\widehat{\theta}_{ML}\right)=\frac{1}{5}.\\ I_{2} & =I\left(\theta_{0}\right)=\frac{1}{6}.\end{aligned}[/math]

Tests

The LR test is given by [math]2\left(l\left(\widehat{\theta}_{ML}\right)-l\left(\theta_{0}\right)\right)\simeq17.6.[/math]

The Wald test is given by [math]\frac{\left(\widehat{\theta}_{ML}-\theta_{0}\right)^{2}}{Var\left(\widehat{\theta}_{ML}\right)}\simeq\frac{\left(\widehat{\theta}_{ML}-\theta_{0}\right)^{2}}{\left(n.I_{1}\right)^{-1}}=\frac{100\left(6-5\right)^{2}}{5}\simeq20.[/math]

The LM test is given by [math]\frac{l^{'}\left(\theta_{0}\right)^{2}}{nI\left(\theta_{0}\right)}=\frac{\left(\frac{\sum x_{i}}{\theta_{0}}-n\right)^{2}}{\frac{100}{6}}=\frac{6\left(\frac{500}{6}-100\right)^{2}}{100}\simeq16.67.[/math]

Using the fact that [math]-l^{''}\left(\theta_{0}\right)\overset{p}{\rightarrow}I\left(\theta_{0}\right)=nI_{1}\left(\theta_{0}\right)[/math], we could have instead used [math]-l^{''}\left(\theta_{0}\right)[/math] as an approximation of the denominator:

[math]\frac{l^{'}\left(\theta_{0}\right)^{2}}{-l^{''}\left(\theta_{0}\right)}=\frac{\left(\frac{\sum x_{i}}{\theta_{0}}-n\right)^{2}}{-\frac{\sum x_{i}}{\theta^{2}}}=\frac{\left(\frac{500}{6}-100\right)^{2}}{\frac{500}{36}}=20.[/math]

In all cases, the test statistics exceed the [math]\chi_{\left(1\right)}^{2}[/math] critical value of [math]2.728[/math] associated with a type 1 error rate of 10%.