Beruflich Dokumente
Kultur Dokumente
Measuring
a current in a wire Number of defective in a daily production Time to do a task Yearly rain fall in Dhahran
Throwing
a coin Number of accidents on campus per month Students must generate at least 5 examples
Every time the experiment is repeated a different out come results. The set of all possible outcomes is call Sample Space denoted by S.
In
the experiment of throwing the coin the sample space S = { H, T}. In the experiment on the number of defective parts in three parts the sample space S = { 0, 1, 2, 3}
A sample space is discrete if it consists of a finite ( or countably infinite ) set of outcomes. Examples are: S = { H, T}, S = { 1, 2, 3, }
Tree Diagrams Sample spaces can also be described graphically with tree diagrams.
If S is the sample space and E is any event then the axioms of probability are: 1. P(S) = 1 2. 0 P(E) 1
3. If E1 and E2 are event such that E1 E2 = , then, P(E1 E2) = P(E1 ) + P(E2)
If E is an event, then P(E) stands for the probability that event E occurs. It is read the probability of E
Definition
10
12
52
P(H+T) = __ __ 2 = 1 4 2
H ?H T T H T T H
N = 40
What is the likelihood of randomly selecting a student who is older than 20 but less than 22? What is the likelihood of selecting a student whos age is an odd number? What is the likelihood of selecting a student who is either 21 or 23?
What
3? 1/36 What is the probability of two 12/36 sixes? What is the probability of at least one 3?
Sum 2 3 4 5 6 7 8 9 10 11 12
Frequency 1 2 3 4 5 6 5 4 3 2 1
What is the probability that the sum will be 10 or more? 6/36 What is the probability that the sum will be either 3 or less or 11 or more? 3/36 + 3/36
Try these
a) b)
P(r 1 ed) A 5
1 4
P(bl 2 ue) A 5
1 4
P(yellow 3 or blue) A 5
1 2
CARDS
DICE
COINS
What is the probability of rolling two coins and getting H first and then T? 1
4
3/13=13/52
40/52=10/13
Venn Diagrams
(not E): The event that E does not occur. (A & B): The event that both A and B occur. (A or B): The event that either A or B or both occur.
For any event E, P(E) = 1 P (~ E). In words, the probability that an event occurs equals 1 minus the probability that it does not occur.
The special addition rule (mutually exclusive events) The general addition rule (non-mutually exclusive events) The special multiplication rule (for independent events) The general multiplication rule (for nonindependent events)
Two or more events are said to be mutually exclusive if at most one of them can occur when the experiment is performed, that is, if no two of them have outcomes in common
P ( A or B ) = P ( A) + P ( B )
More generally, if events A, B, C, are mutually exclusive, then
P ( A or B or C ...) = P ( A) + P ( B ) + P ( C ) ...
That is, for mutually exclusive events, the probability that at least one of the events occurs is equal to the sum of the individual probabilities.
If A and B are any two events, then P(A or B) = P(A) + P(B) P(A & B). In words, for any two events, the probability that one or the other occurs equals the sum of the individual probabilities less the probability that both occur.
P(Spade or face card is selected) = P (spade) + P (face card) P (spade & face card) = 1/4 + 3/13 3/52 = 22/52
If events A, B, C, . . . are independent, then P(A & B & C & ) = P(A) P(B)
P(C).
What is the probability of all of these events occurring: 1. Flip a coin and get a head 2. Draw a card and get an ace 3. Throw a die and get a 1 P(A & B & C ) = P(A) P(B) P(C) = 1/2 X 1/13 X 1/6
The probability that event B occurs given that event A has occurred is called a conditional probability. It is denoted by the symbol P(B | A), which is read the probability of B given A. We call A the given event.
2-34: wireless garage opener has a code determined by the up or down setting of 12 switches. Solution: 2-35: Personal digital assistant
Five memory sizes Three types of displays Four sizes of hard disk Include or nor include pen tablet
Solution:
2-34: wireless garage opener has a code determined by the up or down setting of 12 switches. Solution: 212 2-35: Personal digital assistant
Five memory sizes Three types of displays Four sizes of hard disk Include or nor include pen tablet
Solution: 5 x 3 x 4 x 2 = 120
the # of events
=n
Example: You are a the head of the debate team. How many different ways can you sit a group of 5 ?
Etc.
A B C D E A
A B D . E
B C D
# of permutations = 5 x 4 x 3 x 2 x 1 = 5!
There are 5! ways to order 5 people in 5 chairs (since a person cannot repeat)
What if you had to arrange 5 people in only 3 chairs (meaning 2 are out)?
Seat One: 5 possible Seat Two: Only 4 possible Seat Three: only 3 possible B A B A B C D D E
5 x 4 x3 =
A B C D E
5 x 4 x3 x 2 x1 5! = = 2 x1 2! 5! (5 3)!
5! 5! = = 5! (5 5)! 0!
How many two-card hands can I draw from a deck when order matters (e.g., ace of spades followed by ten of clubs is different than ten of clubs followed by ace of spades)
52 cards 51 cards
. . .
. . .
In some states, license plates have six characters: three letters followed by three numbers. How many distinct such plates are possible? (hint: with replacement)
263 different ways to choose the letters and 103 different ways to choose the digits total number = 263 x 103 = 17,576 x 1000 = 17,576,000
n Written as: n C r or r
Spoken: n choose r
How many two-card hands can I draw from a deck when order does not matter (e.g., ace of spades followed by ten of clubs is the same as ten of clubs followed by ace of spades)
52 cards 51 cards
. . .
. . .
How many five-card hands can I draw from a deck when order does 48 cards not matter? 49 cards
50 cards 51 cards 52 cards
. . . . . . . . . . . . . . .
52 x51x50 x 49 x 48 ?
How many unique 2-card sets out of 52 cards? 5-card sets? r-card sets?
52 x51 52! = 2 (52 2)!2!
n! n = r ( n r )! r!
If r objects are taken from a set of n objects without replacement and disregarding order, how many different samples are possible?
n! = r (n r )!r!
n
A lottery works by picking 6 numbers from 1 to 49. How many combinations of 6 numbers could you choose?
5 5! = 10 = 3 3!2!
With replacement: nr
Without replacement:
n! n = r (n r )!r!
What
of the same color Pair of different colors Any two cards of the same suit Any two cards of the same color
P(pair
52x51 Denominator = 52 C 2 = = 1326 2 26 So, P(pair of the same color) = = 1.96% chance 1326
P(any pair) =
4! 4 x3 = =6 2!2! 2 4! 4 x3 number of different possible pairs of kings = 4 C 2 = = =6 2!2! 2 ... 13x6 = 78 total possible pairs number of different possible pairs of aces = 4 C 2 =
Numerator: 26C2 x 2 colors = 26!/(24!2!) = 325 x 2 = 650 Denominator = 1326 So, P (two cards of the same color) = 650/1326 = 49% chance A little non-intuitive? Heres another way to look at it 52 cards From a Red branch: 26 black left, 25 red left 26x25 RR
26 red branches 26 black branches
. . . . . From .
26x26 RB
a Black branch: 26 red left, 25 black left
26x26 BR 26x25 BB
A classic problem: The Birthday Problem. Whats the probability that two people in a class of 25 have the same birthday? (disregard leap years) Whats the probability of no matches? Denominator: how many sets of 25 birthdays are there? --with replacement (order matters) 36525 Numerator: how many different ways can you distribute 365 birthdays to 25 people without replacement? --order matters, without replacement: [365!/(365-25)!]= [365 x 364 x 363 x 364 x .. (365-24)] P(no matches) = [365 x 364 x 363 x 364 x .. (365-24)] / 36525
# of ways you can draw ace, ace P (draw 2 aces) = # of different 2 - card sequences you could draw
Numerator: AA, AA, AA, AA, AA, AA, AA, AA, AA, A AA, or AA = 12
52 cards 51 cards
. . .
. . .
52 x51 = 1326 2
How many ways are there to choose four members of the club to serve on an executive committee?
Order not important C(25,4) = 25!/21!4! = 25*24*23*22/4*3*2*1 =25*23*22 = 12,650
How many ways are there to choose a president, vice president, secretary, and treasurer of the club?
Order is important P(25,4) = 25!/21! = 303,600
exactly
exactly
one vowel?
Note that strings can have repeated letters! We need to choose the position for the vowel C(6,1) = 6!/1!5! This can be done 6 ways. Choose which vowel to use. This can be done in 5 ways. Each of the other 5 positions can contain any of the 21 consonants (not distinct). There are 215 ways to fill the rest of the string. 6*5*215
exactly
2 vowels?
Choose position for the vowels. C(6,2) = 6!/2!4! = 15 Choose the two vowels. 5 choices for each of 2 positions = 52 Each of the other 4 positions can contain any of 21 consonants. 214 15*52*214
at
least 1 vowel Count the number of strings with no vowels and subtract this from the total number of strings. 266 - 216
at
least 2 vowels Compute total number of strings and subtract number of strings with no vowels and the number of strings with exactly 1 vowel. 266 - 216 - 6*5*215
Probability of a Union
Three Events
P(B|A) if
= P(A&B)/P(A)
Definition:
Let A and B be two events with P(B) 0. The conditional probability of A given B is:
P( A & B) P( A / B) = P( B)
The idea: if we are given that the event B occurred, the relevant sample space is reduced to B {P(B)=1 because we know B is true} and conditional probability becomes a probability measure on B.
P( A & B) P( A / B) = P( B)
P( A & B) = P( A / B) P( B)
and, since also:
P ( B / A) = P( A & B) P( A) P ( A & B ) = P ( B / A) P( A)
P ( A / B ) P ( B ) = P ( A & B ) = P ( B / A) P ( A) P ( A / B ) P ( B ) = P ( B / A) P ( A) P ( B / A) P ( A) P( A / B) = P( B)
P( B / A) P( A) P( A / B) = P( B)
OR
P ( B / A) P ( A) P( A / B) = P ( B / A) P( A) + P ( B / ~ A) P (~ A)
Why
do we care?? Why is Bayes Rule useful?? It turns out that sometimes it is very useful to be able to flip conditional probabilities. That is, we may know the probability of A given B, but the probability of B given A may not be obvious. An example will help
we have a decorated sherd fragment, but its too small to determine its form what is the probability that it comes from a bowl?
dec. undec.
bowl ?? 75%
jar
50% of bowls 20% of jars 50% of bowls 80% of jars
P ( B | A) =
P( B ) P( A | B ) P( B ) P( A | B ) + P( ~ B ) P( A |~ B )
25%
can solve for P(B|A) events:?? events: B = bowlness; A = decoratedness P(B)=??; P(A|B)=?? P(B)=.75; P(A|B)=.50 P(~B)=.25; P(A|~B)=.20 P(B|A)=.75*.50 / ((.75*50)+(.25*.20)) P(B|A)=.88
An insurance company believes that drivers can be divided into two classesthose that are of high risk and those that are of low risk. Their statistics show that a high-risk driver will have an accident at some time within a year with probability .4, but this probability is only .1 for low risk drivers .
Assuming that 20% of the drivers are of high-risk, what is the probability that a new policy holder will have an accident within a year of purchasing a policy?
Use law of total probability: P(accident)= P(accident/high risk)*P(high risk) + P(accident/low risk)*P(low risk) = .40(.20) + .10(.80) = .08 + .08 = .16
If a new policy holder has an accident within a year of purchasing a policy, what is the probability that he is a high-risk type driver?
P(high-risk/accident)= P(accident/high risk)*P(high risk)/P(accident) =.40(.20)/.16 = 50%
If a new policy holder has an accident within a year of purchasing a policy, what is the probability that he is a high-risk type driver?
P(accident/HR)=.4 P(accident, high risk)=.08 P(high risk)=.20 P( no acc/HR)=.6 P(no accident, high risk)=.12) P(accident/LR)=.1
Or use tree:
______________
1.0
P(high risk/accident)=.08/.16=50%
Definition