Topic 6 Probability
Topic 6 Probability
Probability
Definition of Probability
• Experiment: Process that generates observation.
– toss a coin twice
• Sample space: possible outcomes of an experiment
What could happen in the experiment
– S = {HH, HT, TH, TT}
• Event: a subset of possible outcomes
What we want in an experiment?
– An event could be that you got at least one head on the
two tosses , A={HH, HT, TH}
Sample Space
S ={ , , , , , }
={1, 2, 3, 4, 5, 6}
number of outcomes in A
P (A) = total number of outcomes
186
P ( A) 0.155
1200
You can express a probability as a fraction, a decimal, or a percent.
For example: 186 , 0.155, or 15.5%.
1200
Question:
Find the probability of rolling a number greater than 2 on a die.
There are six possible outcomes. Four of the outcomes are favorable. That is, four of the six outcomes
are numbers greater than two.
4 numbers
greater than 2
Sample space: 1, 2, 3, 4, 5, 6 4
6
6 possible
outcomes
4 2
P( 2) or 0.6667
6 3
2 2
P( 2) 1 P( 2) 1 or 0.6667
6 3
Question:
You toss two dice. What is the probability of the
outcomes summing to five?
This is S:
{(1,1), (1,2),
(1,3), ……etc.}
This is S:
{(1,1), (1,2),
(1,3), ……etc.}
• Contingency Tables
Ace Not Ace Total
Black 2 24 26
Red 2 24 26
Total 4 48 52
Sample
• Tree Diagrams
Sample
A ce 2 Space
Space a c k C ard
Full Deck Bl N o t an A c e 24
of 52 Cards A ce
R ed Ca 2
rd
N o t an
Ac e 24
Mutually Exclusive Events
example:
A = queen of diamonds (Q ♦) ;
B = queen of clubs (Q ♣)
A’ A B A B
A
A B A A
B B
Pr (A’) = 1 - Pr (A)
Example:
• If A is the event that a randomly selected
student is male, and the probability of A is 0.6,
what is A’ and what is its probability?
Pr (A’) = 1 - Pr (A)
= 1 - 0.6
= 0.4
Intersections: “Both/And”
•The intersection of A & B (denoted A∩B) is
everything in the sample space that is in both A & B.
S may be read as
“and” since both
A AB B events occur.
This is a joint
probability.
S may be read as
“or” since one or
A B the other or both
events may occur.
• The probability of a of
number joint event,satisfying
outcomes A and AB:and B
P( A and B)
total number of elementary outcomes
Marginal Probability Example
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
Joint Probability Example
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
Joint Probabilities
Using Contingency Table
Event
Event B1 B2 Total
P(A B)
A P(A | B)
B
P(B)
if P B 0
Conditional Probability
Of the cars on a used car lot, 70% have air conditioning (AC)
and 40% have a CD player (CD). 20% of the cars have both.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
Given AC, we only consider the top row (70% of the cars).
Of these, 20% have a CD player.20% of 70% is about
28.57%.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
)= .7
(A C Does
P n
have ot .5 P(AC and CD’) = .5
A C CD
Ha s P(CD' | AC) .7
All
Cars
Doe .2
hav s not P(CD | AC' )
eA .3 P(AC’ and CD) = .2
C P(A a s C D
C ’)= H
.3
Does
n
have ot .1 P(AC’ and CD’) = .1
CD
P(CD' | AC' ).3
Using Decision Trees
(continued)
.2
P(AC | CD)
Given CD or no CD:
.4 P(CD and AC) = .2
a s A C
H
)= .4
( CD Does
P n
have ot .2 P(CD and AC’) = .2
C D AC
Ha s P(AC | CD' ) .4
All
Cars
Doe .5
hav s not P(AC' | CD)
e CD .6 P(CD’ and AC) = .5
P(C a s A C
D ’ )= H
.6
Does
n
have ot .1 P(CD’ and AC’) = .1
AC
P(AC' | CD' ).6
Question:
The academy awards is soon to be shown.
For a specific married couple the probability
that the husband watches the show is 80%,
the probability that his wife watches the show
is 65%, while the probability that they both
watch the show is 60%.
If the husband is watching the show, what is
the probability that his wife is also watching
the show
P[H]= 0.80
P(W | H) ?
P[W]= 0.65
P[W ∩ H]= 0.60
Solution:
The academy awards is soon to be shown.
Let H = the event that the husband watches the show
P[H]= 0.80
Let W = the event that his wife watches the show
P[W]= 0.65 and P[W ∩ H]= 0.60
P(W H)
P(W | H)
P(H)
0.6
P(W | H) 0.75
0.8
Independent
• Event A and B are independent when the
probability of one event is not affected by the
other event.
• If P(A|B) = P(A) , then we say A is independent of
B.
• Equivalently,
P(A B) = P(A) P(B), if A and B are independent.
Note
P(A B)
P(A | B)
P(B)
P(A B)
If P(A|B) = P(A) P(A)
P(B)
P(A B) P(A)P(B)
When Events Are Dependent
• Events are dependent when the
occurrence of one event does change
the probability that another event will
occur.
If A and B are dependent, P(A|B) P(A)
because the occurrence of event B does
change the probability that A will occur.
If A and B are dependent, then
P(A and B) = P(A|B) • P(B)
P(A B)
P(A | B)
P(B)
P(A B) P(A | B)P(B)
Independent and Dependent
Example : Classifying Events as Independent or
Dependent
Determine if the events are dependent or independent.
A.getting head on a coin toss and rolling a 6 on a die
CD No CD Total
P(CD | AC)=?
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
• Are events AC and CD statistically independent?
P(AC ∩ CD) = 0.2
P(AC) = 0.7 P(AC) x P(CD) = (0.7)(0.4) = 0.28
P(CD) = 0.4
P(AC ∩ CD) = 0.2 ≠ P(AC)P(CD) = 0.28
So the two events are not statistically independent
Bayes’ Theorem for the
Revision of Probability
• In the 1700s, Thomas Bayes
developed a way to revise the
probability that a first event occurred
from information obtained from a
second event.
• Bayes’
P(A|BTheorem:
) P(A and B)For two events A
and B P(B)
P(A)P(B|A)
[P(A)P(B|A)] [P(A')P(B|A')]
Bayes’ Theorem
P(A | Bi )P(B i )
P(Bi | A)
P(A | B1 )P(B1 ) P(A | B 2 )P(B 2 ) P(A | Bk )P(B k )
• where:
Bi = ith event of k mutually exclusive and collectively
exhaustive events
A = new event that might impact P(Bi)
Bayes’ Theorem Example
• An automobile company has two factories to
produce its cars. 60% of the production is done
by factory X and the rest is done by factory Y.
P(X) P(S|X)
P(X|S)
[P(X) P(S|X)] [P(Y) P(S|Y)]
(.6)(.85)
(.6)(.85) (.4)(.7)
.51
.6456
.51 .28
Sum = .79
P( X | S ) P( X and S ) P(S)
P(S )
Permutations vs. Combinations
In other words:
"My fruit salad is a combination of apples, grapes and
bananas" We don't care what order the fruits are in, they
could also be "bananas, grapes and apples" or "grapes, apples
and bananas", it is the same fruit salad.
53
Permutations
A permutation is an ordered arrangement of the
elements of some set S
◦ Let S = {a, b, c}
◦ c, b, a is a permutation of S
◦ b, c, a is a different permutation of S
55
55
Two Problems Illustrating
Combinations and Permutations
Problem 1: Consider the set {p, e, n}. How
many two-letter “words” (including nonsense
words) can be formed from the members of this
set, if two different letters have to be used?
Solution: We will list all possibilities: pe, pn, en, ep,
3!
np, ne, a total of 6. 3
P2 6
(3 2)!
Problem 2: Now consider the set consisting of
three males: {Peter, Eric, Nick}. For simplicity,
denote the set by {p, e, n}. How many two-man
crews can be selected from this set?
Solution: pe (Peter, Eric), pn (Peter, Nick) and en
(Eric, Nick), and that is all! 3 3!
C2 3
1!2!
Difference Between
Permutations and Combinations
Both problems involved counting the numbers of arrangements
of the same set {p, e, n}, taken 2 elements at a time, without
allowing repetition.
However, in the first problem, the order of the arrangements
mattered since pe and ep are two different “words”. In the
second problem, the order did not matter since pe and ep
represented the same two-man crew. We counted this only
once.
The first example was concerned with counting the number of
permutations of 3 objects taken 2 at a time.
The second example was concerned with the number of
combinations of 3 objects taken 2 at a time.
Question:
The joint probabilities of achieving grades of A and not achieving
A’s in two quantitative techniques courses.
(ii) What’s the probability that a student achieves a grade of A in QT 1,given that
he/she does not achieve a grade of A in QT2 ?
P ( AQT 1 A'QT 2 ) 0.45
P( AQT 1 | A'QT 2 ) 0.5844
P ( A'QT 2 ) 0.45 0.32
(iii) Are achieving grades of A in QT 1 and QT 2 independent event ?
P(A and B)=0.08. P(A)=0.53. P(B)=0.23 P(A)P(B) ≠ P(A and B)
End of Chapter 6