I have this equation: Corresponds to HW in equilibria with three alleles:
$(p+q+r)^2=1$
Expanding the square results:
$p^2+2pq+r^2+2pr+q^2+2qr = 1$
I need to separate homozygous and heterozygous, that means: $2pq+2pr+2qr=1-p^2-q^2-r^2$
How I can use a equivalence similar to $(p=1-q) or (q=1-p)$ in two alleles to resolve the last equation?
r=1-p-q
and similarly for others $\endgroup$