Events are represented as sets, and this by Venn diagrams. It is interesting to remember some properties.

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)$$

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)}$$

We will use the Baye's theorem: $$P(D|S)=\frac{P(D\cap S)}{P(S)}=\frac{P(S|D)\times P(D)}{P(S|D)\times P(D)+P(S|\bar D)\times P(\bar D)}$$ Thus we need to indicate the probability of observing the symptom if the person has the disease: \(P(S|D)\), and this probability for the healthy people: \(P(S|\bar D)\). The probability of having the disease given the symptom depends also on the prevalence of the disease in the population \(P(D)\). The application computes \(P(D|S)\) for the selected probabilities and also the curve showing how this probability changes with the prevalence.

The simplest diagnostic test produce two possible outcomes: (+) and (-). The positive (+) result is associated with a diagnostic of presence of a disease condition, while a negative (-) result is associated with a healthy diagnostic.

Supose you need to decide among four possible diseases \(D_1, D_2, D_3, D_4\), based on a symptom \(S\).

Indicate your

a symptom under each of the considered disease. The application computes the

probabilities

Which are the probabilities that you assignate to each disease (must add up to 1)?

Which is the probability of the symptom (S) if a person suffers a given disease?

\(P(D|S_1\cup S_2)=\frac{P((S_1\cup S_2)|D)\times P(D)}{P(S_1\cup S_2)}=\frac{P(D) \times [P(S_1|D)+P(S_2|D)-P((S_1 \cap S_2)|D)]}{P(S_1)+P(S_2)-P(S_1 \cap S_2)}\)