Download Chapter 8 - SaigonTech

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

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Chapter 8
Sets and Probabilities
8.1 SETS
•
•
•
•
•
•
The use of braces: { }
Element (member) of a set, , 
Empty set 
Distinguish: 0,  and {0}
Equality of sets
Set-builder notation:
{ x  x has property P }
• Universal set U
Subset
• A set A is a SUBSET of a set B
(written A  B) if every element of A is
also an element of B.
• Proper subset
• For any set A:   A and A  A.
• {a, b} has 4 subsets, {a, b, c} has 8
subsets.
• Number of subsets: If set A has n
elements, then A has 2n subsets.
VENN diagrams
A
C
U
B
COMPLEMENT
• Let A and B be any sets with U the
universal set.
A’
• Then:
The complement of A,
written A’, is
A’ = { x  x A and x  U }
• Example:
U = {1, 2, 3, 4, 5}, A = {1, 3, 5}
A’ = ?
A
INTERSECTION
• The intersection of A and B is:
A  B = { x  x  A and x  B }
• Example:
A = {1, 2, 3, 4, 5}
B = {1, 3, 5}
AB=?
U
A
B
DISJOINT SETS
• A and B are DISJOINT sets if A  B = 
U
A
B
UNION
• The union of two sets A and B is:
A  B = { x  x  A or x  B or both}
U
A
B
How to read set expressions
xA
xA
AB
AB
AB
AB
A\B
AB
A’
x belongs to A / x is an element of A
x does not belong to A / x is not an element of A
A is contained in B / A is a subset of B
A contains B / B is a subset of A
A cap B / A meet B / A intersection B
A cup B / A join B / A union B
A minus B / the difference between A and B
A cross B / the cartesian product of A and B
A prime
8.2 APPLICATIONS OF
VENN DIAGRAMS
Example 1 (p. 452).
Shade the region representing the sets:
• A’  B
• A’  B’
8.2 APPLICATIONS OF
VENN DIAGRAMS
Example 2 (p. 453).
Shade the region A’  (B  C’)
8.2 APPLICATIONS OF
VENN DIAGRAMS
Example 3 (p. 454): A group of 60 business
students was surveyed with the following results:
19 of the students read Business Week
18 read the Wall Street Journal
50 read Fortune
13 read Business Week and the Journal
11 read the and Fortune
13 read Business Week and Fortune
9 read all three magazines.
8.2 APPLICATIONS OF
VENN DIAGRAMS
Example 3 (p. 454): (cont.)
(a) How many students read none of the
publications?
(b) How many read only Fortune?
(c) How many read Business Week and the
Journal, but not Fortune?
ADDITION RULE FOR
COUNTING
Denote n(X): number of elements in X
n(A  B) = n(A) + n(B) – n(A  B)
Example 5 (p. 457):
A group of 10 students meets to plan a
school function. All are majoring in
accounting or economics or both. Five of the
students are economics major and 7 are in
accounting major. How many students major
in both subjects?
ADDITION RULE FOR
COUNTING
Example 6 (p. 457): Below is the result of
American reading habit:
G
H
2005
2002
A
None
B
1-5
C
6-10
D
11-50
E
51+
F
No answer
Total
16
18
38
31
14
15
25
27
6
8
1
1
100
100
(a) Find n(G  B)
(b) Find n(G  B)
(c) Find n( (A  C)  H’)
8.3 PROBABILITY
• Experiment: activity or occurrence with an
observable result
• Trial: each repetition of an experiment.
• Outcomes: possible results of each trial
• Sample space: set of all possible
outcomes for an experiment.
– Example: tossing a coin, rolling a die.
Sample space and event
• Event: any subset of a sample space
• Example: rolling a die,
Sample space S = {1, 2, 3, 4, 5, 6}
Determine the following events:
– The die shows an even number: E1
– The die shows a 1: E2
– The die shows a number less than 5: E3
– The die shows a multiple of 3: E4
Sample space and event
• Event: any subset of a sample space
– Simple event: event with only one possible
outcome
– Certain event: event that equals the sample
space
– Impossible event: empty set
• Example: rolling a die, S = {1, 2, 3, 4, 5, 6}
– Simple event: The die shows a 4, E = {4}
– Certain event: The die shows a number less
than 10, E = S
– Impossible event: The die shows a 7, E = 
Set operations for events
Let E and F be events for a sample space S.
Then:
– Event E  F occurs when both E and F occur;
– Event E  F occurs when E or F or both occur
– Event E’ occurs when E does not occur
– If E  F = , E and F are disjoint events (or
mutually exclusive events)
• Example: rolling a die, S = {1, 2, 3, 4, 5, 6}
– E: The die shows an even number
– F: The die shows a number greater than 2
– Determine the following events:
E  F, E  F, E’, E  F’
BASIC PROBABILITY PRINCIPLE
(for spaces with equally likely outcomes)
• Suppose event E is a subset of a sample space
S. Then the probability that event E occurs,
written P(E), is:
n( E )
P( E ) 
n( S )
• For any event E, 0  P(E)  1.
• For any sample space S,
P(S) = 1 and P() = 0
Example: find P(E), P(F) in example in previous
slide
Standard 52-card Deck
Diamond
King
Heart
Queen
Heart
Club
Spade
Diamond
Diamond
Jack
Heart
Ace
Examples
A single card is drawn from a standard 52card deck, find the probability of the
following events:
(a) Drawing an ace
(b) Drawing a face card
(c) Drawing a spade
(d) Drawing a spade or a heart
(e) Drawing a queen
(f) Drawing a diamond
(g) Drawing a red card
Example
The table below lists the smoking habits of a
group of college students:
Sex
Non-smoker Regular Smoker Heavy Smoker Total
Man
135
70
5
210
Woman
187
21
15
223
Total
322
91
20
433
If a student is chosen at random, find the
probability of getting someone who is a
woman and a heavy smoker.
8.4 BASIC CONCEPTS OF PROBABILITY
ADDITION RULE & COMPLEMENT RULE
ADDITION RULE
• For any events E and F from a sample space S,
P(E  F) = P(E) + P(F) – P(E  F)
• For mutually exclusive events E and F,
P(E  F) = P(E) + P(F)
COMPLEMENT RULE
• For any event E,
P(E’) = 1 – P(E), P(E) = 1 – P(E’).
Examples
Example 1: A single card is drawn from a
standard 52-card deck, find the probability
that it will be a red or a face card.
Example 2: Two dice are rolled. Find the
probability of the following events:
(a) The 1st die shows a 2 or the sum is 6 or 7
(b) The sum is 11 or the 2nd die shows a 5
Examples
Example 2: Two dice are rolled. Find the
probability of the following events:
(a) The 1st die shows a 2 or the sum is 6 or 7
1-1
1-2
1-3
1-4
1-5
1-6
2-1
2-2
2-3
2-4
2-5
2-6
3-1
3-2
3-3
3-4
3-5
3-6
4-1
4-2
4-3
4-4
4-5
4-6
5-1
5-2
5-3
5-4
5-5
5-6
6-1
6-2
6-3
6-4
6-5
6-6
Examples
Example 2: Two dice are rolled. Find the
probability of the following events:
(b) The sum is 11 or the 2nd die shows a 5
1-1
1-2
1-3
1-4
1-5
1-6
2-1
2-2
2-3
2-4
2-5
2-6
3-1
3-2
3-3
3-4
3-5
3-6
4-1
4-2
4-3
4-4
4-5
4-6
5-1
5-2
5-3
5-4
5-5
5-6
6-1
6-2
6-3
6-4
6-5
6-6
Examples
Example 4: A die is rolled, what is the
probability that any number but 5 will come
up?
Example 5: Two dice are rolled. Find the
probability that the sum of the numbers
showing is greater than 3.
ODDS
• The odds in favor of an event E are defined as
P( E )
the ratio of P(E) to P(E’), or ,
, P(E’)  0.
P( E ' )
• If the odds favoring event E are m to n, then
m
n
P(E) =
, and P(E’) =
mn
mn
Example 6 (p. 472)
Example 7 (p. 473)
Example 8 (p. 473)
ODDS
Example 6 (p. 472)
The probability of rain tomorrow is 1/3. Find the
odds in favor of rain tomorrow.
Example 7 (p. 473)
There is a 40% chance that it will snow tomrrow.
Find the odds in favor of snow tomorrow.
Example 8 (p. 473)
The odds that a particular bid will be low bid are 4
to 5. Find the probability that the bid will be the low
bid.
Relative Frequency Probability
Example 9: the table lists the number of siblings
indicated by respondents in a survey:
Number of siblings
0
1
2
3
4
5
6
7
8
9
10 or more
Total
Frequency
140
505
583
457
314
224
157
115
77
49
137
2758
Number of siblings Frequency Probability
0
140
0.051
1
505
0.183
2
583
0.211
3
457
0.166
4
314
0.114
5
224
0.081
6
157
0.057
7
115
0.042
8
77
0.028
9
49
0.018
10 or more
137
0.050
Total
2758
1.000
(a) Find the relative frequency probability of having 0, 1, 2,
…, 10 or more siblings.
(b) Find the probability that a randomly chosen American
has 1 or 2 siblings.
PROPERTIES OF PROBABILITY
Let S be a sample space consisting of n distinct
outcomes s1, s2, …, sn. An acceptable probability
assignment consists of assigning to each
outcome si a number pi (the probability of si)
according to these rules:
1. The probability of each outcome is a number
between 0 and 1 (0  pi  1, i = 1..n)
2. The sum of the probabilities of all possible
outcomes is 1. (p1 + p2 + … + pn = 1)
Relative Frequency Probability
Example: two dice are rolled, and the sum is
calculated. Make the probability distribution for the
sum:
The sum
2
3
4
5
6
7
8
9
10
11
12
Probability
Find the probability that the sum is at least 10.
Example 10
Let L indicate the event that the respondent had a
“liberal” political tendency, and let M indicate that
the respondent believes that marijuana use should
be legal. Below are the survey estimates:
P(L) = .27, P(M) = .37, P(L  M) = .15
(a) Find the probability that a respondent does not
have a liberal tendency and does not support
legalizing the use of marijuana.
(b) Find the probability that a respondent does not
have a liberal tendency or does not support
legalizing the use of marijuana.
8.5 CONDITIONAL PROBABILITY
• The conditional probability of an event E given event F,
written P(E|F), is:
P( E  F )
, P(F)  0
P( E | F ) 
P( F )
• Example 2 (p. 483): given P(E) = .4, P(F) = .5 and
P(EF)=.7. Find P(E|F).
• Example 3 (p.483): 2 coins were tossed, find the
probability that both were heads, if it is known that at
least one was head.
PRODUCT RULE OF PROBABILITY
If E and F are events, then P(E  F) may be
found by either of these formulas:
P(E  F) = P(F)P(E|F) or
P(E  F) = P(E)P(F|E)
Example 4. (p. 484)
In a class with 2/5 women and 3/5 men,
25% of the women are business majors.
Find the probability that a student at random
from the class is a female business major.
Example 5. (p. 485)
A company needs to decide between person A and B to be
a new director of advertising. The research shows that A is
in charge of twice as many advertising campaigns as B.
And A’s campaigns have satisfactory results three out of
four times, while B’s campaigns have satisfactory results
only two out of five times.
a) Find the probability that A runs a campaign that
produces satisfactory results.
b) Find the probability that B runs a campaign that
produces satisfactory results.
c) Find the probability that a campaign is satisfactory,
unsatisfactory
d) Find the probability that either A runs the campain or
the results are satisfactory
Example 6. (p. 486)
From a box containing 1
red, 3 white and 2 green
marbles, two marbles are
drawn one at a time without
replacing the first before
the second is drawn. Find
the probability that one
white and one green
marble are drawn.
Example 7. (p. 488)
Two cards are drawn
without replacement
from a deck. Find the
probability that the
first card is a heart
and the second card
is red.
Example 8. (p. 488)
Three cards are
drawn without
replacement from a
deck. Find the
probability that
exactly 2 of the
cards are red.
INDEPENDENT EVENTS
• E and F are independent events if
P(F|E) = P(F) or P(E|F) = P(E)
PRODUCT RULE FOR INDEPENDENT EVENTS
• E and F are independent events if and
only if P(EF) = P(E)P(F)
Example 9. (p. 490)
A calculator requires a key-stroke assembly
and a logic circuit. Assume that 99% of the
key-stroke assemblies are satisfactory and
97% of the circuits are satisfactory. Find the
probability that a finished calculator will be
satisfactory. Suppose that the failure of keystroke assemblies and the failure of logic
circuits are independent.
Example 10. (p. 490)
On a typical day in Saigon the probability of
very hot weather is 0.10, the probability of a
traffic jam is 0.80, and the probability of very
hot weather or a traffic jam is 0.82. Are the
event “very hot weather” and event “a traffic
jam” independent?
8.6 BAYES’ FORMULA
• BAYES’ FORMULA (Special case)
P( F )  P( E | F )
P( F | E ) 
P( F )  P( E | F )  P( F ' )  P( E | F ' )
• Example 1 (p. 495)
For a fixed length of time, the probability of
worker error on a production line is 0.1, the
probability that an accident will occur when there
is a worker error is 0.3, and the probability that
an accident will occur when there is no worker
error is 0.2. Find the probability of a worker error
if there is an accident.
• BAYES’ FORMULA (General case)
P( Fi )  P( E | Fi )
P( Fi | E ) 
P( F1 )  P( E | F1 )    P( Fn )  P( E | Fn )
• Example 2 (p. 497)
A survey indicated that 87% of married women
have one or more children, 40% of nevermarried women have one or more children, and
88% of women who are divorced, separated or
widowed have one or more children. The survey
also indicated that 43% of women were currently
married, 24% had never been married, and 33%
were divorced, separated or widowed. Find the
probability that a woman who have one or more
children is married.
USING BAYES’ FORMULA
1. Start a probability tree with branches
representing events F1, F2, …, Fn. Label
each branch with its corresponding
probability.
2. From the end of each of these branches,
draw a branch for event E. Label this
branch with probability of getting to it, or
P(E|Fi).
USING BAYES’ FORMULA
3. There are now n defferent paths that result in
event E. Next to each path, put its probability –
the product of the probabilities that the first
branch occurs, P(Fi), and that the second
branch occurs, P(E|Fi): that is P(Fi) P(E|Fi).
4. P(Fi|E) is found by dividing the probability of
the branch for Fi by the sum of the probabilities
of all the branches producing event E.
Example 3 (p. 497)
A manufacturer buys items from 6 different suplliers.
The fraction of the total number of items obtained
from each supplier, along with the probability that an
item purchased from that supplier is defective, is
shown in the table below. Find the probability that a
defective item came from supplier 5.
Supplier
Fraction of
total supplied
Probability of
Defective
1
.05
.04
2
.12
.02
3
.16
.07
4
.23
.01
5
.35
.03
6
.09
.05