Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Transcript
Ch. 5: Probability Theory
Probability Assignment
• Assignment by intuition – based on
intuition, experience, or judgment.
• Assignment by relative frequency –
P(A) = Relative Frequency =
f
n
• Assignment for equally likely outcomes
Number of Outcomes Favorable to Event A
P( A) 
Total Number of Outcomes
One Die
• Experimental Probability (Relative Frequency)
– If the class rolled one die 300 times and it came
up a “4” 50 times, we’d say P(4)= 50/300
– The Law of Large numbers would say that our
experimental results would approximate our
theoretical answer.
• Theoretical Probability
– Sample Space (outcomes): 1, 2, 3, 4, 5, 6
– P(4) = 1/6
– P(even) = 3/6
Two Dice
• Experimental Probability
– “Team A” problem on the experiment: If we rolled
a sum of “6, 7, 8, or 9” 122 times out of 218
attempts, P(6,7,8, or 9)= 122/218= 56%
– Questions: What sums are possible?
– Were all sums equally likely?
– Which sums were most likely and why?
– Use this to develop a theoretical probability
– List some ways you could get a sum of 6…
Outcomes
• For example, to get a sum of 6, you could get:
• 5, 1
4,2
3,3 …
Two Dice – Theoretical Probability
• Each die has 6 sides.
• How many outcomes are there for 2 sides?
(Example: “1, 1”)
• Should we count “4,2” and “2,4” separately?
Sample Space for 2 Dice
1, 1
2,1
3,1
4,1
5,1
6,1
1, 2
2,2
3,2
4,2
5,2
6,2
1, 3
2,3
3,3
4,3
5,3
6,3
1, 4
2,4
3,4
4,4
5,4
6,4
1,5
2,5
3,5
4,5
5,5
6,5
1,6
2,6
3,6
4,6
5,6
6,6
If Team A= 6, 7, 8, 9, find P(Team A)
Two Dice- Team A/B
• P(Team A)= 20/36
• P(Team B) = 1 – 20/36 = 16/36
• Notice that P(Team A)+P(Team B) = 1
Some Probability Rules and Facts
• 0<= P(A) <= 1
• Think of some examples where
–
P(A)=0
P(A) = 1
• The sum of all possible probabilities for an
experiment is 1. Ex: P(Team A)+P(Team B) =1
One Coin
• Experimental
– If you tossed one coin 1000 times, and 505 times
came up heads, you’d say P(H)= 505/1000
– The Law of Large Numbers would say that this
fraction would approach the theoretical answer as
n got larger.
• Theoretical
– Since there are only 2 equally likely outcomes,
P(H)= 1/2
Two Coins
• Experimental Results
– P(0 heads) =
– P(1 head, 1 tail)=
– P(2 heads)=
– Note: These all sum to 1.
• Questions:
– Why is “1 head” more likely than “2 heads”?
Two Coins- Theoretical Answer
• Outcomes:
• TT, TH, HT, HH
1
2
H
HH
T
HT
H
T
TH
TT
H
T
2 Coins- Theoretical answer
P(0 heads) = 1/4
P(1 head, 1 tail)= 2/4 = 1/2
P(2 heads)= ¼
Note: sum of these outcomes is 1
Three Coins
• Are “1 head” , “2 heads”, and “3 heads” all
equally likely?
• Which are most likely and why?
Three Coins
1
2
H
H
T
T
H
T
2*2*2=8 outcomes
3
H
T
H
T
H
T
H
T
HHH
HHT
HTH
HTT
THH
THT
TTH
TTT
3 coins
•
•
•
•
P(0 heads)=
P(1 head)=
P(2 heads)=
P(3 heads)=
Theoretical Probabilities
for 3 Coins
•
•
•
•
P(0 heads)= 1/8
P(1 head)= 3/8
P(2 heads)= 3/8
P(3 heads)= 1/8
• Notice: Sum is 1.
Cards
• 4 suits, 13 denominations; 4*13=52 cards
• picture = J, Q, K
A
Heart
(red)
Diamond
(red)
Clubs
(black)
Spades
(black)
2
3
4
5
6
7
8
9
10
J
Q K
When picking one card, find…
•
•
•
•
•
P(heart)=
P(king)=
P(picture card)=
P(king or queen)=
P(king or heart)=
Theoretical Probabilities- Cards
•
•
•
•
•
P(heart)= 13/52 = ¼ = 0.25
P(king)= 4/52= 1/13
P(picture card)= 12/52 = 3/13
P(king or queen)= 4/52 + 4 /52 = 8/52
P(king or heart)= 4/52 + 13/52 – 1/52 = 16/52
P(A or B)
• If A and B are mutually exclusive (can’t
happen together, as in the king/queen
example), then P(A or B)=P(A) + P(B)
• If A and B are NOT mutually exclusive (can
happen together, as in the king/heart
example), P(A or B)=P(A) + P(B) –P(A and B)
•
P (A and B)
• For independent events: P(A and B)
• P(A and B) = P(A) * P(B)
• In General:
• P(A and B) = P(A) * P(B/given A)
2 cards (independent) -questions
• Example: Pick two cards, WITH replacement
from a deck of cards,
• P(king and king)=
• P(2 hearts) =
P(A and B) Example-- Independent
• For independent events: P(A and B)
• P(A and B) = P(A) * P(B)
• Example: Pick two cards, WITH replacement
from a deck of cards,
• P(king and king)= 4/52 * 4/52 = 16/2704
=.0059
• P(2 hearts) = 13/52 * 13/52 = .0625
P(A and B) – Dependent
(without replacement)
• In General:
• P(A and B) = P(A) * P(B/given A)
• Example: Pick two cards, WITHOUT
replacement from a deck of cards,
• P(king and king)= 4/52 * 3/51 =
12/2652=.0045
• P(heart and heart)= 13/52 * 12/51 = 156/2652
= .059
• P(king and queen) = 4/52 * 4/51 = 16/2652
Conditional Probability
Wore seat
belt
No seat belt Total
Driver
survived
412,368
162,527
574,895
Driver died
510
1601
2111
Total
412,878
164,128
577,006
Find:
P(driver died)=
P(driver died/given no seat belt)=
P(no seat belt)=
P(no seat belt/given driver died)=
Wore
No seat
seat belt belt
Total
Driver
412,368
survived
162,527
574,895
Driver
died
510
1601
2111
Total
412,878
164,128
577,006
• P(driver died)= 2111/577,006 = .00366
• P(driver died/given no seat belt)= 1601/164,128 =
.0097
• P(no seat belt)= 164,128/577,006= .028
• P(no seat belt/given driver died)= 1602/2111= .76
Multiplication Problems
• 1. At a restaurant, you have a choice of main dish (beef, chicken,
fish, vegetarian), vegetable (broccoli, corn), potato (baked, fries),
and dessert (chocolate, strawberry). LIST all possible choices.
•
• 2. A teacher wishes to make all possible different answer keys to
a multiple choice quiz. How many possible different answer keys
could there be if there are 3 questions that each have 4 choices
(A,B,C,D). LIST them all.
•
• 3. What if there were 20 multiple choice questions with 5
choices each? Explain (don’t list).
•
• 4. With 9 baseball players on a team, how many different batting
orders exist?
Answers
• 1.
At a restaurant, you have a choice of main dish (beef, chicken, fish, vegetarian), vegetable
(broccoli, corn), potato (baked, fries), and dessert (chocolate, strawberry). LIST all possible choices.
•
main
–
–
–
–
Beef
Beef
Beef
…
vegetable
potato
dessert
broc
broc
broc
baked
baked
fries
chocolate
strawb
chocolate
– 4*2*2*2=32
Answers
• 2. A teacher wishes to make all possible different
answer keys to a multiple choice quiz. How many
possible different answer keys could there be if there
are 3 questions that each have 4 choices
(A,B,C,D). LIST them all.
4*4*4=64
•
• 3. What if there were 20 multiple choice questions
with 5 choices each? Explain (don’t list). 5^20
•
• 4. With 9 baseball players on a team, how many
different batting orders exist? 9! = 362,880
Permutation Examples
1. If there are 4 people in the math club (Anne,
Bob, Cindy, Dave), and we wish to elect a
president and vice-president, LIST all of the
different ways that this is possible.
2. From these 4 people (Anne, Bob, Cindy,
Dave), we wish to elect a president, vicepresident, and treasurer. LIST all of the
different ways that this is possible.
Answers
1. If there are 4 people in the math club (Anne,
Bob, Cindy, Dave), and we wish to elect a
president and vice-president, LIST all of the
different ways that this is possible.
AB
BA
CA
DA
AC
BC
CB
DB
AD
BD
CD
DC
4*3=12
or 4P2 = 12
Answers
2. From these 4 people (Anne, Bob, Cindy,
Dave), we wish to elect a president, vicepresident, and treasurer. LIST all of the
different ways that this is possible.
ABC
ABD…
•
A
B
C
D
•
B
A
C
D
•
C
A
B
A
•
D
A
B
C
4*3*2 = 24 outcomes
Or 4P3 = 24
C
D
B
D
A
C
C
D
A
D
A
C
B
D
A
D
B
C
B
C
A
C
A
B
ABC
ABD
ACB
ACD
BDA
BDC
BAC
BCD
BCA
BCD
BDA
BDC
CAB
CAD
CBA
CBD
DAB
DAC
DAB
DAC
DBA
DBC
DCA
DCB
Combination Examples
1. If there are 4 people in the math club (Anne,
Bob, Cindy, Dave), and 2 will be selected to
attend the national math conference. LIST all
of the different ways that this is possible.
2. From these 4 people (Anne, Bob, Cindy,
Dave), and 3 will be selected to attend the
national math conference. LIST all of the
different ways that this is possible.
Combination answers
1. If there are 4 people in the math club (Anne,
Bob, Cindy, Dave), and 2 will be selected to
attend the national math conference. LIST all
of the different ways that this is possible.
AB
AC
BC
AD
BD
CD
4C2= 6
Combination answer
2. From these 4 people (Anne, Bob, Cindy,
Dave), and 3 will be selected to attend the
national math conference. LIST all of the
different ways that this is possible.
ABC BCD
ABD
ACD
4C3 = 4
Permutations and Combinations
• Permutations
– Use when ORDER matters and NO repitition
– nPr = n!/(n-r)!
– Example: If 10 people join a club, how many ways
could we pick pres and vp? 10P2 = 90
• Combinations
– Use: ORDER does NOT matter and NO repitition
– nCr = n!/ [(n-r)!r!]
– Example: 10 people join a club. In how many ways
could we pick 2? 10C2 = 45
Multiplication, Permutation, or
Combination?
1. With 14 players on a team, how many ways could we pick a
batting order of 11?
2.
If license plates have 3 letters and then 4 numbers, how
many different license plates exist?
3.
How many different four-letter radio station call letters can
be formed if the first letter must be W or K?
4.
A social security number contains nine digits. How many
different ones can be formed?
5.
If you wish to arrange your 7 favorite books on a shelf, how
many different ways can this be done?
6. If you have 10 favorite books, but only have room for
7 books on the shelf, how many ways can you arrange
them?
7. You wish to arrange 12 of your favorite
photographs on a mantel. How many ways can this be
done?
8. You have 20 favorite photographs and wish to
arrange 12 of them on a mantel. How many ways can
that be done?
9. You take a multiple choice test with 12 questions (and
each can be answered A B C D E). How many different
ways could you answer the test?
10. If you had 13 pizza toppings, how many ways could
you pick 5 of them?
Answers
1. 14P11 =175,760,000
6. 10P7
2. 26*26*26*10*10*10*10
7. 12! or 12P12
3. 2*26*26*26
8.
4. 10^9
9. 5^12
5. 7! Or 7P7
10. 13 C5
20P12