Testing whether the outcome of $x=10$ counts is compatible with a rate of $\lambda=5.22$ in R:
> poisson.test(x=10,r=5.22,alternative='two.sided')
Exact Poisson test
data: 10 time base: 1
number of events = 10, time base = 1, p-value = 0.04593
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
4.795389 18.390356
sample estimates:
event rate
10
This result leads to two contradictory conclusions:
- The p-value is less than 0.05, which suggests that $\lambda\neq{5.22}$
- However the 95% confidence interval is [$4.795389 < 5.22 < 18.390356$]$[4.795389 < 5.22 < 18.390356]$, which keeps alive the hypothesis that $\lambda=5.22$
Thus this example violates the duality between hypothesis tests and confidence intervals. How is this possible?