Re:Surprise DNA Results Are Turning Customer-Service Reps in...
by prepend on Monday December 31, 2018 @05:03PM
(#18797325)
A friend of mine caused a huge stink in her village when she pointed out how two siblings had blue eyes but all parents and grandparents had brown eyes. There was much chaos.
[ Parent
| on HN ]
Re:Surprise DNA Results Are Turning Customer-Service Reps in...
by jules on Monday December 31, 2018 @06:12PM
(#18797685)
Let's analyse that. Suppose the frequency of the blue eye gene and the brown eye gene are the same in the general population, and suppose the prior probability of cheating is 10%. Then we can simulate this:
from random import random, randint
p_blue = 0.5
p_cheat = 0.1
def randbool(p): return random() < p
def randgenes(): return randbool(p_blue), randbool(p_blue)
def mate(mother, father): return mother[randint(0,1)], father[randint(0,1)]
def blueeyes(p): return p[0] and p[1]
n_cheat = 0
n_faithful = 0
for i in range(0,1000000):
mother = (True,False)
grandfather = randgenes()
grandmother = randgenes()
husband = mate(grandfather, grandmother)
lover = randgenes()
cheated = randbool(p_cheat)
if cheated:
kid1 = mate(mother, lover)
kid2 = mate(mother, lover)
else:
kid1 = mate(mother, husband)
kid2 = mate(mother, husband)
if blueeyes(grandmother) or blueeyes(grandfather) or blueeyes(husband) or not blueeyes(kid1) or not blueeyes(kid2): continue
if cheated: n_cheat += 1
else: n_faithful += 1
print(n_cheat)
print(n_faithful)
We get 4619 times cheated and 14226 times faithful. The probability of cheating went up substantially relative to the prior of 10%, but it's still below 30%. I'd say that the chaos wasn't justified.
Re:Surprise DNA Results Are Turning Customer-Service Reps in...
by jzylstra on Monday December 31, 2018 @11:05PM
(#18798863)
Eye color is non-mendelian.
Re:Surprise DNA Results Are Turning Customer-Service Reps in...
by jules on Tuesday January 01, 2019 @04:34AM
(#18799549)
If you know a more accurate model you can change the four functions at the top.
Re:Surprise DNA Results Are Turning Customer-Service Reps in...
by yareally on Monday December 31, 2018 @05:20PM
(#18797411)
Blue eyes are recessive and brown eyes are extremely dominant though. With parents having brown eyes, there could still be up to theoretical 50% chance that the children could have them.
However, if both parents had blue eyes, then it's near impossible for the kids to have brown eyes if they're genetically related to both parents.