P(c)=0.01, P(¬c)=0.99
P(Pos|c)=0.9, P(Neg|c)=0.1
P(Neg|¬c)=0.9, P(Pos|¬c)=0.1
P(c,neg)=0.001
P(¬c,Neg)=0.891
P(Neg)=0.892
P(gone)=0.6
p(home)=0.4
P(rain|home)=0.01 P(rain|¬home)=0.99
P(rain|gone)=0.3 P(rain|¬gone)=0.7
P(home|rain)=0.0217
0.4*0.01 / 0.4*0.01 + 0.6*0.3
def f(p): return p print f(0.3)