By the definition of conditional probability
\[ \text{P}(A \mid B)=\frac{\text{P}(A \cap B)}{\text{P}(B)} \]
By the multiplication rule
\[ \text{P}(A \cap B) = \text{P}(A) \cdot \text{P}(B \mid A) \]
Then, we have
\[ \text{P}(A \mid B)=\frac{\text{P}(A) \cdot \text{P}(B \mid A)}{\text{P}(B)} \]
Let \(A_1, A_2, \cdots, A_n\) form a partition of sample space \(\Omega\).
Then, for any event \(B\) such that \(\text{P}(B)>0\), we have
\[ \text{P}(A_i \mid B) = \frac{\text{P}(A_i) \cdot \text{P}(B \mid A_i)}{\text{P}(B)} \]
\[\text{where}\]
\[ \small{\text{P}(B) = \text{P}(A_1) \cdot \text{P}(B \mid A_1) + \cdots + \text{P}(A_n) \cdot \text{P}(B \mid A_n)} \]
| Test positive | Test negative | |
|---|---|---|
| Target present | True positive \(a\) |
False negative \(b\) |
| Target absent | False positive \(c\) |
True negative \(d\) |
| Test positive | Test negative | |
|---|---|---|
| Target present | True positive \(a\) |
False negative \(b\) |
| Target absent | False positive \(c\) |
True negative \(d\) |
\[ \begin{aligned} \text{sensitivity (or recall)}&=\frac{a}{a+b} \\ \\ \text{specificity}&=\frac{d}{c+d} \\ \end{aligned} \]
Let’s define the following events
A person just tested positive.
What is the chance this person has the disease?