# Allele frequency question

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?

I come up with 6.8, working like so:

22 people = 44 locus A alleles in the room = 4.4 A1 alleles and 4.4 A2 alleles at 10% frequency.

I have one of each, leaving 3.4 of each allele to the rest of the room. So, looking at both alleles, there are 6.8 shared alleles out there.

My answer assumes that these alleles are all in different people - I don't know how to account for the probability of someone else having two of them. So I know I am wrong already. Is that last step all I'm missing, or have I gone wrong in a more fundamental way?

(Context: This was a question on a grad-level immunology exam. None of us students could agree on the answer afterwards, and the confused wording (I rephrased it above) made us strongly suspect the professor doesn't have the right answer either, so we wanted to see what the answer actually is for when the exams are graded.)

• Gotcha, will edit it in. – Atwo Oct 11 '16 at 3:05

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.

• Thanks! It looks to me like this solution requires no assumption of H-W equilibrium - is that correct? – Atwo Oct 11 '16 at 5:06
• It also require the H-W assumptions in order to calculate the genotype frequencies (in bullet points) from allele frequencies. – Remi.b Oct 11 '16 at 5:07
• Gotcha. In that case can you make anything of the original exam question, which I posted as a comment on the previous answer? – Atwo Oct 11 '16 at 5:11
• Of course. Simpler and more elegant than my approach since it more easily accommodates the A1/A2 individuals. – bpedit Oct 11 '16 at 5:23
• @Atwo Please have a look at the added section that address more fully your comment about the role of H-W assumptions into the calculation. – Remi.b Oct 11 '16 at 5:46

My first inclination for a problem like this is to address it by enumerating all the possible permutations the two alleles a random individual could have, and multiplying the two allele probabilities (frequencies) to get the combination's probability. Using the given frequencies, the remaining allele (set), call it $A3$, has freqency 0.8. Because the two alleles of an individual are independent, there are nine possible permutations: one of $\{A1,A2,A3\}$ for the first allele and one of $\{A1,A2,A3\}$ for the second. One can then just sum the probabilities for the cases of interest.

But for this particular problem, there is an easier approach. What we are interested in is all individuals who have at least one A1 or A2 allele. This is the same, though, as all individuals except those who have no A1 nor A2 alleles, or, stated another way, those having A3 and A3. Therefore:

• $f(A3|A3) = 0.8\cdot 0.8 = 0.64$
• $f( not(A3|A3) ) = 1 - f(A3|A3) = 0.36$
• $expected( not(A3|A3) ) = 21\cdot f( not(A3|A3) ) = 7.56$

This is of course the same as noting that in the first exhaustive enumeration that there is just one case excluded from the group of interest, calculating its probability, and knowing that all the others must sum to the complement of this probability. Sometimes using the complementary set out of the full enumeration is an easier way to the answer.

Note: Remi's answer shows a slightly consolidated form of the exhaustive enumeration approach. The earlier numerical discrepancy in that answer was just due to arithmetic or typos.

• Thanks for the correction (+1). Small typo is now fixed. – Remi.b Oct 11 '16 at 6:54
• @Remi.b, the final result is also wrong: 7.77 vs 7.56. – mgkrebbs Oct 11 '16 at 6:58
• And also because I multiplied the probability by 22 instead of 21 (as the question says that "you" are one of the 22 people in the room). Thanks – Remi.b Oct 11 '16 at 7:28

I've never done one like this, here goes.

First, remove yourself from the room, just 21 people to consider. You're right that you have to account for the homozygotes. Let's represent the A1 allele with p. All other allele frequencies represented by q. (Sorry I don't yet know how to format properly)

p = 0.1, q = 0.9

The genotype frequencies in the population are represented by:

p^2 + 2pq + q^2 = 1

We're interested in the p^2 + 2pq part. It represents the genotype probabilities of having either one or two of the A1 allele.

0.01 + 2(0.1)(0.9) = 0.19

That's the frequency of individuals in the population with at least one A1 allele.

0.19 * 21 people = 3.99 people

Ditto for the number of people with the A2 allele. These should be additive giving you 7.98 people. BUT, Some people would have both the A1 and the A2 allele. I think we need to subtract that from the 7.98. If this is true, the calculation is easy.

2(0.1 * 0.1) = 0.02 chance of a person having both A1 and A2

The 2 is because there are two ways of achieving this (A1/A2 and A2/A1).

0.02 * 21 people = 0.42 people

7.98 - 0.21 = 7.56 other people in the room with at least one A1 of one A2 allele.

• I like it (me using A1/A2 instead of p/q shows how rusty I am), but I guess I am curious about removing yourself from the room at the start. There are, in fact, 22 people in the room. Your calculations are for a room of 21 people and produce the incorrect frequencies for a room of 22, especially given that the genotype of the 22nd is known. Or am I being led astray by my intuition here? – Atwo Oct 11 '16 at 3:50
• Can you share alleles with yourself? Sharing suggests "with others". I'd read that prof the riot act if they use 22. You said you paraphrased, perhaps the original wording makes 22 feasible. – bpedit Oct 11 '16 at 4:16
• Ouch. I edited the final answer to say OTHER people in the room. – bpedit Oct 11 '16 at 4:19
• Thanks, I understand you there. The actual question without the paraphrasing was: "The frequency of HLA-B alleles [there are 100s] ranges from <0.1% to 10% [we didn't learn any frequencies, hence the info here]. What is the maximum expected number of people in this room that share an HLA-B allele with you?" There were 22 people in the room. Can you make any headway on that (notably, no H-W equilibrium), or is it hopeless? – Atwo Oct 11 '16 at 4:34
• Ah, that doesn't seem to implicate "you" as one of the population to share. So substituting 22 for 21 seems fair. – bpedit Oct 11 '16 at 5:17