I am currently trying to solve a problem that should be very easy, yet I am stumped, and help would be GREATLY appreciated!!
The background of the question is this:
Q: The number of typing errors in a newspaper can be modeled by a Poisson distribution with some mean $μ$. Each of the $31$ students in a journalism course are allocated at random a past edition of the The Guard newspaper and asked to find the number of typing errors it contains. The total number of errors found by the students is $120$, i.e. $\sum_{i=1}^{n}y_i=120$.
It has been hypothesized by the instructor of the course that there are an average of $5$ typing errors in each edition of The Guard. The editor of the newspaper has objected, claiming that the mean is less than $5$ per edition. You want to test this with at $5\%$ significance level.
Here is where I begin my work
So I want to test: $H_0:\mu_o=5$ and $H_a:\mu_a<5$.
According to the Neyman Pearson lemma, we can create the most powerful test by looking at the likelihood ratio (LR). I simplified the LR and got the following which I believe is correct, hopefully!
$$LR= e^{-n\mu_a+n\mu_0}(\frac{\mu_a}{\mu_0})^{\sum_{i=1}^{n}y_i}$$
Now looking at the ratio, and the fact that $\mu_a<\mu_0$, we can see that effectively our test statistic is $\sum_{i=1}^{n}y_i$, and as it increases, we get less comfortable rejecting $H_0$, since it makes our LR smaller.
Now this is where I am stuck:
Now I know that to reject $H-0$, I need to find the cut off value where $\sum_{i=1}^{n}y_i \le k$ where $k$ is the cutoff value.
So since $\sum_{i=1}^{n}y_i$ is our test statistic, we can say that we have $n=31$ independent Poisson distributions which leads our test statistic to have $n\mu_0$ Poisson distribution. I am unsure if what I just did is correct or not, but assuming it is, we next want to find $k$. Using $R$, we have our test statistic model $n\mu_0$ $=$ $31\cdot4=124$ which we can use in $R$.
qpois(0.05
( = significance level) ,124)
( = our new parameter for the mean under H_0) = 106
which is incorrect. Hopefully this clears up the confusion! Thanks so much everyone!!
qpois
? Don't you want to use $1-0.05$? $\endgroup$