Why Sampling Variance Matters
An allele frequency calculated from a sample is not generally identical to the frequency in the population from which the sample came. A different sample would usually contain a different number of copies of the allele. Sampling variance describes this variation across repeated samples taken under the same sampling procedure. It tells us how much precision to expect from an allele-frequency estimate, before moving on to interval estimation or other inference.
The central calculation is simple when the sampled chromosomes behave as independent draws from a population with a fixed allele frequency. The important work is understanding what that assumption means and recognizing when the sample design makes it implausible.
Allele-Frequency Estimator as a Sample Mean
Consider one allele of interest at a specified genetic variant. Let \(p\) denote its frequency in the population. For chromosome copy \(i\), define an indicator \(X_i\) that equals 1 if that copy carries the allele and 0 otherwise. For a sample of \(m\) chromosome copies, let \(K\) be the number carrying the allele. The sample allele-frequency estimate is the fraction of sampled copies that carry it.
If every sampled chromosome copy is an independent draw with probability \(p\) of carrying the allele, then each \(X_i\) is a Bernoulli random variable with mean \(p\) and variance \(p(1-p)\). Consequently, the allele count \(K\) has a binomial distribution. The variance formula below is a statement about repeated samples under this model; it is not a claim that the observed sample itself changes.
Deriving the Binomial Sampling Variance
The derivation follows from the sample-mean representation. Each indicator has expectation \(E(X_i)=p\). Since the indicators are independent, the expectation of their sum is the sum of their expectations, and the variance of their sum is the sum of their variances. Dividing the sum by \(m\) divides its variance by \(m^2\).
Using \(E(X_i)=p\), the expected estimated frequency is \(E(\hat{p})=m^{-1}\sum_{i=1}^{m}E(X_i)=p\). Thus, the estimator is unbiased under the stated sampling model.
Because \(X_i\) is 1 with probability \(p\) and 0 with probability \(1-p\), \(\operatorname{Var}(X_i)=p(1-p)\).
Independence gives \(\operatorname{Var}(\sum_i X_i)=\sum_i\operatorname{Var}(X_i)=mp(1-p)\). Therefore \(\operatorname{Var}(\hat{p})=\operatorname{Var}(\sum_i X_i/m)=p(1-p)/m\).
The standard deviation \(SD(\hat{p})\) is the theoretical standard error when the population frequency \(p\) is known. In practice, \(p\) is usually unknown. Substituting the observed estimate \(\hat{p}\) for \(p\) gives the usual estimated standard error:
The variance and standard error have different units: the variance is in squared frequency units, while the standard error is on the frequency scale. Since frequencies are proportions, both frequency and standard error are dimensionless proportions, often reported as proportions or percentage points. This estimated standard error measures sampling variability under the model; it does not include sources of error such as genotyping mistakes or a sample that systematically fails to represent the target population.
Worked Example: Estimating the Standard Error From Genotypes
Suppose a hypothetical sample has 20 diploid individuals at a biallelic variant: 5 have genotype \(AA\), 8 have genotype \(Aa\), and 7 have genotype \(aa\). Estimate the frequency of allele \(A\) and its standard error under independent chromosome sampling.
Each individual contributes two chromosome copies, so there are \(m=2(20)=40\) sampled copies. Each \(AA\) individual contributes two copies of \(A\), each \(Aa\) individual contributes one, and each \(aa\) individual contributes none. Thus, \(K=2(5)+8=18\), and:
Substitute this estimate and the number of chromosome copies into the estimated standard-error formula:
Under the independent chromosome model, the estimated standard error is about 0.0787, or 7.87 percentage points. This describes the approximate scale of sample-to-sample variation in the estimated frequency under the assumed model. The calculation does not require Hardy–Weinberg equilibrium for the observed genotype counts; it does require the chromosome copies to satisfy the independence assumption for this variance formula.
How Sample Size Affects Precision
The variance is inversely proportional to the number of independently sampled chromosome copies, \(m\). If \(m\) is multiplied by four while \(p\) stays fixed, the variance is divided by four and the standard error is divided by two. More observations therefore reduce sampling variability, but the reduction in standard error is proportional to the square root of sample size, not to sample size itself.
Worked Example: Comparing Two Independent Sample Sizes
For illustration, suppose the true frequency of a particular allele in a hypothetical population is \(p=0.10\). Compare the theoretical standard errors for samples of \(m=200\) and \(m=800\) independently sampled chromosome copies.
For 200 copies, the binomial sampling variance and standard error are:
For 800 copies, they are:
The larger sample has four times as many chromosome copies, one-quarter the variance, and approximately half the standard error. These are theoretical standard errors because the example supplies the true \(p\). In an actual sample, the population frequency is unknown and the plug-in estimate is used instead.
When Chromosome Copies Are Not Independent
The binomial variance depends on more than the number of chromosome copies and their marginal allele frequency: it also depends on independence. For indicators with the same marginal frequency \(p\), but possible dependence, the exact variance of their mean is:
This expression follows by expanding the variance of a sum: it contains each indicator's variance and twice the covariance for every distinct pair. When all covariances are zero, it reduces to \(p(1-p)/m\). Positive covariance increases the variance relative to that independent-sampling benchmark; negative covariance decreases it. The simple binomial formula is not justified merely because the observations are recorded as individual chromosome copies.
For example, when sampling diploid individuals, the two homologous chromosome copies within one person need not be independent. A random-mating model with independent allele copies is one setting that can justify the binomial calculation, but relatedness, population structure in the sampling design, or other dependence can change the covariance terms. Dependence between people, such as sampling relatives, can also matter. The relevant issue is the sampling design and joint distribution of the indicators, not just the fact that every person contributes two copies.
Worked Example: Correlated Copies Within Individuals
Consider a hypothetical sample of \(n=50\) diploid individuals, giving \(m=100\) chromosome copies. Suppose each copy has marginal allele frequency \(p=0.25\), copies from different individuals are independent, and the two copies within each individual have correlation \(\rho=0.20\). This is a specified illustrative dependence model, not a claim that this correlation can be inferred from the sample size alone.
Each chromosome indicator has variance \(p(1-p)=0.25(0.75)=0.1875\). For the two copies within an individual, the covariance is \(\rho p(1-p)=0.20(0.1875)=0.03750\). There are 50 within-individual pairs and no covariance terms between different individuals. Applying the general variance formula gives:
The corresponding standard deviation is \(\sqrt{0.002250}\approx 0.04743\). If the 100 copies were incorrectly treated as independent, the variance would instead be \(0.1875/100=0.001875\), with standard deviation \(\sqrt{0.001875}\approx0.04330\). In this example, positive within-person dependence makes the actual sampling variability larger than the independence formula suggests.
Sampling Without Replacement
Independence is also affected by how a finite set of chromosome copies is sampled. If \(m\) copies are selected without replacement from a finite population of \(M\) copies containing a fixed fraction \(p\) of the allele, the sample count follows a hypergeometric rather than a binomial distribution. Its sample-frequency variance is:
The factor \((M-m)/(M-1)\) is the finite-population correction. It reduces variance because selecting a copy changes which copies remain available; if the entire finite population is sampled, \(m=M\), the sample frequency equals the population frequency and the variance is zero. When the sample is small relative to \(M\), this correction is close to one, so the binomial approximation is often reasonable. This formula addresses sampling without replacement from a finite population; it does not automatically account for other dependence, such as related individuals.
Common Mistakes and Practical Interpretation
- Using individuals instead of chromosome copies in the denominator. For diploid autosomal genotypes with complete calls, \(n\) individuals contribute \(m=2n\) copies. The allele count is the number of copies carrying the allele, not the number of people with at least one copy.
- Treating the plug-in standard error as a known population quantity. The theoretical variance uses \(p\), while the estimated standard error substitutes \(\hat{p}\) because \(p\) is unknown.
- Assuming that a large sample guarantees independence. More observations do not remove covariance introduced by the sampling design. If copies are correlated, the covariance terms remain part of the variance.
- Confusing sampling variation with bias. The estimator is unbiased under independent sampling from the specified population, but this does not guarantee that a nonrepresentative or error-prone sample estimates the intended population frequency well.
- Interpreting a standard error as the observed error. A standard error describes the model-based variability across repeated samples; it is not the known difference between this sample estimate and the unknown population frequency.
Check Your Understanding
Answer each question using the sampling model stated in the question.
- A sample contains 60 diploid individuals with complete genotypes. How many chromosome copies contribute to an autosomal allele-frequency estimate?
- Under independent chromosome sampling, why is the variance of \(\hat{p}\) equal to \(p(1-p)/m\) rather than \(p(1-p)/m^2\)?
- A sample has \(K=24\) copies of an allele among \(m=80\) chromosome copies. Calculate \(\hat{p}\) and its plug-in standard error under the independent model.
- What additional terms are needed in the variance of \(\hat{p}\) when chromosome indicators can be correlated?
- Why does sampling without replacement from an entire finite population produce no sampling variance in the estimated frequency?