3. Probability: Practical 3
Probability Rules
Until now we mostly used common sense and the (very versatile!) commands table()
and prop.table()
.
But let's revisit the probability equations. We briefly summarize the probability-rules we need here, so that you don't have to look them up.
First an explanation of the notation:
- #P(A)# = probability that event A occurs
- #P(A \cap B)# = probability that events A and B occur together, the joint probability of A and B
- #P(A \cup B)#= probability that event A or event B occurs
- #P(A|B)# = probability of A given that B occurs (= the probability of A conditional on B)
The four probability equations:
\begin{eqnarray*}
P(A)& =& 1 − P(A^c)\\
P(A \cap B)& =& P(A|B)P(B) = P(B|A)P(A)\\
P(A \cup B)& =& P(A) + P(B) − P(A \cap B)\\
P(A|B)& =& \frac{P(B|A)P(A)}{P(B)}\\
\end{eqnarray*}
Note that the last equation (known as Bayes law) is in fact not really a new equation, but is just a rearrangement of the two alternative formulas for #P(A \cap B)# at the right.
Unlock full access