Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
y
Exercises
Experiment
•Something capable of replication under
stable conditions.
• Example:
• Experiment: tossing a coin twice
• Sample space (all possible outcomes)
= {HH, HT, TH, TT}
• An event could be that you got at least one
head on the two tosses.
• So the event would be {HH, HT, TH}
Subjective
versus objective
probability
Subjective vs. Objective Probability
• Subjective Probability is probability in lay terms.
Something is probable if it is likely.
• Example: I will probably get an A in this course.
• H T
We can pair each of these with 2 possibilities.
• H T
• H T H T
That gives 4 possibilities on the 2 tosses: HH,
• H T
• H T H T
HT,
• H T
• H T H T
TH
• H T
• H T H T
And TT
• H T
• H T H T
If we toss the coin a 3rd time, we can pair each of
4 possibilities with a H or T.
• H T
• H T H T
• H T H T H T H T
So for 3 tosses, we have 8 possibilities: HHH,
• H T
• H T H T
• H T H T H T H T
HHT,
• H T
• H T H T
• H T H T H T H T
HTH,
• H T
• H T H T
• H T H T H T H T
HTT,
• H T
• H T H T
• H T H T H T H T
THH,
• H T
• H T H T
• H T H T H T H T
THT,
• H T
• H T H T
• H T H T H T H T
TTH,
• H T
• H T H T
• H T H T H T H T
and TTT.
• H T
• H T H T
• H T H T H T H T
Again, we had 8 possibilities for 3
tosses.
• 2 x 2 x 2 = 23 = 8
In general,
•If we have an experiment with k parts (such
as 3 tosses)
•and each part has n possible outcomes (such
as heads & tails),
•then the total number of possible outcomes
for the experiment is
•nk
•m n p
Permutation
s Counting
Rules
Permutations
•Suppose we have a horse race with 8 horses:
A,B,C,D,E,F,G, and H.
•We would like to know how many possible
arrangements we can have for the 1st, 2nd, &
3rd place horses.
•One possibility would be G D F.
(F D G would be a different possibility because
order matters here.)
• We have 8 possible horses we can pick for 1st
place.
• Once we have the 1st place horse, we have 7
possibilities for the 2nd place horse.
• Then we have 6 possibilities for the 3rd place
horse.
• So we have 8 • 7 • 6 = 336 possibilities.
• This is the number of permutations of 8
objects (horses in this case), taken 3 at a time.
How many possible arrangements of
all the horses are there?
In other words, how many permutations are
there of 8 objects taken 8 at a time?
• 8 • 7 • 6 • 5 • 4 • 3 • 2 • 1 = 40,320
• This is 8 factorial or 8!
We’d like to develop a general formula for the
number of permutations
of n objects taken k at a time.
Multiplying we have
5 4 3 2 1
8 7 6 8 7 6
5 4 3 2 1
8 7 6 5 4 3 2 1 8!
5 4 3 2 1 5!
n!
P
(n k ) !
n k
Combinations
Counting
Rules
Combinations
• Suppose we want to know how many
different poker hands there are.
• In other words, how many ways can you deal
52 objects taken 5 at a time.
• Keep in mind that if we have 5 cards dealt to
us, it doesn’t matter what order we get
them. It’s the same hand.
• So while order matters in permutations,
order does not matter in combinations.
Let’s start by asking a different question.
•What is the number of permutations of 52
cards taken 5 at a time?
• nPk = 52P5
52 ! 52 !
(52 5) ! 47 !
= 52 • 51 • 50 • 49 • 48
= 311,875,200
When we count the number of permutations,
we are counting each reordering separately .
However, each reordering should not be
counted separately for combinations.
• We need to figure out how many times we
counted each group of 5 cards.
• For example, we counted the cards ABCDE
separately as ABCDE, BEACD, CEBAD, DEBAC,
etc.
• How many ways can we rearrange 5 cards?
• We could rearrange 8 horses 8! ways.
• So we can rearrange 5 cards 5! = 120 ways.
That means that we counted
each group of cards 120 times.
52 ! 1
(52 5) ! 5 !
52 !
2,598,960
(52 5) ! 5 !
The number of combinations of n
objects taken k at a time is
n!
Ck
(n k ) ! k !
n
The number of combinations of n objects taken
k at a time nCk is also written as
• n
• k
• Example:
S
A B
S
A B
• What is E∩F?
• {GG}
D1 D2 D3
D1 D2 D3
D1 D2 D3
D1 D2 D3
D1 D2 D3
D1 D2 D3
0.25
Example cont’d: What is the probability that a
randomly selected employee is in dept. 2?
D1 D2 D3
0.25
Example cont’d: What is the probability that a
randomly selected employee is in dept. 2?
D1 D2 D3
0.25 0.50
Example cont’d: What is the probability that a
randomly selected employee is in dept. 3?
D1 D2 D3
0.25 0.50
Example cont’d: What is the probability that a
randomly selected employee is in dept. 3?
D1 D2 D3
D1 D2 D3
D1 D2 D3
D1 D2 D3
• Pr(G) = 0.40
40% are grade school graduates (G),
50% are high school grads (H), &
10% are college grads (C).
In addition,
10% of the grade school grads are unemployed (U), 5%
of the h.s. grads are unemployed (U), &
2% of the college grads are unemployed (U).
• Pr(G) = 0.40
• Pr(H) = 0.50
40% are grade school graduates (G),
50% are high school grads (H), &
10% are college grads (C).
In addition,
10% of the grade school grads are unemployed (U), 5%
of the h.s. grads are unemployed (U), &
2% of the college grads are unemployed (U).
• Pr(G) = 0.40
• Pr(H) = 0.50
• Pr(C) = 0.10
40% are grade school graduates (G),
50% are high school grads (H), &
10% are college grads (C).
In addition,
10% of the grade school grads are unemployed (U), 5% of
the h.s. grads are unemployed (U), &
2% of the college grads are unemployed (U).
Given Given
ED Pr(ED) Pr(U|ED)
Grade
School 0.40 0.10
Grad
High
School 0.50 0.05
Grad
College
0.10 0.02
Grad
All 1.00 ------
We can also do the problem in an easily organized table.
Pr(ED∩U)
Given Given
ED Pr(ED) Pr(U|ED) = Pr(U|ED)
x Pr(ED)
Grade
School 0.40 0.10 0.04
Grad
High
School 0.50 0.05 0.025
Grad
College
0.10 0.02 0.002
Grad
All 1.00 ------ Pr(U)=0.067
We can also do the problem in an easily organized table.
Pr(ED∩U) Pr(ED|U)
Given Given
ED Pr(ED) Pr(U|ED) = Pr(U|ED) = Pr(ED∩U)
x Pr(ED) Pr(U)
Grade
School 0.40 0.10 0.04 0.597
Grad
High
School 0.50 0.05 0.025 0.373
Grad
College
0.10 0.02 0.002 0.030
Grad
All 1.00 ------ Pr(U)=0.067 1.000
Independence
•Two events are independent, if knowing that one
event happened doesn’t give you any information
on whether the other happened.
•Example:
•A: It rained a lot in Beijing, China last year.
•B: You did well in your courses last year.
•These two events are independent
(unless you took your courses in Beijing).
One of these events occurring tells you nothing
about whether the other occurred.
So in terms of probability, two events
A & B are independent if and only if
• * Pr(A|B) = Pr(A)
• Using the definition of conditional probability,
this statement is equivalent to
• Pr(A∩B) / Pr(B) = Pr(A).
• Multiplying both sides by Pr(B), we have
• * Pr(A∩B) = Pr(A) Pr(B).
• Dividing both sides by Pr(A), we have
• Pr(A∩B) / Pr(A) = Pr(B),
• which is equivalent to
• * Pr(B|A) = Pr(B).
• This makes sense. If knowing about B tells us nothing about
A, then knowing about A tells us nothing about B.
We now have 3 equivalent statements for
2 independent events A & B
• Pr(A|B) = Pr(A)
• Pr(B|A) = Pr(B)
• Pr(A∩B) = Pr(A) Pr(B).
• The last equation says that you can calculate
the probability that both of two independent
events occurred by multiplying the separate
probabilities.
Example: Toss a fair coin & a fair die
• This is very messy, but you can calculate the answer for
any number k.
• I have the answers computed for some sample values.
Birthday Problem Probabilities
• k p
• 5 0.027
• 10 0.117
• 15 0.253
• 20 0.411
• 22 0.476
• 23 0.507
• 25 0.569
• 30 0.706
• 40 0.891
• 50 0.970
• 100 0.9999997