This is part of coding problem, but I am not able to understand this concept, if someone can try to explain that would be helpful.
Parents and offspring can have zero, one or two copies of an abnormal gene. There is a d % chance of mutation, making a normal gene abnormal or abnormal gene normal.
Consider this special case where mother and father have one copy of abnormal gene (other gene is normal). I’m trying to find P(son has exactly one abnormal gene | mother and father have exactly one abnormal gene each).
My understanding was, son can get one abnormal gene in 4 different ways:
- mutated mother’s normal gene and non mutated father’s normal gene ; P = d * (1-d)
- mutated mother’s normal gene and mutated father’s abnormal gene ; P = d * d
- non mutated mother’s abnormal gene and mutated father’s abnormal gene ; P = (1-d) * d
- non mutated mother’s abnormal gene and non mutated father’s normal gene ; P = (1-d) * (1-d)
Adding all these already gives total probability of 1, but I have few scenarios left.
- non mutated mother’s normal gene and non mutated father’s normal gene giving son zero abnormal genes
- mutated mother’s abnormal gene and mutated father’s abnormal gene giving son zero abnormal genes
- non mutated mother’s abnormal gene and non mutated father’s abnormal gene giving son two abnormal genes
- mutated mother’s normal gene and mutated father’s normal gene giving son two abnormal genes
Where am I making mistake?