I am not sure if that's a place to ask here (my type question)?
I am working to code in python but I am struggling to interpreter that to Python.
My question is : I have Pr(A | B)
in the case of dependent which is equal to
Pr ( A ∩ B ) / Pr(B)
. I know how to do it by program, but I mean can I do that by python. On my idea I just multiply Pr ( A ) * Pr (B)
then I / Pr(B). Which I think is not correct is there anyway to write that the conditional probability in python program, or what did is correct?
if you know values of P(A ∩ B) and P(B) , you can compute P(A | B) using