Probability
Basic Concept
$A$, $B$: event:
- $P(A)$: probability that event A happens;
- $P(A \cap B)$: probability that both event A and B happen;
- $P(A \cup B)$: probability that event A or B happen (or both).
Inclusion–exclusion principle: $P(A\cup B)=P(A)+P(B)-P(A\cap B)$
Mutually exclusive events: $A \cap B = \varnothing$, i.e. $P(A \cap B) = 0$.
A, B independent: A and B have no impact on each other, i.e. $P(A \cap B) = P(A) \cdot P(B)$.
$P(A’)=1-P(A)$: comlimentary
$P(A|B)$: Given B happens, the probability for A to happen. Notes: if events A and B are independent, then $P(A|B)=P(A)$, which means that event B will not have any effect on A
Bayes’ Theorem:
$$P(A|B) = \frac{P(A \cap B)}{P(B)}$$
In fact, the Bayes’ Theorm can also deduce previous conclusion. Because when A, B event at independence, $P (A \cap B) = P (A) \cdot P (B) $, after reduction of fraction, $P (A|B) = P(A)$.
Bayes’ Theorm can also be written in the following forms:
$$P(A|B) \cdot P(B)= P(A \cap B)$$
$$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$$
$$P(A|B)\cdot P(B)= P(B|A) \cdot P(A)$$
Combinations, Permutation, Arrangemts
- $n \choose r$: n choose r. Calculation: ${n \choose r} = \frac{n!}{r!(n-r)!}$
- $\frac{n!}{(n-r)!}$: the number of permutations of r objects taken from a selection of n different objects.
- $\frac{r!}{a_1! \cdot a_2! \cdot … \cdot a_k!}$: The number of different arrangements of $r$ objects where $a_i$ of them are same. Object $i$ is different from object $j$.
Probability