Tutorials › Statistical Genetics › Worked Sample-Size Calculations for a Biobank GWAS

Genome-Wide Association Study Design · Tutorial 356 of 989

Worked Sample-Size Calculations for a Biobank GWAS

Learn how to calculate and interpret required analyzable sample sizes for quantitative-trait and case-control GWAS designs.

Intermediate 10 min read

What You'll Learn

  • Apply a genome-wide significance threshold and target power to obtain a planning constant.
  • Calculate quantitative-trait sample size from allele frequency, effect size, and imputation quality.
  • Convert a binary-trait effective sample size into a total biobank sample size using the case fraction.
  • Allocate an approximate total between cases and controls and account for integer rounding.
  • Assess how changes in imputation quality alter a required sample size.

From Power Targets to Participant Counts

Power calculations become useful for study design when they yield a number of participants. For a biobank GWAS, that number depends not just on the target power, but also on the allele frequency, the association effect being planned for, the imputation quality of the variant, and—in a case-control study—the balance between cases and controls. The calculations below turn those inputs into analyzable sample sizes, which can then be translated into recruitment targets if some participants are expected to be excluded or have missing data.

A sample-size calculation is conditional on its assumptions. It does not promise that a study will detect a variant or that a particular effect exists. It answers a planning question: under a specified genetic model and set of design inputs, how many analyzable participants are needed to attain a chosen power at a chosen significance threshold?

Planning Equations and Assumptions

Let \(q\) be the frequency of the effect allele, with \(0<q<1\). Under Hardy–Weinberg equilibrium, the variance of an additive allele-count genotype is \(2q(1-q)\). For an imputed genotype dosage, use the planning approximation that its usable variance is \(2q(1-q)\mathrm{INFO}\), where \(\mathrm{INFO}\) is between 0 and 1. This treats INFO as a proportional reduction in genotype information; it is an approximation, not a guarantee that every imputation measure has exactly this interpretation.

Definition: In these calculations, \(N\) is the number of analyzable participants. For a quantitative trait, \(\beta_Q\) is the additive effect per effect allele in residual standard-deviation units. For a binary trait, \(\beta_L\) is the additive effect on the log-odds scale per allele, so the per-allele odds ratio is \(\exp(\beta_L)\). The target power is \(1-\beta_{\mathrm{II}}\), where \(\beta_{\mathrm{II}}\) is the Type II error rate. The significance level \(\alpha\) is the two-sided per-variant threshold used in the calculation.

The planning approximation uses a normal test statistic. Under the alternative, its mean is approximately the square root of the noncentrality parameter, \(\sqrt{\lambda}\). For a two-sided test, a convenient sample-size approximation sets \(\sqrt{\lambda}\) to \(z_{1-\alpha/2}+z_{1-\beta_{\mathrm{II}}}\), where \(z_u\) is the \(u\) quantile of the standard normal distribution. Define the resulting planning constant as

$$ C=\left(z_{1-\alpha/2}+z_{1-\beta_{\mathrm{II}}}\right)^2. $$

This is the usual high-threshold planning approximation: it makes the probability of crossing the boundary in the direction opposite the assumed effect negligible. For example, a two-sided threshold of \(5\times10^{-8}\) has \(z_{1-\alpha/2}\approx5.451\). The threshold is an input here; the calculation does not determine which variants belong to a testing family.

For a quantitative trait, assume an additive linear association model, independent participants, a correctly specified effect per allele, and residual variance represented by the chosen trait scale. With \(\beta_Q\) measured in residual standard deviations, the approximate noncentrality parameter is \(N\,2q(1-q)\mathrm{INFO}\,\beta_Q^2\). Setting this equal to \(C\) gives the sample-size formula.

$$ N_Q \approx \frac{C}{2q(1-q)\,\mathrm{INFO}\,\beta_Q^2}. $$

For a binary trait, let \(n_1\) and \(n_0\) be the numbers of cases and controls, and let \(K=n_1/(n_1+n_0)\) be the case fraction. Define the effective sample size as \(N_{\mathrm{eff}}=4/(1/n_1+1/n_0)=4NK(1-K)\). Under the additive logistic association approximation, the noncentrality parameter is approximately \(N_{\mathrm{eff}}\,2q(1-q)\mathrm{INFO}\,\beta_L^2/4\). Therefore the effective sample size required is four times the planning constant divided by the per-participant genotype-effect information, and the total sample size must account for the case fraction.

$$ N_{\mathrm{eff}} \approx \frac{4C}{2q(1-q)\,\mathrm{INFO}\,\beta_L^2}, \qquad N \approx \frac{N_{\mathrm{eff}}}{4K(1-K)}. $$

These approximations assume a common effect across participants and a valid association model, with no material loss of information from unaccounted relatedness, population structure, phenotype error, or other design features. Such issues can make the effective information smaller than the calculation assumes. The examples treat the stated inputs as known planning values and round the final required sample size up to a whole participant.

Why the Quantitative Formula Has This Form

For an additive regression of a quantitative trait on genotype dosage, the approximate variance of the estimated per-allele effect is the residual variance divided by the product of sample size and genotype variance. When the effect is measured in residual standard-deviation units, that residual variance is one. Using the INFO approximation, the standard error is therefore approximately \(1/\sqrt{N\,2q(1-q)\mathrm{INFO}}\). The signal-to-noise ratio under the planned effect is the effect divided by this standard error:

$$ \frac{\beta_Q}{SE(\hat{\beta}_Q)} \approx \beta_Q\sqrt{N\,2q(1-q)\mathrm{INFO}}, \qquad \lambda \approx N\,2q(1-q)\mathrm{INFO}\,\beta_Q^2. $$

The planning approximation requires \(\lambda\approx C\). Solving that equality for \(N\) gives the quantitative sample-size equation above. It also shows why, all else equal, halving the effect size requires about four times the sample size: the effect enters squared in the denominator.

Worked Example: Quantitative Trait With Moderate Imputation Quality

Suppose a biobank plans a quantitative-trait GWAS using a two-sided threshold of \(5\times10^{-8}\), 80% power, an effect allele frequency of \(q=0.30\), a planned effect of \(\beta_Q=0.05\) residual standard deviations per allele, and \(\mathrm{INFO}=0.90\). Assume the model and trait scale meet the conditions stated above.

For 80% power, \(z_{0.80}\approx0.8416\), and the stated threshold gives \(z_{1-\alpha/2}\approx5.451\). Thus the planning constant is \(C\approx(5.451+0.8416)^2\approx39.60\). The denominator of the quantitative sample-size equation is

$$ 2(0.30)(0.70)(0.90)(0.05)^2 =0.42(0.90)(0.0025) =0.000945. $$

Substitution gives

$$ N_Q \approx \frac{39.60}{0.000945} =41{,}904.76. $$

Rounding up, the design needs 41,905 analyzable participants under these displayed assumptions. The result is not the number to recruit if some participants will be unusable; recruitment would need to be larger to allow for expected exclusions or missing data.

Worked Example: Binary Trait With an Imbalanced Case Fraction

Consider a case-control biobank GWAS planned for 90% power at the same two-sided threshold, with \(q=0.10\), \(\beta_L=0.12\) log-odds units per effect allele, \(\mathrm{INFO}=0.80\), and a case fraction \(K=0.20\). The corresponding per-allele odds ratio is \(\exp(0.12)\approx1.13\). Assume the allele-frequency and effect inputs are appropriate for the sampled population and the logistic approximation is suitable.

For 90% power, \(z_{0.90}\approx1.2816\), so \(C\approx(5.451+1.2816)^2\approx45.33\). First calculate the genotype-effect information term:

$$ 2(0.10)(0.90)(0.80)(0.12)^2 =0.18(0.80)(0.0144) =0.0020736. $$

The required effective sample size is

$$ N_{\mathrm{eff}} \approx \frac{4(45.33)}{0.0020736} =\frac{181.32}{0.0020736} \approx87{,}442.13. $$

At a 20% case fraction, \(4K(1-K)=4(0.20)(0.80)=0.64\). Hence the total analyzable sample size is

$$ N \approx \frac{87{,}442.13}{0.64} \approx136{,}628.33. $$

The design therefore needs 136,629 analyzable participants when rounded up. At approximately 20% cases, this corresponds to about 27,326 cases and 109,303 controls. Using those integer allocations gives \(N_{\mathrm{eff}}=4(27{,}326)(109{,}303)/136{,}629\approx87{,}443\), slightly above the calculated requirement. The imbalance matters: the total is larger than the effective sample size because the available information is reduced when cases and controls are not balanced.

Worked Example: How Better Imputation Changes the Binary-Trait Design

Keep the binary-trait assumptions from the preceding calculation, but suppose the planned variant has \(\mathrm{INFO}=0.90\) rather than 0.80. The effect size, allele frequency, significance threshold, power, and case fraction are unchanged. The required total sample size is inversely proportional to INFO, so it can be updated by multiplying the previous unrounded total by \(0.80/0.90\):

$$ N \approx 136{,}628.33\left(\frac{0.80}{0.90}\right) \approx121{,}447.40. $$

Rounding up gives 121,448 analyzable participants. The improvement in INFO reduces the planned total by about 15,181 participants, but does not eliminate the need to meet the case-fraction assumption. This comparison is valid because all other inputs were held fixed and the same INFO-based approximation is being used in both calculations.

Reading and Using the Results

The equations make several design relationships explicit. For either trait type, sample size increases as the target effect gets smaller, as the allele becomes less frequent away from the most informative frequency of one half, or as imputation quality falls. For a binary outcome, sample size also increases when the case fraction moves away from one half, because \(4K(1-K)\) decreases. A case-control design can still be efficient with an imbalanced fraction, but it needs more total participants to achieve the same effective sample size.

The calculated number is conditional on the planned per-allele effect. If that effect was estimated from an unusually strong discovery result, it may be too optimistic for planning; a smaller, scientifically defensible effect gives a more conservative sample-size target. Likewise, INFO, allele frequency, and case fraction should represent the variant and analysis population the design is intended to support, not convenient values selected without justification.

These results are for analyzable participants. If a fraction \(r\) of enrolled participants is expected to be unusable, a simple recruitment adjustment is \(N_{\mathrm{recruit}}\approx N_{\mathrm{analyzable}}/(1-r)\). For instance, with 5% expected loss, a requirement of 41,905 analyzable participants implies \(41{,}905/0.95\approx44{,}111\) to recruit, rounded up. This adjustment assumes the loss rate is approximately known and does not introduce additional bias.

Common Mistakes

  • Using total \(N\) where effective sample size is required. In a case-control calculation, first determine \(N_{\mathrm{eff}}\), then divide by \(4K(1-K)\) to obtain the total. At a 20% case fraction, omitting this conversion substantially understates the needed total.
  • Applying INFO twice. In these equations, INFO already reduces the genotype information term. Do not also shrink the effect by INFO unless using a different, explicitly justified model.
  • Forgetting that effects are squared. A twofold smaller planned effect requires approximately four times the sample size, not twice the sample size.
  • Rounding intermediate results upward repeatedly. Keep adequate precision through the calculation and round the final participant requirement up once. For example, \(39.60/0.000945=41{,}904.76\), so the integer requirement is 41,905.
  • Interpreting the result as a guarantee. The count provides the target power only under the stated model and inputs. It does not guarantee discovery, establish that the planned effect is real, or account automatically for every source of information loss.
Key takeaway: For a quantitative trait, divide the power planning constant by genotype variance times INFO times the squared per-allele effect. For a binary trait, first calculate the required effective sample size and then convert it to a total using the case fraction. State the assumptions, retain precision, and round the final analyzable count up.

Check Your Understanding

Use the equations and assumptions in this tutorial to answer the following.

  1. For a quantitative-trait GWAS, why does reducing the planned per-allele effect by half increase the required sample size by about a factor of four?
  2. A binary study has \(K=0.10\). What is \(4K(1-K)\), and why is its total sample size larger than its effective sample size?
  3. If INFO decreases while every other input is unchanged, what happens to the required sample size? Explain using the formula.
  4. In a case-control calculation, why should the total sample size not be substituted directly for \(N_{\mathrm{eff}}\) when cases and controls are imbalanced?
  5. A calculation yields 20,400.02 participants. What integer sample size should be reported, and why?
Clinical Biostats