\[\begin{equation*} \begin{array}{r|cc} & B & \lnot B \\ \hline A & s & t \\ \lnot A & u & v \end{array}. \end{equation*} \]
\[\begin{alignat*}{3} P(A) & = \dfrac{s + t}{s + t + u + v} && \qquad \text{using} & \qquad \begin{array}{cc} \boxed{s} & \boxed{t} \\ u & v \end{array} \\[0.5ex] \text{and} \qquad P(B) & = \dfrac{s + u}{s + t + u + v} && \qquad \text{using} & \quad \begin{array}{cc} \boxed{s} & t \\ \boxed{u} & v \end{array}. \end{alignat*} \]
\[\begin{alignat*}{3} P(A|B) & = \dfrac{s}{s + u} && \qquad \text{using} \qquad & \begin{array}{cc} \boxed{s} & \bcancel{t} \\ u & \bcancel{v} \end{array} \\[0.5ex] \text{and} \qquad P(B|A) & = \dfrac{s}{s + t} && \qquad \text{using} \qquad & \begin{array}{cc} \boxed{s} & t \\ \bcancel{u} & \bcancel{v} \end{array}. \end{alignat*} \]
\[\begin{align*} \Pr(A) \Pr(B | A) & \stackrel{?}{=} \Pr(B) \Pr(A | B) \\[1ex] \frac{s + t}{s + t + u + v} \cdot \frac{s}{s + t} & = \frac{s + u}{s + t + u + v} \cdot \frac{s}{s + u} \\[1ex] \frac{\cancel{(s + u)} s}{(s + t + u + v) \cancel{(s + u)}} & = \frac{\cancel{s + t) s}}{(s + t + u + v) \cancel{(s + t)}} \\[1ex] \frac{s}{s + t + u + v} & = \frac{s}{s + t + u + v} \\[1ex] 1 & \stackrel{\checkmark}{=} 1. \end{align*} \]
\[\begin{align*} \Pr(A) \Pr(B | A) & = \Pr(B) \Pr(A | B) \\[0.5ex] \Pr(A | B) & = \frac{\Pr(A) \Pr(B | A)}{\Pr(B)}. \end{align*} \]
This is the Bayes’ theorem.