Colin Wright, juggler,
inventor of the mathematical notation of juggling
In my opinion, all biologist should know something about
The rest depends on each case
(maybe calculus and linear algebra)
The set of all possible outcomes is often called Ξ©
An event π΄ can be seen as the set of all outcomes that make the event true
For example,
Fever={Temperature>37.5Β°C}
An event will become either true or false after an experiment
For example, a dice can be either 4 or not
We want to give a value to our rational belief that the event will become true after the experiment
The numeric value is called Probability
It is useful to think that the probability of an event is the area in the drawing
The total area of Ξ© is 1
Usually we do not know the shape of π΄
Our rational beliefs depend on our knowledge
If we represent our knowledge (or hypothesis) by π, the the probability of an event π΄ is written as \[β(A|Z)\] We read βthe probability of event π΄, given that we know πβ
For example, βthe probability that we get a 4, given that the dice is symmetricalβ
The order is relevant \[β(A|Z)β β(Z|A)\] There are two events, π΄ and π
The one written after |
is what we assume to be true
The one written before |
is what we are asking for
One we know, the other we do not
Now outcomes are limited only to the π region
We measure the area of \(β(A|Z)\) with respect to the area of π instead of Ξ©
The shape of π is often unknown
If, given our knowledge π, the event π΅ is more plausible than the event π΄, then \[β(A|Z)β€β(B|Z)\]
For example, the probability that we get either 4, 5 or 6 is greater than the probability that we get a 4, given that the dice is symmetrical \[β(\{4\}|Z)β€β(\{4,5,6\}|Z)\]
On the other hand, if we get new information, the probabilities may change
The same event π΄ may be more plausible under a new hypothesis π than under the initial hypothesis π
Then \[β(A|Z)β€β(A|Y)\]
It has been proven that probabilities must be like this
A probability is a number between 0 and 1 inclusive \[β(A) β₯ 0\textrm{ and } β(A)β€1\]
The probability of an sure event is 1 \[β(\textrm{True}) = 1\]
The probability of an impossible event is 0 \[β(\textrm{False}) = 0\]
We are interested in non-trivial events, that are usually combinations of smaller events
For example, we may ask βwhat is the probability that, in a group of π people, at least two persons have the same birthdayβ
Fortunately, any complex event can be decomposed into simpler events, combined with and, or and not connectors
Exercise: decompose the birthday event into simpler ones
If the event π΄ becomes more and more plausible, then the opposite event not π΄ becomes less and less plausible
It can be shown that we always have \[β(\textrm{not } A) = 1-β(A)\]
\[β(A\text{ and } B)=\frac{\text{Number of cases where }(A\text{ and } B)\text{ is true}}{\text{Total cases of combinations of }A\text{ and } B}\]
If \(n_A\) and \(n_B\) are the total number of cases for \(A\) and \(B\), then the total number of cases is \(n_Aβ n_B\)
In the same way, if \(m_A\) and \(m_B\) are the number of cases where \(A\) and \(B\) are true, respectively, then the number of cases where \((A\text{ and }B)\) is true is \(m_Aβ m_B\)
\[β(A\text{ and } B)=\frac{m_Aβ m_B}{n_Aβ n_B}=\frac{m_A}{n_A}β \frac{m_B}{n_B}\]
We could say that \[\frac{m_A}{n_A}=β(A)\qquad\frac{m_B}{n_B}=β(B)\] but we have to be careful. The result of A may affect \(m_B\) and \(n_B\). We better write \[\frac{m_A}{n_A}=β(A)\qquad\frac{m_B}{n_B}=β(B|A)\]
\[β(A\text{ and } B)=\frac{m_A}{n_A}β \frac{m_B}{n_B}=β(A)β β(B|A)\] To simplify, instead of \(β(A\text{ and } B)\) we write \(β(A, B)\)
Thus, we write \[β(A,B)=β(A)β β(B|A)\] βProb that (π΄ and π΅) happens is Prob that π΄ happens times Prob that π΅ happens given that A happensβ
We know that \((A\text{ and } B)\) is always the same as \((B\text{ and } A)\)
There are two ways to calculate the probability of of π΄ and π΅ happening simultaneously
The order matters: \(β(A|Z)β β(Z|A)\)
To get the probability of \(A\) and \(B\) together we find the probability of \(A\) and then of \(B\) given that \(A\) is true \[β(A,B)=β(A)β β(B|A)\]
π
What is the probability that two people in the class share the same birthday?
How many people we need to guarantee at least 50% probability?
Intuition says we need 365/2 people
That is wrong
We know how to calculate \(β(A\text{ and } B)\) and \(β(\text{not } A)\)
We also know the De Morganβs law, to swap ANDs with ORs
\[\text{not } (A \text{ or } B) = (\text{not
} A) \text{ and } (\text{not } B)\]
Therefore we can write
\[ \begin{aligned} β(A \text{ or } B) & = 1 - β(\text{not }(A \text{ or } B))\\ & = 1-β( (\text{not } A) \text{ and } (\text{not } B)) \end{aligned} \]
\[β(A \text{ or } B) = 1-β( (\text{not } A) \text{ and } (\text{not } B)) \\ = 1-β(\text{not } A)β P(\text{not } B|\text{not } A)\]
using negation rule \[ \begin{aligned} β(A \text{ or } B) & = 1-β(\text{not } A)β (1- β(B|\text{not } A)) \\ & = 1-β(\text{not } A) + β(\text{not } A)β P(B|\text{not } A) \end{aligned} \]
\[ \begin{aligned} β(A \text{ or } B) & = 1 -β(\text{not } A) + β(\text{not } A,B) \\ β(A \text{ or } B) & = 1 -(1-β(A)) + β(\text{not } A|B)β(B) \\ β(A \text{ or } B) & = β(A) + (1-β(A|B))β(B) \\ β(A \text{ or } B) & = β(A) + β(B)-β(A|B)β(B) \\ β(A \text{ or } B) & = β(A) + β(B)-β(A,B) \end{aligned} \] You need to remember only the last line
The previous lines justify why the last one is always true
If A and B can happen at the same time, then \(β(A) + β(B)\) counts the intersection twice
So we have to take out the intersection \(β(A,B)\) \[β(A \text{ or } B) = \\ β(A) + β(B)-β(A,B)\]
If there are three compatible events, things get messy
\[\begin{aligned} & β(A \text{ or } B \text{ or } C) \\ & β(A) + β(B \text{ or } C)-β(A,(B \text{ or } C)) \\ & β(A) + β(B) + β(C)-β(B,C) - β(A,B \text{ or } A,C) \\ & β(A) + β(B) + β(C)-β(B,C) - (β(A,B) + β(A,C) - β(A,B,C)) \\ & β(A) + β(B) + β(C)-β(B,C) - β(A,B) - β(A,C) + β(A,B,C) \end{aligned} \]
It gets worse with more events
Now we can see that
\[{\mathbb P}\left(\bigcup_{i=1}^{\infty} A_i \right) \le \sum_{i=1}^{\infty} {\mathbb P}(A_i)\]
in other words
\[\mathbb P\left(A_1\text{ OR }A_2 \text{ OR } β¦ \text{ OR } A_k \right) \le \mathbb P(A_1)+\mathbb P(A_2)+\cdots+\mathbb P(A_k)\]
Using De Morganβs rule
\[\begin{aligned} & β(A \text{ or } B \text{ or } C) \\ & 1 - β((\text{not } A) \text{ and } (\text{not } B) \text{ and } (\text{not } C))\\ & 1 - β(\text{not } A)β β(\text{not } B | \text{not } A)β β(\text{not } C | \text{not } A, \text{not } B)\\ & 1 - (1-β(A))β (1-β(B | \text{not } A))β (1-β(C | \text{not } A, \text{not } B)) \end{aligned} \]
This is often easier to calculate
Letβs say we have three people, with birthday \(x_1, x_2\) and \(x_3.\)
The probability that there are at least two people with the same birthday is \[β(x_2=x_1 \text{ or } x_3=x_2 \text{ or } x_3=x_1)\] which can be rewritten as \[1-β(x_2β x_1 \text{ and } x_3β x_2 \text{ and } x_3β x_1)\]
We want to calculate \[1-β(x_2β x_1 \text{ and } x_3β x_2 \text{ and } x_3β x_1)\] We can separate like this (only the first and) \[1-β(x_2β x_1)β β(x_3β x_2 \text{ and } x_3β x_1|x_2β x_1)\] Assuming 365 possible birthdays, we have \[1-\frac{364}{365}β \frac{363}{365}\]
If \(m\) independent comparisons are performed, the family-wise error rate (FWER), is given by
\[\bar{\alpha} = 1-\left( 1-\alpha_{\{\text{per comparison}\}} \right)^m\]
Hence, \(\bar{\alpha}\) increases as the number of comparisons increases.
If we do not assume that the comparisons are independent, then we can still say:
\[\bar{\alpha} \le m \cdot \alpha_{\{\text{per comparison}\}}\]
which follows from Booleβs inequality. Example: \(0.2649=1-(1-.05)^6 \le .05 \times 6 = 0.3\)