Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Chapter 14
Week 5, Monday
Introductory Example
Consider a fair coin:
Question: If I flip this coin,
what is the probability of
observing heads?
Answer: Everyone knows
the answer is 50%, but
let’s look closer at what
this actually means.
Introductory Example
Consider a fair coin:
Trial 1: I flip a coin and
observe a head.
So Far: 100% of my trials
produced heads.
trial
1 2 3 4 5 6
observation H
7 8 9 10
Introductory Example
Consider a fair coin:
Trial 2: I flip a coin and
observe a tail.
So Far: 50% of my trials
produced heads.
trial
1 2 3 4 5 6
observation H T
7 8 9 10
Introductory Example
Consider a fair coin:
Trial 3: I flip a coin and
observe a tail.
So Far: 33% of my trials
produced heads. (this is called
the “relative frequency”)
trial
1 2 3 4 5 6
observation H T T
7 8 9 10
Introductory Example
Consider a fair coin:
How Often is Heads Observed
Relative Frequency
100%
75%
50%
25%
0%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33
Number of Flips
Probability: Has to do with long-term behavior.
Introductory Example
Consider a fair coin:
How Often is Heads Observed
Relative Frequency
100%
75%
50%
25%
0%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33
Number of Flips
Law of Large Numbers: For “independent trials”, as the number of trials
increases, the long-run relative frequency gets really close to a single value
(in this case 50%)
Some Vocabulary
Trial 1
Heads
Tails
Trial 2
Heads
Tails
Trial 3
Heads
Tails
Trial: Each occasion upon
which we observe a
random phenomenon
Outcome: The value of
the random
phenomenon
Sample Space: The
collection of all
possible outcomes
More Complicated Example
Consider two fair coins:
Question: If I flip these
coins, what is the
probability of observing
1 head and 1 tail?
Answer: Not as obvious
as before. The true
likelihood is 50%.
More Complicated Example
Consider two fair coins:
Each Trial
Heads, Tails
Tails, Heads
Tails, Tails
Heads, Heads
If either of these two outcomes occur, then
we observed 1 heads and 1 tails
More Complicated Example
Consider two fair coins:
Each Trial
Heads, Tails
Tails, Heads
Tails, Tails
Heads, Heads
We call a group of outcomes an “Event”.
What is the probability of this event?
More Complicated Example
Consider two fair coins:
How Often is '1 head and 1 tail' Observed
Relative Frequency
100%
75%
50%
25%
0%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33
Number of Trials
A Nice Assumption
If you assume that every outcome in the sample
space has the same probability of occurring,
then you can calculate the probability of an
event occurring through a formula!
Probability of Event A = (Number of outcomes in A) / (Total number of outcomes)
Each Trial
Heads, Tails
Tails, Heads
Heads, Heads
Tails, Tails
P[1 heads and 1 tails] = 2/4 = 50%
P[at least 1 heads] = 3/4 = 75%
P[no tails] = 1/4 = 25%
Another Example
Consider a fair die:
P[at least 4] = 3/6 = 50%
P[more than 4] = 2/6 = 33%
Each Trial
1
2
3
4
5
6
P[5] = 1/6 = 16.5%
P[either 2, 3, or 6] = 3/6 = 50%
P[more than 2 AND less than 4] = 1/6 = 16.5%
Probability Properties
(1) For any event, “A”,
P[A] is between 0% and 100%
(2) Consider the event, “S”, consisting of all
possible outcomes. P[S]=1
(3) For any event, “A”, consider the event
“not A” (denoted: AC). Then:
P[AC]=100%-P[A]
(4) For any events, “A” and “B”:
P[A or B] = P[A] + P[B] – P[A and B]
Probability Properties
Consider a fair die:
P[1, 2, 3, 4, 5, or 6] = 6/6 = 100%
Each Trial
1
2
3
4
5
6
P[1 or 2] = 2/6 = 33%
P[not {1 or 2}] = P[{1 or 2}C]
= 1 – P[1 or 2]
= 100% – 33%
= 67%
P[{1,2,5,6} or {1,2,3}]
= P[1,2,5,6]+P[1,2,3] - P[{1,2,5,6} and {1,2,3}]
= (4/6) + (3/6) – (2/6)
= 5/6