# Finding p-value based on Poisson Distribution

I'm having trouble understanding my homework that involves p-values. Here is the context of the problem before I discuss the processes I've gone through:

Suppose a company which produces fire alarms has claimed that the fire alarms make only one false alarm per year, on average. Let X denote the number of false alarms per year. Assume X∼Poisson(λ). Under the company's claim, the probability of observing x fire alarms per year is

$P(X = x) = \frac{e^{-\lambda}\lambda^x}{x!} = \frac{e^{-1}}{x!}, x = 0,1,...$

A customer had a bad experience with the fire alarm he purchased before. He wants to conduct hypothesis testing $H_0: \lambda = 1$ versus $H_1: \lambda > 1$, and he purchased another fire alarm from the same company. He allows 1% chance for falsely rejecting $H_0$. After a year, he observed three false alarms.

a. Find the p-value based on the single observation (three fire alarms per year)

• So I assume since the formula is given

• $P(X = 3) = \frac{e^{-\lambda}\lambda^3}{3!} = \frac{e^{-1}}{3!}$

b. Draw a conclusion based on the p-value in part a

• Comparing to 0.01

c. He gathers one hundred people who observed three or more fire alarms and observed:

$(X_1,X_2,...,X_{100}) = (4,6,...,3)$

with

$\bar{X}_{100} = \frac{1}{100} \sum_{i=1}^{100}X_i = 3.32$

Ignoring any flaw of data collection, calculate the test statistic (which is compared to the standard normal distribution) and the approximate p-value for testing

$H_0 : \lambda = 1$ versus $H_1 : \lambda > 1$

Also note that the population mean and the population variance are equal to $\lambda = 1$

• For this part I used a Test statistic for normal distribution

• $T = \frac{\bar{X} - \mu}{\sqrt{\frac{\sigma^2}{n}}}$

• As for the p-value for this question, I'm not so sure how to calculate.

d. In two sentences, argue why the sample size of $n = 100$ is not useful for the hypothesis testing.

Can anyone confirm if I'm going into the right direction for these questions/answers?

• I would add a comment but not enough points :) Remember what one definition of a p-value is: >p-value is the probability of obtaining the observed sample results, or "more extreme" results, when the null hypothesis is actually true From your answer above (part a.), are you accounting for "more extreme" results? Jun 9 '15 at 19:24
• From the context of the problem, it looks like observing one false alarm per year is normal so I would assume observing three or more would be a more extreme result! Jun 9 '15 at 19:29
• Ilan man is right for your question a). As for your main question, I might be wrong but I share your concern. To make sense I would suggest to take this "He gathers one hundred people who observed three or more fire alarms and observed" verbatim. He did not gather people which incidentally happened to have more than three alarm, he selected them on this basis. You can find the distribution of false alarm for these selected people. At least you can try and we can help, but it seems weird for a teacher to give such complicated and ambiguous questions. Jun 9 '15 at 19:30
• Indeed, however is that what you're calculating in part a.? Jun 9 '15 at 19:31
• Also, while it doesn't happen to impact your conclusion for c. , the variance of a Poisson is $\lambda$ as you correctly stated, however you used $\lambda^{2}$ in your formula. Jun 9 '15 at 19:38

I think the confusion comes out in this statement:

Since 0.019 > 0.01 (1% chance for falsely rejecting null hypothesis) it can be concluded that we failed to reject the null hypothesis.

Our hypothesis was that $\lambda=1$ but the probabilities you have calculated say that the alternative hypothesis is less likely. This cannot be correct. We observed $X=3$. Therefore the alternative hypothesis should be more likely. If you maximize the likelihood under the null hypothesis, you come up with an estimate of $\lambda$ that is... 3!

The problem is that the actual likelihood under the null is not $Pr(X \le 3)$ you should be calculating $Pr_{\lambda=1}(X=3)$ versus $Pr_{\lambda=3}(X=3)$. The data are fixed when calculating a likelihood. Using R I get

> dpois(x = 3, lambda = 1)
 0.06131324
> dpois(x = 3, lambda = 3)
 0.2240418


The 1% you calculated is NOT a probability of falsely rejecting the null hypothesis (alpha level). That is just a likelihood. You need to set an alpha level for inference.

Here is a visual depiction of how the likelihood function looks over a variety of $\lambda$ values: From the R code

curve(dpois(3, x), from=0, to=5, ylab='Likelihood', xlab='Lambda')


Since it is self-study I should not give you a complete answer. But recall the probabilities that you have calculated are also likelihoods. A likelihood calculated under the null hypothesis will usually be less than or equal to a likelihood under an alternative hypothesis. But that is not sufficient to make inference. You must appeal to what is known about the relationship between such likelihoods... what are the asymptotic properties of their ratio, for instance, or two times the log of that ratio? Under the null hypothesis, this statistic has a known distribution. Neyman and Pearson had a lot to say about this particular test. The known distribution is what you use to calculate the $p$-value.

Lastly selecting $n=100$ should be a power consideration. Run a power calculation and determine how many observations are necessary to reject the null with a certain probability when it is false.

• Thank you for the detailed information! I'm not really following up because I'm sort of lost in this section. I thought p-value had something to do with z-values and (I found a different p-value in part (a)) since p-value = 0.0803 and greater than 0.01.. wouldn't that be sufficient to say we fail to reject the hypothesis? Jun 9 '15 at 20:25
• @BobbyJacobs you need to clearly understand the difference between probability, likelihood, and p-values. P-values are probabilities calculated from a special distribution. Find your statistics textbook and read the entire chapter on likelihood ratio testing. You cannot finish this problem without that knowledge. Jun 9 '15 at 20:33
• Alright I'll try to look into it in my notes. Jun 9 '15 at 20:43