Which frequencies belong together
Two biallelic loci, fixed allele coding and haplotype frequencies from the same population. Both loci must be polymorphic for r2: 0<pA, pB<1. The joint frequency must satisfy max(0, pA+pB−1)≤pAB≤min(pA, pB). Unphased genotype data are not automatically these inputs.[1]
All four cells must be nonnegative and sum to 1.[2]
From independence to correlation
Indicator variances are p(1−p); their covariance is D.[1]
- Determine the four haplotype frequencies and check sum 1 and nonnegativity.
- Calculate marginal frequencies pA=pAB+pAb and pB=pAB+paB.
- Subtract the independent expectation from the joint frequency: D=pAB−pApB.
- Square D and divide by pA(1−pA)pB(1−pB); check 0≤r2≤1 and state the population.
Two fully worked cases
Valid haplotype distribution and positive D
- Given
- pAB=0.30, pA=0.50, pB=0.40; original teaching data.
- Find
- Validate inputs before computing D and r2.
The remaining frequencies are pAb=0.20, paB=0.10, pab=0.40; all are nonnegative and sum to 1.
Independence predicts pApB=0.20, so D=0.30−0.20=0.10.
The denominator is 0.06, so r2≈0.1667. The positive direction is recorded by D, not by its square.
Result: D=0.10 and r2=1/6≈0.167.
Check: The admissible joint frequency lies between 0 and 0.40; 0.30 lies inside.
Allele recoding reverses the sign
- Given
- pA=pB=0.5, pAB=0.10. Then recode B as b.
- Find
- Compute negative D and show the unchanged strength.
Initially D=0.10−0.25=−0.15 and r2=0.0225/0.0625=0.36.
After recoding, pb=0.5 and pAb=pA−pAB=0.40.
Now Dnew=0.40−0.25=+0.15. Its square and denominator are unchanged.
Result: D changes sign; r2 remains 0.36.
Check: The original four haplotypes 0.10,0.40,0.40,0.10 are valid. Recoding only relabels them.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
What the statistics do not establish
r2 is dimensionless. It is not recombination fraction r or an explained fraction for an arbitrary phenotype. Even maximal feasible D can yield r2 below 1 when marginal frequencies differ. The graphic therefore explicitly holds its marginal frequencies fixed.[1]
The calculator accepts only pA, pB, pAB and validates all four haplotype cells. It does not estimate phase, uncertainty, causality or physical distance. In a neutral recombination-only model, D decreases by factor 1−c per generation; additional processes can alter that trajectory.[2]
The bounded calculator requires marginals from 10−9 through 1−10−9; this numerical teaching bound is narrower than the mathematical domain 0<p<1.
Five exercises with solutions
Calculate · Foundation
pA=pB=0.5, pAB=0.40. Calculate D and r2.
Show hint
Compare pAB with 0.25.
Learning goal: Calculate D and r2
Show solution and calculation
D=0.15.
The denominator is 0.0625; r2=0.0225/0.0625=0.36.
Rearrange · Application
For pA=0.4, pB=0.5 and D=−0.05, find pAB.
Show hint
Use pAB=D+pApB.
Learning goal: Recover the joint frequency
Show solution and calculation
pAB=−0.05+0.20=0.15.
The other cells are 0.25,0.35,0.25, and are valid.
Interpret · Application
Two populations have D=±0.10 with pA=pB=0.5. What does r2 say about direction?
Show hint
Squaring removes the sign.
Learning goal: Distinguish strength from direction
Show solution and calculation
Both give r2=0.01/0.0625=0.16. r2 does not distinguish direction; report D or allele coding.
Error analysis · Application
pA=0.8, pB=0.7, pAB=0.2 are proposed for r2. Why are they invalid?
Show hint
Compute pab=1−pA−pB+pAB.
Learning goal: Detect impossible frequencies
Show solution and calculation
pab=−0.3 would be negative. pAB must be at least 0.5.
A formally computed quotient would not be a valid haplotype correlation.
Transfer · Challenge
pA=0.1, pB=0.5. Find the largest possible r2.
Show hint
The feasible endpoints are pAB=0 and 0.1.
Learning goal: Understand allele-frequency limits
Show solution and calculation
D ranges from −0.05 to +0.05.
The denominator is 0.1·0.9·0.5·0.5=0.0225.
Thus maximum r2=0.0025/0.0225=1/9≈0.111; 1 is not attainable despite maximal association.
Check your understanding with the formula’s reference test.
7 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Connect the statistical ideas
Recombination frequency describes inheritance events; do not confuse that r with allele correlation.
Pearson correlation provides the statistical standardization of allele indicators.
Hardy–Weinberg equilibrium concerns genotypes at one locus; LD concerns joint distributions across loci.
Sources for this explanation
Quanta · Updated November 9, 2026
- Matti Pirinen,University of Helsinki:GWAS7,§7.2 Linkage disequilibrium
- Reinhard Bürger,University of Vienna:Mathematical Population Genetics2020,§5 Recombination, pp45–48
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Added a full article with checked examples, learning tasks, explicit model limits and a native figure.
Cite this reference page
Quanta. Linkage Disequilibrium and r-squared. Updated November 9, 2026. https://quanta-study.de/en/formula-sheet/kopplungsungleichgewicht-r2
When citing a specific scientific statement, also cite the specialist source linked to that statement.