We will discuss a solution to this problem here.
In order to solve this, you must know the solution to the problem Mendel’s First Law.
Let’s try to understand the problem by illustrating the example case
Case:
- AA-AA: 1
- AA-Aa: 0
- AA-aa: 0
- Aa-Aa: 1
- Aa-aa: 0
- aa-aa: 1
Solution: 3.5, which is expected number of offspring containing dominant allele “A”
Let’s see how.
It is guaranteed that the pair AA-AA will produce only AA. Since every couple has exactly two offspring, so expected number is 2.
In the case of Aa-Aa, 0.25 possibilities of getting AA, 0.5 possibilities of getting Aa, and 0.25 possibilities of getting aa. Again, since every couple has exactly two offspring, the expected number of AA, Aa, and aa are 0.5, 1, and 0.5 respectively. So, the expected number containing “A” is 0.5 + 1 = 1.5.
For aa-aa, we don’t even need to consider this case since it will produce only aa, and will have no effect on the expected number of offspring containing “A”.
So, total expected number: 2 + 1.5 = 3.5
Code
Any questions — I’m just a comment away!