Events are represented as sets, and this by
Venn diagrams.
It is interesting to remember some properties.
Union \(A\cup B\): when \(A\) or \(B\) or both are observed. In the example:
$$(A \cup B) = (A \cap \bar B) \cup (A \cap B) \cup (\bar A \cap B)$$
Intersection\(A\cap B\): when \(A\) and \(B\) are simultaneously observed.
Morgan's laws:
$$(A \cup B)^c = (A^c \cap B^c)$$
$$(A \cap B)^c = (A^c \cup B^c)$$
Inclusion An event \(A\) is included in \(B\) when all observations of \(A\) are also observations of \(B\).
$$A \subset B$$
Accordingly, $$(A \cap B) \subset (A \cup B)$$
The probability of observing an event \(A\) is noted as \(P(A)\).
$$0 \leq P(A) \leq 1$$
If \(A \subset B\), then $$P(A) \leq P(B)$$
The probabilty of observing \(A\) or \(B\) is: $$P(A \cup B)=P(A)+P(B)-P(A \cap B)$$
If \((A\cap B)=\emptyset \), then \(P(A \cap B)=0\), thus: $$P(A \cup B)=P(A)+P(B)$$
The probability of the complementary of \(A\) is:
$$P(\bar A)=1-P(A)$$
The probability of \(A\) given that \(B\) is present is defined as:
$$P(A|B)=\frac{P(A \cap B)}{P(B)}$$
In general \(P(A|B) \neq P(A)\).
From its definition, it follows that:
$$P(A \cap B) = P(A|B) P(B) = P(B|A) P(A)$$
Thus:
$$P(A|B)=P(B|A)\frac{P(A)}{P(B)}$$
If \(P(A|B)=P(A)\), then the two events are independent, as there is the same
expectative for \(A\) indepndently of the presence of B. In that case:
$$P(A \cap B)=P(A)P(B)$$
Interpretation
The probability of a heart stroke is not the same for males and females.
The probability of obesity is different for people taking different diets.
The probability of recovering from a health problem depends on age and genetic characteristics.
If we have a partition \(A_1,A_2,...,A_k\), and an event \(B\), then we can write:
$$B=(A_1\cap B)\cup (A_2 \cap B) \cup ... \cup (A_k \cap B)$$
Then the \(P(B)\) can be written as:
$$P(B)=P(A_1\cap B)+ P(A_2 \cap B) + ... +P(A_k \cap B)$$
and finally:
$$P(B)=P(B|A_1) P(A_1)+ P(B|A_2) P(A_2) + ... +P(B|A_k) P(A_k)$$
The Baye's theorem describes the probability of an event, based on prior knowledge of conditions that might be related to the event.
$$P(A|B)=\frac{P(A \cap B)}{P(B)}=\frac{P(B|A) \times P(A)}{P(B)}=\frac{P(B|A) \times P(A)}{P(B|A) \times P(A)+P(B|\bar A) \times P(\bar A)}$$
Interpretation
For example, the probability of having a disease \((D)\) if the result of a laboratory test is positive (+) can be computed as:
$$P(D|+)=\frac{P(+|D)\times P(D)}{P(+|D)\times P(D)+P(+|H)\times P(H)}$$
We can compute this probability if we know the probability that a person that has the disease will give a positive result, i.e. \(P(+|D)\), the
probability of a positive result for healthy people, i.e. \(P(+|H)\), and the prevalence of the disease \(P(D)\)