Allele frequency question
Same as @bpedit but stated a little bit differently.


  You are heterozygous at locus A. Both of your alleles, A1 and A2, have a 10% allele frequency in the population. If you are one of 22 people in a room, how many people do you expect to share a locus A allele with?


There are 5 possible genotypes that could share at least one allele with "you" A1|A1, A1|A2, A2|A2, A1|A3 and A2|A3, where A3 is the allele (or set of alleles) which frequency is $0.8$. Under Hardy-Weinberg assumptions, the frequencies of each of these genotypes are


$f(A1|A1) = 0.1^2$
$f(A1|A2) = 2 \cdot 0.1^2$
$f(A2|A2) = 0.1^2$
$f(A1|A3) = 2\cdot 0.1\cdot 0.8$
$f(A2|A3) = 2\cdot 0.1\cdot 0.8$


which sums to $4\cdot(0.1^2) + 2(2\cdot 0.1\cdot 0.8)=0.36$.

As the frequencies of both A1 and A2 are $0.1$, the frequencies of each of the three mentioned genotypes are all $0.1^2$. Therefore, the expected number of individuals that share at least one allele with "you" at this locus is $21\cdot 0.36 = 7.56$ people.

Why did we need Hardy-Weinberg assumption to make this calculation?

This section comes in reaction to @Atwo comment below.

To give you the intuition for why you need H-W for this calculation. Imagine all A1 where in heterozygous A1|A2 (and therefore same for A2), then the only other genotype that would share an allele with you are A1|A2 genotypes that would be present at frequency $0.2$. And therefore the expected number of people the share at least one allele with you in the room would be $21\cdot 0.2 = 4.2$ people.

For exercise, I would like to invite the reader you to repeat the same calculation for a case where all A1 and A2 alleles are only found in heterozygous A1|A3 and A2|A3.