In a formula : Mathematically , Bayes ' theorem gives the relationship between the probabilities of A and B , P ( A ) and P ( B ) , and the conditional probabilities of A given B and B given A , P ( A B ) and P ( B A ) .
In probability theory and applications , Bayes ' theorem shows the relation between a conditional probability and its reverse form .