In an experiment, there are \(n\) samples. For each sample, we get
\(m\) pairs of replicates. For each pair, one replicate will receive no treatment. The other
replicate will receive treatment. The outcome is the expression of a gene. The overall goal of the experiment is to check if the treatment affects gene expression level or not. Or equivalently, the overall goal of the experiment is to test if the mean within-pair difference of gene expression is equal to zero or not. In the design stage, we would like to calculate the power/sample size of the experiment for testing if the mean within-pair difference of gene expression is equal to zero or not.
We assume the following linear mixed effects model to characterize the
relationship between the within-pair difference of gene expression \(y_{ij}\) and
the mean of the within-pair difference \(\beta_{0i}\):
$$y_{ij} = \beta_{0i} + \epsilon_{ij},$$
where
$$\beta_{0i} \sim N\left(\beta_0, \sigma^2_{\beta}\right),$$
and
$$\epsilon_{ij} \sim N\left(0, \sigma^2\right),$$
\(i=1,\ldots, n\), \(j=1,\ldots, m\), \(n\) is the number of
subjects, \(m\) is the number of pairs of replicates per subject,
\(y_{ij}\) is the within-pair difference of outcome value for the \(j\)-th pair of the \(i\)-th subject.
We would like to test the following hypotheses:
$$H_0: \beta_0=0,$$
and
$$H_1: \beta_0 = \delta,$$
where \(\delta\neq 0\). If we reject the null hypothesis \(H_0\)
based on a sample, we then get evidence that the treatment affects
the gene expression level.
We can derive the power calculation formula:
$$power=1- \Phi\left(z_{\alpha^{*}/2}-a\times b\right)
+\Phi\left(-z_{\alpha^{*}/2} - a\times b\right),$$
where
$$a=
\frac{1
}{\sigma_y}$$
and
$$
b=\frac{\delta\sqrt{mn}}{\sqrt{1+(m-1)\rho}}
$$
and \(z_{\alpha^{*}/2}\) is the upper \(100\alpha^{*}/2\)
percentile of the standard normal distribution,
\(\alpha^{*}=\alpha/nTests\), nTests is the number of
tests,
\(\sigma_y=\sqrt{\sigma^2_{\beta}+\sigma^2}\)
and \(\rho=\sigma^2_{\beta}/\left(\sigma^2_{\beta}+\sigma^2\right)\) is the intra-class correlation.