STA237: Probability, Statistics, and Data Analysis I
PhD Student, DoSS, University of Toronto
Monday, May 8, 2023
At which station will I experience the next subway delay during my commute?
In plain language, definitely, probably, and maybe express a degree of uncertainty or a degree of belief.
In this class, we will study
how we describe uncertainty
with probability.
Probability is the science of uncertainty.
(Evans and Rosenthal)
a number between 0 and 1 that expresses hows likely [an] event is to occur…
(Dekking et al.)
Another way of thinking about probability is in terms of [long-term] relative frequency.
(Evans and Rosenthal)
More frequent delays in the past,
more likely I will experience a delay
We assume TTC of tomorrow
is similar to that of yesterday
Probability is everywhere
and understanding
probability can help you…
A (random) experiment is a mechanism/phenomenon that results in random or unpredictable outcomes.
The station where I experience my next TTC subway delay is the outcome.
A sample space is the collection of all possible outcomes from an experiment. It’s often denoted \(\Omega\) (Omega).
\[\Omega=\{\text{Sheppard}, \ldots, \text{Queen's Park}\}\] \[=\text{All stations along my commute}\]
An event is a subset of the sample space.
\[D=\{\text{Bloor}, \text{Wellesley}, \ldots, \text{Queen's Park}\}\] \[=\text{Stations in downtown along my commute}\]
Consider the following events.
\(A\): My next delay is in downtown Toronto.
\(B\): My next delay is along Yonge St.
Consider the following events.
\(A\): My next delay is in downtown Toronto.
\(B\): My next delay is along Yonge St.
\(A\)
\(B\)
\[A\cap B\]
\(A\)
\(B\)
\[A\cup B\]
\(A\)
\(B\)
\[A^c\]
\(A\)
\(B\)
How would you write an event that includes outcomes that belong to neither \(A\) nor \(B\) using set notation?
We could write…
a delay that is
NOT \((\cdot^c)\)
in downtown \((A)\)
OR \((\cup)\)
on Yonge St. \((B)\).
a delay that is
NOT \((\cdot^c)\) in downtown \((A)\)
AND \((\cap)\)
NOT \((\cdot^c)\) on Yonge St. \((B)\).
\[(A\cup B)^c\]
\[=\]
\[A^c \cap B^c\]
For any two events \(A\) and \(B\), we have
\[(A\cup B)^c = A^c \cap B^c\]
\(A\)
\(B\)
and
\[(A\cap B)^c = A^c\cup B^c.\]
\(A\)
\(B\)
What is left?
\[A^c \cap B^c = \{\}= \emptyset,\] an empty set.
\(A\)
\(B\)
An event that includes outcomes that belong to one of \(A\) or \(B\), but not both.
\(A\)
\(B\)
How can we represent the event using set notation?
\(A\)
\(B\)
Remove
\(A\)
\(B\)
from
\(A\)
\(B\)
Disjoint \(A\) and \(B\)
(mutually exclusive)
A
B
\[A\cap B=\{\}=\emptyset\]
\(A\) implies \(B\)
\(A\) is a subset of \(B\)
A
B
\[A\cap B=A\]
\[A\subset B\]
\[A\cup B=B\cup A\] \[A\cap B=B\cap A\]
\[(A\cup B)\cup C=A\cup(B\cup C)\] \[(A\cap B)\cap C=A\cap(B\cap C)\]
\[A\cup (B\cap C)=(A\cup B) \cap (A\cup C)\] \[A\cap (B\cup C)=(A\cap B) \cup (A\cap C)\]
flowchart TD event((<font size=5em>Event))---fn(<font color=#386CB0><font size=5em>Probability<br/>Function)-->value(<font color=#386CB0><font size=5em>Probability<br />Value) style event fill: #ffffff, stroke: #696969, stroke-width: 2px; style fn fill: #ffffff, stroke: none, font-size 2em; style value fill: #ffffff, stroke: #696969, stroke-width: 2px;
A probability function \(P\) defined on a finite sample space \(\Omega\) assigns each event \(A\) in \(\Omega\) a number \(P(A)\) such that
(axioms of probability)
The number \(P(A)\) is called the probability that \(A\) occurs.
A probability function \(P\) defined on an infinite sample space \(\Omega\) assigns each event \(A\) in \(\Omega\) a number \(P(A)\) such that
(axioms of probability)
The number \(P(A)\) is called the probability that \(A\) occurs.
\(\left\{\text{Eglinton, Lawrence}\right\}\) \(=\left\{\text{Eglinton}\right\}\cup\left\{\text{Lawrence}\right\}\)
The event that the next delay is at Eglinton or Lawrence
assuming I will eventually experience a delay at one of the stations
Consider \(P(A)\)
\(A\)
\(B\)
For any two events \(A\) and \(B\), we can decompose each into two disjoint subsets.
\(A\)
\(B\)
\(A\)
\(B\)
\[(A\cap B^c)\cup (A\cap B)\]
\[P(A)\] \[=P(A\cap B^c) + P(A\cap B)\]
probability axiom iii
Recall events \(A\) and \(B\).
\(A\): My next delay is in downtown Toronto.
\(B\): My next delay is along Yonge St.
Assume I will eventually experience a delay at a TTC station during my commute.
\(\implies P(A\cup B)=P(\Omega)=1\)
(probability axiom ii)
Suppose
\[P(A)={4}/{10}\]
\[P(B)={2}/{3}\]
\[P(A\cap B)=?\]
\[P(A)={4}/{10}\] \[P(B)={2}/{3}\] \[P(A\cup B)=1\]
\(P(A)=\)\(P(A\cap B^c)\)\(+\)\(P(A\cap B)\)
\(P(B)=\)\(P(A^c\cap B)\)\(+\)\(P(A\cap B)\)
\(P(A\cup B)=\)\(P(A\cap B^c)\)\(+\)\(P(A^c\cap B)\)\(+\)\(P(A\cap B)\)
\(\implies\)
\(P(A) + P(B)=\)\(P(A\cap B^c)\)\(+\)\(P(A^c\cap B)\)\(+2\cdot\)\(P(A\cap B)\)
\(P(A) + P(B)=P(A \cup B)+\)\(P(A\cap B)\)
\(\implies\)
\(P(A\cap B)\)\(=P(A)+P(B)-P(A\cup B)\)
\(\phantom{P(A\cap B)}=4/10 + 2/3 - 1\)
\(\phantom{P(A\cap B)}=1/15\)
Consider \(P(A\cup B)\)
\(A\)
\(B\)
\(A\)
\(B\)
\[(A\cap B^c)\cup (A\cap B)\cup (A^c\cap B)\]
\[P(A\cup B)=P(A\cap B^c)+ P(A\cap B) + P(A^c\cap B)\]
\[\Omega\]
A
A
\[A\cup A^c\]
For any event \(A\), we can decompose the sample space \(\Omega\) into two disjoint subsets.
\[\implies P(\Omega)=P(A) + P(A^c)\] \[\implies P(A^c)=1-P(A)\]
Applies only when
For any event \(A\) of such sample space \(\Omega\),
\[P(A)=\frac{\text{number of outcomes that belong to }A}{\text{total number of outcomes in }\Omega}\]
Suppose you roll a fair die once.
\[A=\text{You roll an even number.}\] \[B=\text{You roll a number less than 3.}\]
Compute the following probabilities.
\[P(A)\]
\[P(A\cap B)\]
\[P(A\cup B)\]
\[P\left(\left\{2,4,6\right\}\right)\] \[=3/6=1/2\]
\[P\left(\left\{2\right\}\right)\] \[=1/6\]
\[P\left(\left\{1,2,4,6\right\}\right)\] \[=4/6=2/3\]
Suppose you roll the die twice .
Let \(\Omega_1\) be the sample space for the first roll and \(\Omega_2\) the sample space for the second.
We will denote the sample space of rolling the die twice with \(\Omega\).
What is \(\Omega\)?
In general,
\[\Omega=\Omega_1 \times \Omega_2=\left\{\left(\omega_1, \omega_2\right):\omega_1\in \Omega_1, \omega_2\in\Omega_2\right\}\]
That is, the sample space generated by observing multiple experiments is a product of the individual sample spaces consisting of all combinations of outcomes of individual experiments.
What is \(P\left(\left\{\left(1,6\right)\right\}\right)\)?
In a standard deck of playing cards, there are 13 cards in each of the four suits:
♠ ♥ ♣ ♦
What is the probability of drawing
A♠, K♠, Q♠, J♠, 10♠
consecutively from a standard deck in the specific order?
Any ordered sequence of \(n\) objects taken from a set of \(N\) distinct objects is called a permutation. The number of possible permutations of size \(n\) from \(N\) objects is
\[{}_NP_{n}=\frac{N!}{\left(N-n\right)!}.\]
What is the probability of drawing
A♠, K♠, Q♠, J♠, 10♠
consecutively from a standard deck in any order?
Any unordered sequence of \(n\) objects taken from a set of \(N\) distinct objects is called a combination. The number of possible combinations of size \(n\) from \(N\) objects is
\[\binom{N}{n}=\frac{N!}{\left(N-n\right)!\cdot n!}.\]
learnr
and run R worksheetClick here to install learnr
on r.datatools.utoronto.ca
Follow this link to open the worksheet
If you see an error, try:
rlesson01
from Files paneOther steps you may try:
.Rmd
and .R
files on the home directory of r.datatools.utoronto.caTools
> Global Options
install.packages("learnr")
in RStudio after the steps above or click hereChapter 2, Dekking et al.
© 2023. Michael J. Moon. University of Toronto.
Sharing, posting, selling, or using this material outside of your personal use in this course is NOT permitted under any circumstances.