Skip to main content
added 21 characters in body
Source Link
COOLSerdash
  • 31.2k
  • 10
  • 104
  • 157

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_\theta(t)=\Pr[T\leq t;\theta]$ and $\bar{F}_\theta(t)=\Pr[T\geq t;\theta]$. Suppose the null value is $\theta_0$. The one-sided $p$-values are then denoted by $F_{\theta_0}(t), \bar{F}_{\theta_0}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_c=\min\{1,2\times\min(F_{\theta_0}(t), \bar{F}_{\theta_0}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_m=\sum_{T:f(T)\leq f(t)} f(T) $$ where $f(t) = \Pr[T=t;\theta_0]$.

$\textbf{blaker:}$ $p_b$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_b=\Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\min\{F_{\theta_0}(T), \bar{F}_{\theta_0}(T))\}$.

If $p(\theta_0)$ is a two-sided $p$-value testing $H_0:\theta=\theta_0$, then its $100(1-\alpha)\%$ matching confidence interval is the smallest interval that contains all $\theta_0$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_U)$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_L}(t) $$ and $$ \alpha/2=F_{\theta_U}(t). $$

The contradiction arises because poisson.test returns $p_m$ ($\textrm{minlike}$) as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_\theta(t)=\Pr[T\leq t;\theta]$ and $\bar{F}_\theta(t)=\Pr[T\geq t;\theta]$. Suppose the null value is $\theta_0$. The one-sided $p$-values are then denoted by $F_{\theta_0}(t), \bar{F}_{\theta_0}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_c=\min\{1,2\times\min(F_{\theta_0}(t), \bar{F}_{\theta_0}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_m=\sum_{T:f(T)\leq f(t)} f(T) $$ where $f(t) = \Pr[T=t;\theta_0]$.

$\textbf{blaker:}$ $p_b$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_b=\Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\min\{F_{\theta_0}(T), \bar{F}_{\theta_0}(T))\}$.

If $p(\theta_0)$ is a two-sided $p$-value testing $H_0:\theta=\theta_0$, then its $100(1-\alpha)\%$ matching confidence interval is the smallest interval that contains all $\theta_0$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_U)$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_L}(t) $$ and $$ \alpha/2=F_{\theta_U}(t). $$

The contradiction arises because poisson.test returns $p_m$ as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_\theta(t)=\Pr[T\leq t;\theta]$ and $\bar{F}_\theta(t)=\Pr[T\geq t;\theta]$. Suppose the null value is $\theta_0$. The one-sided $p$-values are then denoted by $F_{\theta_0}(t), \bar{F}_{\theta_0}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_c=\min\{1,2\times\min(F_{\theta_0}(t), \bar{F}_{\theta_0}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_m=\sum_{T:f(T)\leq f(t)} f(T) $$ where $f(t) = \Pr[T=t;\theta_0]$.

$\textbf{blaker:}$ $p_b$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_b=\Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\min\{F_{\theta_0}(T), \bar{F}_{\theta_0}(T))\}$.

If $p(\theta_0)$ is a two-sided $p$-value testing $H_0:\theta=\theta_0$, then its $100(1-\alpha)\%$ matching confidence interval is the smallest interval that contains all $\theta_0$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_U)$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_L}(t) $$ and $$ \alpha/2=F_{\theta_U}(t). $$

The contradiction arises because poisson.test returns $p_m$ ($\textrm{minlike}$) as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

deleted 70 characters in body
Source Link
Michael Hardy
  • 11.1k
  • 1
  • 33
  • 56

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_{\theta}(t)=Pr[T\leq t;\theta]$$F_\theta(t)=\Pr[T\leq t;\theta]$ and $\bar{F}_{\theta}(t)=Pr[T\geq t;\theta]$$\bar{F}_\theta(t)=\Pr[T\geq t;\theta]$. Suppose the null value is $\theta_{0}$$\theta_0$. The one-sided $p$-values are then denoted by $F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t)$$F_{\theta_0}(t), \bar{F}_{\theta_0}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_{c}=\textrm{min}\{1,2\times\textrm{min}(F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t))\}. $$$$ p_c=\min\{1,2\times\min(F_{\theta_0}(t), \bar{F}_{\theta_0}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_{m}=\sum\limits_{T:f(T)\leq f(t)}f(T) $$$$ p_m=\sum_{T:f(T)\leq f(t)} f(T) $$ where $f(t) = Pr[T=t;\theta_{0}]$$f(t) = \Pr[T=t;\theta_0]$.

$\textbf{blaker:}$ $p_{b}$$p_b$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_{b}=Pr[\gamma(T)\leq\gamma(t)] $$$$ p_b=\Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\textrm{min}\{F_{\theta_{0}}(T), \bar{F}_{\theta_{0}}(T))\}$$\gamma(T)=\min\{F_{\theta_0}(T), \bar{F}_{\theta_0}(T))\}$.

If $p(\theta_{0})$$p(\theta_0)$ is a two-sided $p$-value testing $H_{0}:\theta=\theta_{0}$$H_0:\theta=\theta_0$, then its $100(1-\alpha)$%$100(1-\alpha)\%$ matching confidence interval is the smallest interval that contains all $\theta_{0}$$\theta_0$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_{U})$$(\theta_{L},\theta_U)$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_{L}}(t) $$$$ \alpha/2=\bar{F}_{\theta_L}(t) $$ and $$ \alpha/2=F_{\theta_{U}}(t). $$$$ \alpha/2=F_{\theta_U}(t). $$

The contradiction arises because poisson.test returns $p_{m}$$p_m$ as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_{\theta}(t)=Pr[T\leq t;\theta]$ and $\bar{F}_{\theta}(t)=Pr[T\geq t;\theta]$. Suppose the null value is $\theta_{0}$. The one-sided $p$-values are then denoted by $F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_{c}=\textrm{min}\{1,2\times\textrm{min}(F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_{m}=\sum\limits_{T:f(T)\leq f(t)}f(T) $$ where $f(t) = Pr[T=t;\theta_{0}]$.

$\textbf{blaker:}$ $p_{b}$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_{b}=Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\textrm{min}\{F_{\theta_{0}}(T), \bar{F}_{\theta_{0}}(T))\}$.

If $p(\theta_{0})$ is a two-sided $p$-value testing $H_{0}:\theta=\theta_{0}$, then its $100(1-\alpha)$% matching confidence interval is the smallest interval that contains all $\theta_{0}$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_{U})$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_{L}}(t) $$ and $$ \alpha/2=F_{\theta_{U}}(t). $$

The contradiction arises because poisson.test returns $p_{m}$ as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_\theta(t)=\Pr[T\leq t;\theta]$ and $\bar{F}_\theta(t)=\Pr[T\geq t;\theta]$. Suppose the null value is $\theta_0$. The one-sided $p$-values are then denoted by $F_{\theta_0}(t), \bar{F}_{\theta_0}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_c=\min\{1,2\times\min(F_{\theta_0}(t), \bar{F}_{\theta_0}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_m=\sum_{T:f(T)\leq f(t)} f(T) $$ where $f(t) = \Pr[T=t;\theta_0]$.

$\textbf{blaker:}$ $p_b$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_b=\Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\min\{F_{\theta_0}(T), \bar{F}_{\theta_0}(T))\}$.

If $p(\theta_0)$ is a two-sided $p$-value testing $H_0:\theta=\theta_0$, then its $100(1-\alpha)\%$ matching confidence interval is the smallest interval that contains all $\theta_0$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_U)$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_L}(t) $$ and $$ \alpha/2=F_{\theta_U}(t). $$

The contradiction arises because poisson.test returns $p_m$ as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

added 61 characters in body
Source Link
COOLSerdash
  • 31.2k
  • 10
  • 104
  • 157

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_{\theta}(t)=Pr[T\leq t;\theta]$ and $\bar{F}_{\theta}(t)=Pr[T\geq t;\theta]$. Suppose the null value is $\theta_{0}$. The one-sided $p$-values are then denoted by $F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values aboundedbounded above by 1: $$ p_{c}=\textrm{min}\{1,2\times\textrm{min}(F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_{m}=\sum\limits_{T:f(T)\leq f(t)}f(T) $$ where $f(t) = Pr[T=t;\theta_{0}]$.

$\textbf{blaker:}$ $p_{b}$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_{b}=Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\textrm{min}\{F_{\theta_{0}}(T), \bar{F}_{\theta_{0}}(T))\}$.

If $p(\theta_{0})$ is a two-sided $p$-value testing $H_{0}:\theta=\theta_{0}$, then its $100(1-\alpha)$% matching confidence interval is the smallest interval that contains all $\theta_{0}$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_{U})$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_{L}}(t) $$ and $$ \alpha/2=F_{\theta_{U}}(t). $$

The contradiction arises because poisson.test returns $p_{m}$ as the $p$-value withbut confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_{\theta}(t)=Pr[T\leq t;\theta]$ and $\bar{F}_{\theta}(t)=Pr[T\geq t;\theta]$. Suppose the null value is $\theta_{0}$. The one-sided $p$-values are then denoted by $F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values abounded above by 1: $$ p_{c}=\textrm{min}\{1,2\times\textrm{min}(F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_{m}=\sum\limits_{T:f(T)\leq f(t)}f(T) $$ where $f(t) = Pr[T=t;\theta_{0}]$.

$\textbf{blaker:}$ $p_{b}$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_{b}=Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\textrm{min}\{F_{\theta_{0}}(T), \bar{F}_{\theta_{0}}(T))\}$.

If $p(\theta_{0})$ is a two-sided $p$-value testing $H_{0}:\theta=\theta_{0}$, then its $100(1-\alpha)$% matching confidence interval is the smallest interval that contains all $\theta_{0}$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_{U})$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_{L}}(t) $$ and $$ \alpha/2=F_{\theta_{U}}(t). $$

The contradiction arises because poisson.test returns $p_{m}$ as the $p$-value with confidence limits based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits:

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

There are several ways to define two-sided $p$-values in this case. Michael Fay lists three in his article. The following is mostly taken from his article.

Suppose you have a discrete test statistic $t$ with random variable $T$ such that larger values of $T$ imply larger values of a parameter of interest, $\theta$. Let $F_{\theta}(t)=Pr[T\leq t;\theta]$ and $\bar{F}_{\theta}(t)=Pr[T\geq t;\theta]$. Suppose the null value is $\theta_{0}$. The one-sided $p$-values are then denoted by $F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t)$, respectively.

The three ways listed to define two-sided $p$-values are as follows:

$\textbf{central:}$ $p_{c}$ is 2 times the minimum of the one-sided $p$-values bounded above by 1: $$ p_{c}=\textrm{min}\{1,2\times\textrm{min}(F_{\theta_{0}}(t), \bar{F}_{\theta_{0}}(t))\}. $$

$\textbf{minlike:}$ $p_{m}$ is the sum of probabilities of outcomes with likelihoods less than or equal to the observed likelihood: $$ p_{m}=\sum\limits_{T:f(T)\leq f(t)}f(T) $$ where $f(t) = Pr[T=t;\theta_{0}]$.

$\textbf{blaker:}$ $p_{b}$ combines the probability of the smaller observed tail with the smallest probability of the opposite tail that does not exceed that observed probability. This may be expressed as: $$ p_{b}=Pr[\gamma(T)\leq\gamma(t)] $$ where $\gamma(T)=\textrm{min}\{F_{\theta_{0}}(T), \bar{F}_{\theta_{0}}(T))\}$.

If $p(\theta_{0})$ is a two-sided $p$-value testing $H_{0}:\theta=\theta_{0}$, then its $100(1-\alpha)$% matching confidence interval is the smallest interval that contains all $\theta_{0}$ such that $p(\theta_{0})>\alpha$. The matching confidence limits to the $\textbf{central}$ test are $(\theta_{L},\theta_{U})$ which are the solutions to: $$ \alpha/2=\bar{F}_{\theta_{L}}(t) $$ and $$ \alpha/2=F_{\theta_{U}}(t). $$

The contradiction arises because poisson.test returns $p_{m}$ as the $p$-value but confidence limits that are based on the $\textrm{central}$ test!

The exactci package returns the correct matching $p$-values and confidence limits (you can set the method using the option tsmethod):

library(exactci)

poisson.exact(x=10, r=5.22, tsmethod = "central")

    Exact two-sided Poisson test (central method)

data:  10 time base: 1
number of events = 10, time base = 1, p-value = 0.08105
alternative hypothesis: true event rate is not equal to 5.22
95 percent confidence interval:
  4.795389 18.390356
sample estimates:
event rate 
        10 

Now there is no conflict between the $p$-value and the confidence intervals. In rare cases, even the exactci function will result in inconsistencies, which is mentioned in Michael Fays article.

Source Link
COOLSerdash
  • 31.2k
  • 10
  • 104
  • 157
Loading