Tutorials › High-Dimensional Genomic Data Analysis › Sampling Uncertainty In Genome-Wide Correlations

Co-Expression Networks · Tutorial 486 of 795

Sampling Uncertainty In Genome-Wide Correlations

Use Fisher’s z transformation to quantify uncertainty in individual gene-pair correlations and assess why many estimated correlations can be unstable when the number of genes is large relative to the sample size.

Advanced 12 min read

What You'll Learn

  • State the assumptions behind Fisher-transformation confidence intervals for Pearson correlations.
  • Calculate and back-transform a confidence interval for a gene-pair correlation.
  • Interpret interval width in relation to sample size and estimated correlation.
  • Explain why a genome-wide matrix can contain many large-looking correlations under a null model.
  • Recognize rank deficiency and other warning signs of an unstable estimated correlation matrix.
  • Compare Fisher intervals with bootstrap uncertainty estimates and identify their limitations.

Why Correlation Uncertainty Matters

A co-expression analysis may estimate a correlation for every pair of genes, but each estimate is based on a finite set of biological samples. Even when the underlying association is weak or absent, sampling variation produces nonzero correlations. With thousands of genes, the number of pairs can be enormous, so ordinary-looking estimation noise can create many large-looking entries in a correlation matrix. The issue is not only whether one pair's correlation is uncertain; it is whether the matrix as a whole can be trusted as a stable description of relationships.

This tutorial focuses on uncertainty for the Pearson correlation. Let \(X_{ig}\) and \(X_{ih}\) denote the expression measurements for genes \(g\) and \(h\) in sample \(i\), for \(i=1,\ldots,n\). Write \(\rho_{gh}\) for their population correlation in the population of biological units of interest, and \(r_{gh}\) for the sample Pearson correlation. These are measures of marginal association, not evidence that one gene causes changes in the other.

Definition: The Fisher transformation of a correlation \(r\), with \(-1<r<1\), is \(z=\operatorname{atanh}(r)=\frac{1}{2}\log\left(\frac{1+r}{1-r}\right)\). It maps correlations to the real line. Under independent sampling from a bivariate normal population, the transformed sample correlation is approximately normal, with mean near \(\operatorname{atanh}(\rho)\) and standard error \(1/\sqrt{n-3}\).

Assumptions and the Confidence-Interval Procedure

For a standard Fisher-transformation interval, the \(n\) pairs of measurements for the two genes should come from independent biological sampling units. Within a sampled unit, the two measurements form a pair. The usual approximation is justified most directly when the pairs follow a bivariate normal distribution; in practice it is an approximation whose accuracy improves with sample size. The measurements should be sufficiently well behaved that a few extreme observations do not dominate the Pearson correlation. The usual formula also assumes the same \(n\) complete pairs are used for both genes.

Under these conditions, transform the observed correlation, calculate an approximately normal interval on the transformed scale, then apply the hyperbolic tangent to its endpoints. For a two-sided confidence level of \(100(1-\alpha)\%\), the interval is:

$$ z_r=\operatorname{atanh}(r),\qquad SE(z_r)=\frac{1}{\sqrt{n-3}},\qquad \left[ \tanh\left(z_r-z_{1-\alpha/2}SE(z_r)\right), \tanh\left(z_r+z_{1-\alpha/2}SE(z_r)\right) \right]. $$

Here \(z_{1-\alpha/2}\) is the corresponding standard-normal quantile. For a 95% interval it is approximately 1.96. The reported interval is for the population correlation \(\rho\), not for a transformed quantity. Under repeated samples from the stated model, the procedure produces intervals that cover the same \(\rho\) about 95% of the time. It does not mean that a particular interval has a 95% probability of containing a fixed \(\rho\).

Worked Example: A 95% Interval for a Positive Gene-Pair Correlation

Suppose 30 independent hypothetical biological samples provide complete measurements for two genes, and their sample Pearson correlation is \(r=0.60\). Assume the paired expression measurements are reasonably consistent with the bivariate-normal approximation, with no single sample dominating the association. Calculate a 95% confidence interval for their population correlation.

First transform the sample correlation:

$$ z_r=\frac{1}{2}\log\left(\frac{1+0.60}{1-0.60}\right) =\frac{1}{2}\log(4) =0.6931. $$

The standard error is \(1/\sqrt{30-3}=1/\sqrt{27}=0.1925\). The margin on the transformed scale is \(1.96(0.1925)=0.3772\), so the transformed interval is \(0.6931\pm0.3772\), or \((0.3159,1.0703)\). Back-transform both endpoints:

$$ \left(\tanh(0.3159),\tanh(1.0703)\right) \approx (0.306,0.790). $$

Thus the 95% confidence interval is approximately 0.306 to 0.790. In context, the data are compatible with population correlations ranging from a moderate positive association to a strong positive association. The interval does not establish a causal relationship between the genes.

How Sample Size Controls Uncertainty

On the Fisher scale, the standard error depends on \(n\), not on the observed \(r\): it is \(1/\sqrt{n-3}\). Increasing the number of independent samples narrows the transformed interval, and therefore generally narrows the interval after back-transformation as well. Conversely, a correlation estimated from a small study may be quite uncertain even when its point estimate looks large. The transformation is especially useful because the raw correlation scale is bounded between -1 and 1 and has a sampling distribution that can be skewed, particularly when the true correlation is far from zero.

Worked Example: A Small Study and a Wide Interval

In a hypothetical study of \(n=12\) independent biological samples, two genes have sample correlation \(r=-0.40\). Assume complete pairs, no influential outliers, and a bivariate-normal approximation. Find and interpret a 95% interval.

The transformed estimate is:

$$ z_r=\frac{1}{2}\log\left(\frac{1-0.40}{1+0.40}\right) =\frac{1}{2}\log\left(\frac{0.60}{1.40}\right) \approx -0.4236. $$

The standard error is \(1/\sqrt{12-3}=1/3=0.3333\), and the margin is \(1.96(0.3333)=0.6533\). The transformed endpoints are \(-0.4236-0.6533=-1.0769\) and \(-0.4236+0.6533=0.2297\). Applying \(\tanh\) gives:

$$ \left(\tanh(-1.0769),\tanh(0.2297)\right) \approx (-0.792,0.226). $$

The interval is approximately -0.792 to 0.226. Although the observed correlation is negative, the interval includes zero and also includes correlations of appreciable magnitude in either direction. With only 12 samples, the data do not pin down the population correlation precisely.

Why a Genome-Wide Matrix Can Be Unstable

For \(G\) genes, the number of distinct off-diagonal gene pairs is \(G(G-1)/2\). Each pair has its own sampling uncertainty, and the uncertainty does not disappear merely because the matrix contains many entries. In fact, a large number of pairs makes it likely that some estimated correlations will be far from their population values. The entries are also dependent: correlations that share a gene are computed from overlapping measurements, so one cannot generally treat all pairwise estimates as independent.

A second warning comes from matrix rank. If all genes are measured on the same \(n\) samples and the data are centered by gene, the sample expression matrix has rank at most \(n-1\). Its sample correlation matrix therefore also has rank at most \(n-1\). When \(G>n-1\), the matrix is necessarily singular: some directions in the \(G\)-dimensional space cannot be estimated from the available samples. This is a structural limitation of the sample information, not a numerical software defect.

Worked Example: Many Apparently Large Correlations Under a Null Model

Consider a hypothetical dataset with \(G=1{,}000\) genes measured in \(n=40\) independent samples. For illustration, suppose every gene is independent of every other gene in the population, with normally distributed measurements. There are:

$$ \frac{1{,}000(999)}{2}=499{,}500 $$

distinct gene pairs. Under the null correlation \(\rho=0\), the Fisher approximation gives a standard error of \(1/\sqrt{40-3}=1/\sqrt{37}=0.1644\). For a sample correlation of magnitude at least 0.30, the transformed threshold is \(\operatorname{atanh}(0.30)=0.3095\), about \(0.3095/0.1644=1.883\) standard errors from zero. The approximate two-sided probability for one pair is about 0.060.

By linearity of expectation, the expected number of pairs with \(|r|\geq0.30\) is approximately \(499{,}500(0.060)=29{,}970\). This calculation does not require the pairwise events to be independent. Their dependence does, however, matter for the variability of that count and for interpreting which edges appear together. Also, the centered sample matrix has rank at most \(39\), far below 1,000. Thus a matrix can contain tens of thousands of moderate-looking sample correlations even when all population correlations are zero, while also being singular.

Diagnostics, Alternatives, and Limits

Fisher intervals address uncertainty for an individual Pearson correlation under a stated sampling model. Before interpreting them, check that observations correspond to independent biological units, that both genes use the same complete samples, and that the scatterplot is not dominated by outliers or strong nonlinear structure. A batch effect, unmodeled group structure, or repeated measurements can make the ordinary independent-pair model inappropriate. In those cases, an interval calculated from the nominal \(n\) may be too narrow or may describe a different estimand than intended.

A bootstrap can provide an alternative uncertainty estimate: resample biological units, recompute the correlation for each resample, and use the resulting distribution to form an interval. This can be useful when the Fisher approximation is questionable, but it still requires a defensible sampling unit and enough independent units to represent the population. Resampling genes instead of biological samples does not estimate sampling uncertainty in the observed subjects. For rank-based correlations, the Pearson Fisher formula is not automatically an exact interval procedure; use an interval method matched to the chosen correlation measure.

Fisher intervals are typically pointwise: their nominal coverage applies to one specified gene pair. They do not imply that all intervals across a genome-wide analysis jointly cover their correlations at the same confidence level. Nor do they make a noisy matrix stable. A small sample size, many genes, influential samples, or changes in preprocessing can cause estimated entries and downstream network summaries to vary substantially. Stability should be examined by checking sensitivity to reasonable analysis choices and, where possible, by comparing estimates across independent samples. A pointwise interval is a measure of uncertainty, not a guarantee of reproducibility.

A common mistake is to interpret an estimated correlation of 0.30 as compelling evidence of a gene link simply because it exceeds a chosen numerical threshold. That reasoning ignores both the sample size and the number of pairs examined. The correction is to quantify uncertainty for the relevant pair, recognize that thousands of noisy estimates are being considered, and avoid treating a sample correlation as a stable biological relationship without supporting evidence. A large point estimate can have a wide interval, and a matrix with many entries can be unstable even when each individual calculation is correct.

1
Specify the target and sampling units.
Define the population correlation for the two genes and verify that the independent units are biological samples rather than technical repeats.
2
Check the data and assumptions.
Confirm complete paired observations and inspect for outliers, strong nonlinear patterns, or sample structure that conflicts with the standard model.
3
Transform, quantify, and back-transform.
Calculate the Fisher-scale standard error, form the desired interval there, and back-transform its endpoints to the correlation scale.
4
Interpret the pair in the genome-wide setting.
Report the interval and sample size, then consider the number and dependence of all gene pairs and the matrix's sample-size limitations.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For \(n=27\) independent complete pairs, what is the Fisher-transformation standard error?
  2. A 95% Fisher interval for a gene pair is wide and includes zero. Does that prove the population correlation is zero?
  3. With \(G=500\) genes measured on \(n=20\) common samples, what is the maximum possible rank of the centered sample correlation matrix?
  4. Why is it incorrect to resample genes rather than biological samples when bootstrapping uncertainty in a gene-pair correlation?
  5. What does a pointwise 95% interval say, and what does it not say about thousands of gene pairs?

Solutions. (1) \(SE=1/\sqrt{27-3}=1/\sqrt{24}\approx0.2041\), on the Fisher scale. (2) No. It says the data do not exclude zero at the corresponding two-sided level under the model; it does not establish that the fixed population correlation equals zero. (3) At most \(n-1=19\), so the 500-by-500 matrix is singular. (4) The sampling uncertainty concerns which biological units were observed; resampling genes changes the variables rather than reproducing that sampling process. (5) Under the stated assumptions, the procedure has approximately 95% coverage for that one pair over repeated samples. It does not ensure simultaneous 95% coverage for all pairs or guarantee that the estimated matrix is stable.

Clinical Biostats