Download Sample Spaces and Events

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

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

Document related concepts
no text concepts found
Transcript
Chapter 3
Probability
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Chapter Goals
After completing this chapter, you should
be able to:
• Distinguish sample space and events
• Explain three approaches to assessing
probabilities
• Apply common rules of probability
• Use Bayes’ Theorem for conditional
probabilities
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Spaces
and
Events
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Space
The sample space of an experiment,
denoted S, is the set of all possible
outcomes of that experiment.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Space
Ex. Roll a die
Outcomes: landing with a 1, 2, 3, 4, 5, or
6 face up.
Sample Space: S ={1, 2, 3, 4, 5, 6}
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Space
• A automobile consultant records fuel type
and vehicle type for a sample of vehicles
2 Fuel types: Gasoline, Diesel
3 Vehicle types: Truck, Car, SUV
The Sample Space:
e1
e2
Gasoline, Truck
Gasoline, Car
e1
Car
e2
e3
e4
e3
e4
e5
e
Gasoline, SUV
Diesel, Truck
Diesel, Car
Diesel, SUV
Car
e5
e6
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Events
An event is any collection (subset) of
outcomes contained in the sample space
S. An event is simple if it consists of
exactly one outcome and compound if it
consists of more than one outcome.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Visualizing Events
• Contingency Tables
Ace
•
Tree
Diagrams
Sample
Space
Full Deck
of 52 Cards
Not Ace
Total
Black
2
24
26
Red
2
24
26
Total
4
48
52
2
Sample
Space
24
2
24
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Relations from Set Theory
1.
The union of two events A and B is
the event consisting of all
outcomes that are either in A or
in B.
Notation: A
B
Read: A or B
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Relations from Set Theory
2.
The intersection of two events A and
B is the event consisting of all
outcomes that are in both A and B.
Notation: A
B
Read: A and B
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Relations from Set Theory
3.
The complement of an event A is
the set of all outcomes in S that are
not contained in A.
Notation: A 
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Events
Ex. Rolling a die. S = {1, 2, 3, 4, 5, 6}
Let A = {1, 2, 3} and B = {1, 3, 5}
A
B  {1, 2,3,5}
A
B  {1,3}
A   {4,5, 6}
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mutually Exclusive
When A and B have no outcomes in
common, they are mutually exclusive
or disjoint events
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Examples
Ex. When rolling a die, if event A = {2, 4, 6}
(evens) and event B = {1, 3, 5} (odds), then A
and B are mutually exclusive.
Ex. When drawing a single card from a
standard deck of cards, if event A = {heart,
diamond} (red) and event B = {spade, club}
(black), then A and B are mutually exclusive.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Venn Diagrams
A B
A
A B
B
A
A
Mutually Exclusive
A
B
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
3.2
Counting
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
3.3-3.5
Probability
and
Events
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Axioms of Probability
Axiom 1
P (A )  0 for any event A
Axiom 2
P (S )  1
If all Ai’s are mutually exclusive, then
k
Axiom 3 P (A1
... A k )   P (Ai )
A2
(finite set)
P (A1
A2
i 1

...)   P (Ai )
(infinite set)
i 1
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Properties of Probability
For any event A, P  A   1  P (A ).
If A and B are mutually exclusive, then
P  A B   0.
For any two events A and B,
P  A B   P (A )  P (B )  P (A
B ).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Assigning Probability
• Classical Probability Assessment
P(A) =
Number of ways Ai can occur
Total number of elementary events
• Relative Frequency of Occurrence
Number of times Ai occurs
Relative Freq. of A =
N
• Subjective Probability Assessment
An opinion or judgment by a decision maker about
the likelihood of an event
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. A card is drawn from a well-shuffled
deck of 52 playing cards. What is the
probability that it is a queen or a heart?
Q = Queen and H = Heart
4
13
P (Q )  , P (H )  , P (Q
52
52
P (Q
1
H)
52
H )  P (Q )  P (H )  P (Q
4 13 1

 
52 52 52
H)
16 4


52 13
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Conditional
Probability
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Conditional Probability
For any two events A and B with P(B) > 0,
the conditional probability of A given
that B has occurred is defined by
P A | B  
P A  B 
P B 
Which can be written:
P A  B   P B   P A | B 
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Example
• 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.
• What is the probability that a car has a
CD player, given that it has AC ?
i.e., we want to find P(CD | AC)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Solution
• 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
P(CD and AC) .2
P(CD | AC) 
  .2857
P(AC)
.7
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Independence
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Independent Events
Two event A and B are independent
events if P (A | B )  P (A ).
Otherwise A and B are dependent.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Independent Events
Events A and B are independent events
if and only if
P  A  B   P (A )P (B )
**
Note: this generalizes to more
than two independent events.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Multiplication Rules
• Multiplication rule for two events E1 and E2:
P(E1
E2 )  P(E1 )P(E 2 |E1 )
Note: If E1 and E2 are independent, then P(E 2 |E1 )  P(E 2 )
and the multiplication rule simplifies to
P(E1
E 2 )  P(E1 )P(E 2 )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Tree Diagram Example
P(E1 and E3) = 0.8 x 0.2 = 0.16
Car: P(E4|E1) = 0.5
Gasoline
P(E1) = 0.8
Diesel
P(E2) = 0.2
P(E1 and E4) = 0.8 x 0.5 = 0.40
P(E1 and E5) = 0.8 x 0.3 = 0.24
P(E2 and E3) = 0.2 x 0.6 = 0.12
Car: P(E4|E2) = 0.1
P(E2 and E4) = 0.2 x 0.1 = 0.02
P(E3 and E4) = 0.2 x 0.3 = 0.06
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Law of Total Probability
If the events A1, A2,…, Ak be mutually exclusive
and exhaustive events. The for any other event
B,
k
P  B    P (B | Ai )P (Ai )
i 1
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Bayes’ Theorem
Let A1, A2, …, An be a collection of k mutually
exclusive and exhaustive events with P(Ai) > 0
for i = 1, 2,…,k. Then for any other event B for
which P(B) > 0 given by


P Aj |B 
  
P Aj P B |Aj

k
 P  Ai  P  B | Ai 
i 1
j  1, 2..., k
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. A store stocks light bulbs from three suppliers.
Suppliers A, B, and C supply 10%, 20%, and 70% of the
bulbs respectively. It has been determined that
company A’s bulbs are 1% defective while company B’s
are 3% defective and company C’s are 4% defective. If
a bulb is selected at random and found to be defective,
what is the probability that it came from supplier B?
Let D = defective
P B | D  
P B  P D | B 
P  A  P  D | A   P  B  P  D | B   P C  P  D | C 

0.2  0.03
0.1 0.01  0.2  0.03  0.7  0.04 
 0.1714
So about 0.17
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Related documents