# Hardy-Weinberg applied to three alleles and stimation of allele frequencies

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?

-
in this case it will be r=1-p-q and similarly for others – WYSIWYG May 24 '13 at 6:48
Why do you need to separate homozygotes from heterozygotes? – jkadlubowska May 24 '13 at 8:52
I'm with jkadlubowska - what's the purpose of separating hetero and homozygotes? – MCM May 24 '13 at 12:40
To calculate the proportion of the alleles (p, q and r), if the homozygotes are three times than heterozygotes. – Cristian Velandia May 24 '13 at 21:56
So you omitted some data of this question? The thing is, you can substitute whatever you want, e.g. 1-p=q+r or p=1-q-r, but that leads you nowhere if you don't have any more data. Something like p^2+q^2+r^2=3pq+3pr+3rq is crucial to solving this problem. Anyway - these are two equasions, you still need a third to ba able to assign specific numbers to p, q and r. – jkadlubowska May 25 '13 at 5:08

Everybody said it already, but there is none. The original HWE equation ($(p+q)^2=1$) works because you've got two variables and two equations ($p+q=1$) to work with (in reality, these are just one equation and one variable, since $q=1-p$ so $p+(1-p))^2=1$). Now you have three variables and still only the one equation ($p+q+r=1$) which is, mathematically, impossible.