STAT1003 – Statistical Techniques
Dr. Emi Tanaka
Australian National University
These slides are best viewed on a modern browser like Google Chrome on a desktop or laptop. Some interactive components may require some time to fully load.
Is the experiment random or deterministic?
The sample space, denoted by \(S\) (or \(\Omega\)), of a random experiment is a set of all the possible outcomes.
An event, denoted as say \(E\), is a set or collection of outcomes in the sample space, \(E \subseteq S\), including the possibility of no outcomes, denoted as \(\emptyset\).
The probability of an event \(E\), denoted as \(P(E)\), is a number between \(0\) and \(1\) (inclusive) that describes the likelihood of the event occurring.
Suppose that we roll a fair die. What is the chance of:
For finite outcomes with known probabilities, we can simulate random events in R using the sample() function.
set.seed() for reproduciblity (the input can be anything).The law of large numbers states that as a random experiment is repeated many times, the sample average (or relative frequency) gets closer to the true expected value (or probability).
replicate() function to repeat the experiment a number of times and calculate the average.The intersection of \(A\) and \(B\), denoted \(A \cap B\), is the event that happens when both \(A\) and \(B\) occur.
The union of \(A\) and \(B\), denoted \(A \cup B\), is the event that happens when either \(A\), \(B\) or both occur.
Venn diagram

For two events \(A\) and \(B\), the addition rule states that the probability of the union event is \[P(A\cup B) = P(A) + P(B) - P(A\cap B)\]
Venn diagram

There are 52 cards in a normal deck of cards.
2♣ 3♣ 4♣ 5♣ 6♣ 7♣ 8♣ 9♣ 10♣ J♣ Q♣ K♣ A♣
2♦ 3♦ 4♦ 5♦ 6♦ 7♦ 8♦ 9♦ 10♦ J♦ Q♦ K♦ A♦
2♥ 3♥ 4♥ 5♥ 6♥ 7♥ 8♥ 9♥ 10♥ J♥ Q♥ K♥ A♥
2♠ 3♠ 4♠ 5♠ 6♠ 7♠ 8♠ 9♠ 10♠ J♠ Q♠ K♠ A♠
Consider a regular deck of card and let events:
What is \(P(A \cup B)?\)
Solution
\[\begin{align*} P(A\cup B) &= P(A) + P(B) - P(A\cap B) \\ &= P(\diamondsuit) + P(J\text{ or }Q\text{ or }K) - P(J\diamondsuit\text{ or }Q\diamondsuit\text{ or }K\diamondsuit)\\ &= \dfrac{13}{52} + \dfrac{12}{52} - \dfrac{3}{52}\\ &= \dfrac{11}{26} \end{align*}\]
For three events \(A\), \(B\) and \(C\), the addition rule states that the probability of the union event is
\[P(A\cup B \cup C) = P(A) + P(B) + P(C) - P(A\cap B) - P(A\cap C) - P(B\cap C) + P(A\cap B \cap C)\]

For two disjoint events \(A\) and \(B\) the addition rule simplifies to \[P(A\cup B) = P(A) + P(B)\]
Suppose the events:
Then, \[P(A\cup C) = P(A) + P(C) = \frac{1}{2} + \frac{1}{6} = \frac{4}{6} = \frac{2}{3}.\]

The complement of \(A\), denoted \(A^c\), is the event where \(A\) does not occur. Note: \(A \cup A^c = S\).
For an event \(A\), the complement rule states that
\[P(A) = 1-P(A^c)\]

You can use Venn diagrams to confirm the following properties of sets:

STAT1003 – Statistical Techniques