Tutorials › Statistical Genetics › Power And Sample Size For Genetic Instruments

Mendelian Randomization Foundations · Tutorial 842 of 989

Power And Sample Size For Genetic Instruments

Calculate approximate power and required sample sizes for a genetic instrument, then assess which design changes are likely to improve precision.

Advanced 12 min read

What You'll Learn

  • State the assumptions behind a normal-approximation power calculation for a single-instrument, two-sample MR study
  • Derive the approximate variance of the summary-data Wald ratio
  • Calculate two-sided power from instrument effect, allele frequency, and exposure and outcome sample sizes
  • Solve a target-power equation for the exposure or outcome sample size
  • Compare design trade-offs and recognize when one sample-size increase cannot achieve the target
  • Explain why power does not establish instrument validity or the truth of a causal interpretation

Why Power Depends on Both Samples

In a two-sample Mendelian randomization (MR) study, the genetic association with the exposure is estimated in one sample and the association with the outcome in another. The Wald ratio combines these estimates. Its precision therefore depends on both samples: a large outcome GWAS cannot fully compensate for a very imprecise exposure association, and the reverse is also true. Allele frequency matters because it determines how much variation in genotype is available; the size of the genetic effect on the exposure matters because a stronger association makes the ratio more precise.

Power calculations are useful before data collection or when comparing proposed designs. They quantify the chance of rejecting a specified null hypothesis under a stated model and effect size. They do not determine whether the instrument assumptions are true. The calculation below concerns a single genetic instrument and a continuous exposure and outcome, using a normal approximation for the summary-data Wald ratio.

Model and assumptions: Let \(G\) be the number of effect alleles carried by an individual, coded 0, 1, or 2. Assume Hardy–Weinberg equilibrium with effect-allele frequency \(f\), so \(\operatorname{Var}(G)=2f(1-f)\). In unrelated individuals, suppose the exposure and outcome are continuous and follow additive linear associations with \(G\). The two GWAS samples are independent, with sizes \(N_X\) and \(N_Y\). Assume the exposure association is \(\beta_{GX}\), the causal effect is \(\theta\), and the corresponding outcome association under the calculation model is \(\beta_{GY}=\theta\beta_{GX}\). For the formulas below, the residual variances in the exposure and outcome association models are \(\sigma_X^2\) and \(\sigma_Y^2\). This is a planning model: the normal approximation, independent samples, and specified effects and variances must be reasonable for the intended study.

For clarity, the worked calculations use phenotypes standardized to have residual variance 1, so \(\sigma_X^2=\sigma_Y^2=1\). Then \(\beta_{GX}\) is in exposure standard deviations per effect allele, \(\theta\) is in outcome standard deviations per exposure standard deviation, and the Wald ratio is in outcome standard deviations per exposure standard deviation. If phenotypes are not standardized, retain their residual variances and use effect sizes in matching units.

Approximate Variance and Power

Let \(\hat\beta_{GX}\) and \(\hat\beta_{GY}\) be the estimated genetic associations, and let \(\hat\theta=\hat\beta_{GY}/\hat\beta_{GX}\) be the summary-data Wald ratio. In a linear association model with the assumptions above, the approximate sampling variances of the two association estimates are

$$ \operatorname{Var}(\hat\beta_{GX})\approx\frac{\sigma_X^2}{N_X\,2f(1-f)} \qquad\text{and}\qquad \operatorname{Var}(\hat\beta_{GY})\approx\frac{\sigma_Y^2}{N_Y\,2f(1-f)}. $$

The delta method gives an approximate variance for a differentiable function of estimated quantities by linearizing that function around their true values. For the ratio \(g(a,b)=b/a\), the derivatives are \(-b/a^2\) and \(1/a\). Evaluated at \(a=\beta_{GX}\) and \(b=\beta_{GY}=\theta\beta_{GX}\), the derivatives are \(-\theta/\beta_{GX}\) and \(1/\beta_{GX}\). Because the two samples are independent, the covariance between the association estimates is zero. Thus:

$$ \begin{aligned} \operatorname{Var}(\hat\theta) &\approx \frac{\theta^2}{\beta_{GX}^2}\operatorname{Var}(\hat\beta_{GX}) +\frac{1}{\beta_{GX}^2}\operatorname{Var}(\hat\beta_{GY})\\ &= \frac{\sigma_Y^2/N_Y+\theta^2\sigma_X^2/N_X} {2f(1-f)\beta_{GX}^2}. \end{aligned} $$

This approximation treats the true associations as the expansion point and is most useful when the exposure association is estimated precisely enough that the ratio is well behaved. It is not a substitute for an appropriate analysis when the instrument is very weak. The earlier material on instrument strength and the F statistic describes a related strength diagnostic; the power calculation also needs the outcome sample size and the effect being targeted.

Approximate power: For a two-sided test of \(H_0:\theta=0\) at significance level \(\alpha\), let \(SE=\sqrt{\operatorname{Var}(\hat\theta)}\). Under a specified true effect \(\theta\), approximate power is $$ P\left(Z>z_{1-\alpha/2}-\frac{|\theta|}{SE}\right) + P\left(Z<-z_{1-\alpha/2}-\frac{|\theta|}{SE}\right), $$ where \(Z\sim N(0,1)\), \(z_q\) is the \(q\)-quantile of the standard normal distribution, and \(P(Z\le z_q)=q\). Equivalently, using the standard normal cumulative distribution function \(\Phi\), power is \(\Phi(|\theta|/SE-z_{1-\alpha/2})+\Phi(-|\theta|/SE-z_{1-\alpha/2})\).

The ratio \(|\theta|/SE\) is the signal measured in standard-error units. The first term in the power expression is usually the main contribution when the signal points toward the specified nonzero effect; the second accounts for rejection in the opposite tail. For a target power \(1-\beta\), a convenient planning approximation is

$$ \frac{|\theta|}{SE}\ge z_{1-\alpha/2}+z_{1-\beta}, \qquad \operatorname{Var}(\hat\theta)\le \frac{\theta^2}{(z_{1-\alpha/2}+z_{1-\beta})^2}. $$

This threshold approximation uses the normal critical value and is especially convenient for solving for a sample size. A final design should be checked with the full two-tailed power expression, particularly when power is modest or the design is near its target.

Worked Example: Power From Two Equal-Sized Samples

Suppose a hypothetical study has \(N_X=N_Y=100{,}000\), effect-allele frequency \(f=0.30\), and exposure association \(\beta_{GX}=0.05\) exposure standard deviations per allele. The target causal effect is \(\theta=0.20\) outcome standard deviations per exposure standard deviation. Assume both residual variances are 1, samples are independent, and the test is two-sided with \(\alpha=0.05\).

First, the genotype variance is \(2f(1-f)=2(0.30)(0.70)=0.42\). Substituting into the ratio-variance formula gives

$$ \operatorname{Var}(\hat\theta) \approx \frac{1/100{,}000+0.20^2/100{,}000} {0.42(0.05)^2} = \frac{0.0000100+0.000000400}{0.00105} =0.00990476. $$

Therefore \(SE=\sqrt{0.00990476}=0.09952\), and the signal is \(|\theta|/SE=0.20/0.09952=2.010\). At the 5% two-sided level, \(z_{0.975}=1.960\). The approximate power is

$$ \Phi(2.010-1.960)+\Phi(-2.010-1.960) =\Phi(0.050)+\Phi(-3.970) \approx 0.5198. $$

Thus, under the stated model and target effect, power is about 52%. The result is not a statement that the causal effect is likely to be present; it is the rejection probability if the specified effect and model are correct.

Solving for a Required Sample Size

A sample-size calculation rearranges the same variance expression. With both traits standardized, define \(V_G=2f(1-f)\). For target power \(1-\beta\), set \(K=z_{1-\alpha/2}+z_{1-\beta}\). The approximate target condition is

$$ \frac{1/N_Y+\theta^2/N_X}{V_G\beta_{GX}^2} \le \frac{\theta^2}{K^2}. $$

This equation makes an important design constraint visible: the contribution from the outcome sample is \(1/N_Y\), and the contribution from the exposure sample is \(\theta^2/N_X\). If one sample size is fixed, subtract its contribution from the allowable variance before solving for the other. If the remaining allowance is zero or negative, increasing only the other sample cannot attain the target.

Worked Example: Required Exposure Sample Size

Consider a hypothetical two-sample study targeting \(\theta=0.15\), with \(f=0.25\), \(\beta_{GX}=0.04\), \(N_Y=1{,}000{,}000\), and standardized residual variances equal to 1. The desired power is 80% for a two-sided test at \(\alpha=0.05\). The normal quantiles are \(z_{0.975}=1.960\) and \(z_{0.80}=0.8416\), so \(K=2.8016\) and \(K^2=7.8490\). Also \(V_G=2(0.25)(0.75)=0.375\), giving \(V_G\beta_{GX}^2=0.375(0.04)^2=0.0006000\).

The maximum ratio variance compatible with the approximate target is

$$ \frac{\theta^2}{K^2} = \frac{0.15^2}{7.8490} \approx 0.0028666. $$

The outcome-sample contribution to the variance is \(1/(N_Y V_G\beta_{GX}^2)=1/(1{,}000{,}000\times0.0006000)=0.0016667\). The exposure-sample contribution must therefore be no more than \(0.0028666-0.0016667=0.0011999\). Since that contribution is \(\theta^2/(N_X V_G\beta_{GX}^2)=0.0225/(0.0006000N_X)=37.5/N_X\),

$$ N_X\ge\frac{37.5}{0.0028666-0.0016667}\approx31{,}253. $$

Using the unrounded quantiles and intermediate values gives a threshold of approximately 31,250.4; the minimum integer sample size meeting this approximate condition is 31,251. A design can round up to at least 31,253 participants in the exposure GWAS for a small numerical safety margin. This is a normal-approximation planning result, not a guarantee of exactly 80% power in an actual analysis.

Worked Example: Allele Frequency and Design Trade-Offs

Suppose two hypothetical designs each have \(N_X=N_Y=200{,}000\), \(\beta_{GX}=0.03\), and target effect \(\theta=0.10\), with standardized residual variances of 1 and a two-sided \(\alpha=0.05\). Compare an allele frequency of \(0.50\) with an allele frequency of \(0.05\), holding the per-allele exposure effect fixed.

In both designs, the numerator of the ratio variance is \(1/200{,}000+0.10^2/200{,}000=0.00000505\), and \(\beta_{GX}^2=0.0009\). At \(f=0.50\), \(V_G=0.50\), so

$$ \operatorname{Var}(\hat\theta) \approx\frac{0.00000505}{0.50(0.0009)} =0.0112222,\qquad SE\approx0.1059,\qquad \frac{|\theta|}{SE}\approx0.944. $$

The resulting power is \(\Phi(0.944-1.960)+\Phi(-0.944-1.960)\approx0.1566\), or about 16%. At \(f=0.05\), \(V_G=2(0.05)(0.95)=0.095\), and

$$ \operatorname{Var}(\hat\theta) \approx\frac{0.00000505}{0.095(0.0009)} =0.05906,\qquad SE\approx0.2430,\qquad \frac{|\theta|}{SE}\approx0.4115. $$

Power is then \(\Phi(0.4115-1.960)+\Phi(-0.4115-1.960)\approx0.0696\), or about 7%. Under this hypothetical comparison, the less common allele gives less genotype variation and lower power. The comparison holds the per-allele exposure effect fixed; in real settings, effect size, imputation quality, and other design features may differ across variants, so allele frequency alone does not determine the best instrument.

Reading the Design Trade-Offs

The variance formula supports several practical conclusions. First, increasing either sample size reduces its contribution to variance, but the benefit of a very large sample in one GWAS is limited if the other GWAS remains small. Second, a larger \(|\beta_{GX}|\) reduces variance in proportion to \(\beta_{GX}^2\), while greater genotype variance \(2f(1-f)\) also improves precision when the per-allele effect is held fixed. Third, a smaller target \(|\theta|\) is harder to detect: with the design otherwise unchanged, the signal in standard-error units decreases.

When the outcome sample size is fixed, the required exposure sample can be solved as in the example. Conversely, if \(N_X\) is fixed, rearrange the target condition for \(N_Y\). In either direction, check that the fixed sample's variance contribution is below the full variance allowance. If it is not, no finite increase in the other sample alone will meet the target. This is a useful way to identify when resources should be shifted to the smaller or less informative GWAS.

These formulas address a specified effect and test threshold. If many instruments, outcomes, or hypotheses are tested, the relevant significance level may be more stringent than 0.05; using a smaller \(\alpha\) increases the critical value and generally raises the required sample size. Likewise, uncertainty in the assumed allele frequency, exposure association, residual variance, or target effect should be explored with sensitivity calculations rather than hidden behind a single power estimate.

Common Mistakes and Interpretation

  • Using only the outcome sample size. The Wald ratio also uses the estimated exposure association. Include both \(1/N_Y\) and \(\theta^2/N_X\) contributions in the variance.
  • Treating allele frequency as irrelevant. Under the additive dosage and Hardy–Weinberg assumptions, genotype variance is \(2f(1-f)\). A less common allele generally provides less genotype variation when its per-allele effect is held fixed.
  • Assuming a large F statistic guarantees high power. Instrument strength concerns the exposure association, whereas power for the MR estimate also depends on outcome sample size, effect size, allele frequency, and the test threshold.
  • Interpreting power as evidence that the instrument is valid. Power is conditional on the specified model. It does not establish that the instrument assumptions hold, nor does a statistically significant result by itself establish causation.
  • Reporting a target without specifying its inputs. State the assumed causal effect, significance level, target power, allele frequency, association effect, and sample sizes. A required sample size is conditional on these design choices.
Key takeaway: For a single-instrument, two-sample MR design, approximate precision is governed by $$ \operatorname{Var}(\hat\theta)\approx \frac{\sigma_Y^2/N_Y+\theta^2\sigma_X^2/N_X} {2f(1-f)\beta_{GX}^2}. $$ Use this variance with a stated test level and target effect to calculate power or solve for sample size. Treat the result as a model-based design calculation, not as a diagnostic of instrument validity.

Check Your Understanding

Answer each question using the assumptions and formulas stated above.

  1. If the exposure sample size is fixed, what quantity must be checked before solving for the required outcome sample size?
  2. For allele frequency \(f=0.10\), calculate the additive genotype variance \(2f(1-f)\).
  3. Holding the other design quantities fixed, how does doubling \(N_Y\) change the outcome-sample contribution to the approximate variance?
  4. Why can a very large outcome GWAS still yield limited power if the exposure association is imprecise?
  5. Does a power calculation establish that the genetic instrument satisfies the assumptions needed for a causal interpretation? Explain briefly.
Clinical Biostats