# Optimal Tests for Combining \(p\)-Values
## 2 Methods
### New Tests Based on Gamma Distribution
#### 2.2.1 Gamma Distribution-Base Test \(T_{G(\alpha,\beta)}\)  
Define the following test statistic:  
\[T_{G(\alpha,\beta)}(P_{1},P_{2},\cdots,P_{n})=\sum_{i=1}^{n}F_{G(\alpha,\beta )}^{-1}(1-P_{i}), \tag{6}\]  
where \(F_{G(\alpha,\beta)}^{-1}(y)\) is the inverse function of the CDF \(F_{G(\alpha,\beta)}(x)\).  
We also define the following right-tailed \(p\)-value for \(T_{G(\alpha,\beta)}\):  
\[P=\Pr(Gamma(Gamma(n\alpha,\beta)>t)=1-F_{G(\alpha,\beta)}(t)=S_{G(\alpha, \beta)}(t) \tag{7}\]  
where \(t\) is the observed value for the test \(T_{G(\alpha,\beta)}\), and \(F_{G(\alpha,\beta)}(\cdot)\) and \(S_{G(\alpha,\beta)}(\cdot)\) are the CDF and the survival function of \(Gamma(n\alpha,\beta)\), respectively.  
The above test determined by the test statistic \(T_{G(\alpha,\beta)}\) in (6) and the \(p\)-value \(P\) in (7) is called \(T_{G(\alpha,\beta)}\). The \(p\)-value for a specific test \(T\) is also denoted as \(P_{T}\). Therefore, the \(p\)-value in (7) can also be written as \(P_{T_{G(\alpha,\beta)}}\). Based on the properties of gamma distributions, we have the following result for the test \(T_{G(\alpha,\beta)}\):  
**Proposition 1**.: _The test \(T_{G(\alpha,\beta)}\) with statistic defined in (6) and \(p\)-value defined in (7) controls type I error rate exactly at given significance level._  
To study the properties of the new tests, we use the following definitions:  
**Definition 1**.: _Two tests \(T_{1}\) and \(T_{2}\) are called equivalent and denoted as \(T_{1}\equiv T_{2}\) if \(p_{T_{1}}(x)=p_{T_{2}}(x)\) for any observed data \(x\), where \(p_{T_{i}}(x)\) is the \(p\)-value obtained by test \(T_{i}(i=1,2)\) from given data \(x\)._  
Based on the properties of the gamma distributions, we can easily verify the following result:  
**Proposition 2**.: _For any \(\alpha>0\) and \(\beta>0\), \(T_{G(\alpha,\beta)}\equiv T_{G(\alpha,1)}\)._  
Therefore, the rate parameter of the gamma distribution has no effect on the test \(T_{G(\alpha,\beta)}\). For convenience, in this paper, we set \(\beta=1\) and use \(T_{G(\alpha)}\) to denote \(T_{G(\alpha,1)}\) hereafter unless otherwise specified.  
**Definition 2**.: _A positively-valued function \(c(\theta)\) is called the exact slope of the sequence of tests \(T_{n}\) if \(\underset{n\rightarrow\infty}{lim}[(-2/n)ln(1-F_{n}(T_{n}))]=c(\theta)\) with probability \(1\), where \(F_{n}(T_{n})\) is the CDF of \(T_{n}\). A test is called asymptotically Bahadur optimal (ABO) if its exact slope is maximal at every \(\theta\in\Theta-\Theta_{0}\), where \(\Theta\) is the parameter space, and \(\Theta_{0}\) is the parameter space under the null hypothesis. The exact slope is a measure of the rate at which the attained \(p\)-value of a test statistic tends to 0 and is a measure of asymptotic efficiency._  
It has been proven that \(T_{G(\alpha,1/2)}\) is ABO for any \(\alpha\in(0,\infty)\)[27]. Hence, from proposition 2, we have the following property:  
**Proposition 3**.: _The test \(T_{G(\alpha)}\) is ABO for any \(\alpha\in(0,\infty)\)._  
Previously, we proposed a different \(p\)-value combination test based on gamma distribution with the test statistic \(T=\sum_{i=1}^{n}F_{G(1/P_{i},1)}^{-1}(1-P_{i})\), which uses the random shape parameter \(a_{i}=1/P_{i}\) for \(p\)-value \(P_{i}\), and its null distribution is intractable, and a resampling method is used to estimate the \(p\)-value. While in the current proposed tests, the same shape parameter is used for all individual \(p\)-values.