# Equilibrium Hardy-Weinberg

Hardy-Weinberg equilibrium law states that allele and genotype frequencies in a population will remain constant from one generation to next generation in the absence of disturbing factors. In this calculator, Hardy-Weinberg equilibrium can be used to calculate the expected common homozygotes, expected heterozygotes, expected rare homozygotes and the frequency range of the 2 (p and q) alleles from the observed genotypes.

### Calculator of Hardy-Weinberg equilibrium

Common Homozygotes
Heterozygotes
Rare Homozygotes
Chi-squared (chi2)
Common Homozygotes (Genotype)
Expected (CH)
Observed (CH)
Heterozygotes (Genotype)
Expected (H)
Observed (H)
Rare Homozygotes (Genotype)
Expected (RH)
Observed (RH)
Frequency Range
p Allele Frequency
q Allele Frequency

### Formula of Hardy-Weinberg equilibrium

pfreq = (CH + (0.5 * H)) / (CH + H + RH)

qfreq = (RH + (0.5 * H)) / (CH + H + RH)

ECH = pfreq * pfreq * (CH + H + RH)

EH = 2 * pfreq * qfreq * (CH + H + RH)

ERH = qfreq * qfreq * (CH + H + RH)

chi1 = ((CH – ECH) * (CH – ECH)) / ECH

chi2 = ((H – EH) * (H – EH)) / EH

chi3 = ((RH – ERH) * (RH – ERH)) / ERH

chi2 = chi1 + chi2 + chi3

• CH = Common Homozygotes
• H = Heterozygotes
• RH = Rare Homozygotes
• ECH = Expected Common Homozygotes
• EH = Expected Heterozygotes
• ERH = Expected Rare Homozygotes
• pfreq = p Allele Frequency
• pfreq = q Allele Frequency

It is also known as Hardy-Weinberg principle, model, theorem.

### Example of Hardy-Weinberg equilibrium

If the observed common homozygotes is 21, heterozygotes is 10 and rare homozygotes is 2, then

Step 1 : p Allele Frequency

pfreq =

= (21 + (0.5 * 10)) / (21 +10 + 2)

= (21 + 5) / 33

= 0.7879

Step 2 : q Allele Frequency

qfreq =

= (2 + (0.5 * 10)) / (21 + 10 + 2)

= 7 / 33

= 0.2121

Step 3 : Expected CH

Expected CH =

= 0.78 * 0.2121 * (21 + 10 + 2)

= 20.48

Step 4 : Expected H

Expected H =

= 2 * 0.78 * 0.2121 * (33)

= 11.03

Step 5 : Expected RH

Expected RH = 1.4848

Step 6 : Chi Square

chi1 = ((CH – ECH) * (CH – ECH)) / ECH

chi1 = ((21 – 20.4848) * (21- 20.4848)) / 20.4848

chi1=0.0129

chi2 = ((H – EH) * (H – EH)) / EH
chi2 = ((10 – 11.0303) * (10 – 11.0303)) / 11.0303
chi2 = 0.0962

chi3 = ((RH – ERH) * (RH – ERH)) / ERH
chi3 = ((2 – 1.4848) * (2 – 1.4848)) / 1.4848
chi3 = 0.1787

chi2 = chi1 + chi2 + chi3
chi2 = 0.0129+0.0962+0.1787
chi2 = 0.2879

Buenas tardes, quiero saber como debo citarlos. Gracias

How are the df calculated?

How do you calculate the expected value for the alleles

Daniel

Si una enfermedad es recesiva y la frecuencia del alelo que la genera es de
0,08, ¿cómo serán las frecuencias genotípicas?

I have one question please, the equation was as follows;
ECH = pfreq * pfreq * (CH + H + RH)
yet you have used the frequency of the rare allele in the following example ,
Step 3 : Expected CH

Expected CH =

= 0.78 * 0.2121 * (21 + 10 + 2)

Plus,
what do you mean exactly by the following;
chi2 = chi1 + chi2 + chi3

Aaron Castle

I love you, thank you for saving my grade in bio and letting me keep an A. Thank you!

hamzah H kzar

thank you so much to helping me by your this website

kamna srivastava srivastava

very useful. with you examples anybody can learn easily and population genetics.