Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Probability vs Statistics
Probability: Predicts nature of samples from knowledge of
population
probability of rolling “7” with two fair dice
probability of drawing a royal flush
probability of winning a “pick 3” game
Statistics: Predict nature of population from knowledge of
samples
forecasting demand from past data
evaluating effectiveness of a new drug
determining average yield of a chip manufacturing process
Question: Suppose you toss a coin 7 times and it comes up
“Heads” every time. What do you think is likely to happen on the
8th throw?
Venn Diagrams
The event, A
Sample Space, S
P{S} = 1
The event 'Not A', A'
P{A'} = 1 - P{A'}
Set Operations
A
B subtract A
A intersect B
B
A union B
Probability Example
Experiment: Roll 2 dice
Sample space: 36 possible outcomes (equally likely)
1
1
1/36
# on 1st Die
2
3
1/36
1/36
4
1/36
5
1/36
6
1/36
# on
2
1/36
1/36
1/36
1/36
1/36
1/36
2nd
3
1/36
1/36
1/36
1/36
1/36
1/36
Die
4
1/36
1/36
1/36
1/36
1/36
1/36
5
1/36
1/36
1/36
1/36
1/36
1/36
6
1/36
1/36
1/36
1/36
1/36
1/36
Each cell in the table represents a possible outcome.
Each outcome is equally likely, with probability 1/36.
Events are collections of outcomes, or cells.
Example 1
Event A: {First die thrown shows a ‘3’}
1
1
1/36
# on 1st Die
2
3
1/36
1/36
4
1/36
5
1/36
6
1/36
# on
2
1/36
1/36
1/36
1/36
1/36
1/36
2nd
3
1/36
1/36
1/36
1/36
1/36
1/36
Die
4
1/36
1/36
1/36
1/36
1/36
1/36
5
1/36
1/36
1/36
1/36
1/36
1/36
6
1/36
1/36
1/36
1/36
1/36
1/36
A = {(3,1) (3,2) (3,3) (3,4) (3,5) (3,6)}
P{A} = 1/36 + 1/36 + ... + 1/36 = 1/6
Example 2
Event B: {Sum of two dice = ‘7’}
1
1
1/36
# on 1st Die
2
3
1/36
1/36
4
1/36
5
1/36
6
1/36
# on
2
1/36
1/36
1/36
1/36
1/36
1/36
2nd
3
1/36
1/36
1/36
1/36
1/36
1/36
Die
4
1/36
1/36
1/36
1/36
1/36
1/36
5
1/36
1/36
1/36
1/36
1/36
1/36
6
1/36
1/36
1/36
1/36
1/36
1/36
B = {(1,6) (2,5) (3,4) (4,3) (5,2) (6,1)}
P{B} = 1/36 + 1/36 + ... + 1/36 = 1/6
Example 3
Event A U B: {First die thrown shows a ‘3’ or sum of dice = ‘7’}
1
1
1/36
# on 1st Die
2
3
1/36
1/36
4
1/36
5
1/36
6
1/36
# on
2
1/36
1/36
1/36
1/36
1/36
1/36
2nd
3
1/36
1/36
1/36
1/36
1/36
1/36
Die
4
1/36
1/36
1/36
1/36
1/36
1/36
5
1/36
1/36
1/36
1/36
1/36
1/36
6
1/36
1/36
1/36
1/36
1/36
1/36
It is not true that: P(A U B} = P{A} + P{B}
In this case, P{A U B} = 11/36 < 1/6 + 1/6
Note: Be Careful not to double count! The outcome (3,4) is in
both events: it gets counted only once.
Fact: In general,
P{A U B} = P{A} + P{B} - P{A B}, so in this case
P{A U B} = 1/6 + 1/6 - 1/36 = 11/36.
Conditional Probability
Definition: (Baye’s Rule)
P{ A| B}
P{ A B}
P{B}
Example:
A = {sum of two dice = ‘7’}
B = {first die = ‘3’}
P{ A| B}
P{ A B} 1 / 36
1/ 6
P{B}
1/ 6
1
1
1/36
# on 1st Die
2
3
1/36
1/36
4
1/36
5
1/36
6
1/36
# on
2
1/36
1/36
1/36
1/36
1/36
1/36
2nd
3
1/36
1/36
1/36
1/36
1/36
1/36
Die
4
1/36
1/36
1/36
1/36
1/36
1/36
5
1/36
1/36
1/36
1/36
1/36
1/36
6
1/36
1/36
1/36
1/36
1/36
1/36
Independence
Recall that:
P{A B} = P{A | B}P{B}.
If
P{A B} = P{A } P{B},
then A and B are said to be independent.
Example: Tossing a ‘fair’ two-sided coin
A = {1st two throws are heads}
B = {1st three throws are heads}
C = {Third throw is a head}
P{A} = 1/4
P{B} = 1/8
P{C} = 1/2
P{A | B} = 1
P{B | C} = 1/4
P{C | A} = 1/2
P{A B} = P{A | B} P{B} = 1/8 P{A}P{B}, so A and B are
NOT independent
P{B C} = P{B | C} P{C} = 1/8 P{B}P{C}, so B and C are
NOT independent
P{A C} = P{C | A} P{A} = 1/8 = P{A} P{C}, so A and C ARE
independent