Chap 02 Probability(2)
description
Transcript of Chap 02 Probability(2)
-
1
Chapter 2
PROBABILITY
-
2
2.1 Sample Space
We are normally concerned with the presentation, and interpretation of chance outcomes, that occur in a planned or scientific study.
Any data collected is referred to as observation/outcome. Examples are: 1, 2, 0, 2, 1 # of accident each month H, T, T, H, H Head or tail in flipping a coin A process that generates a set of data is called an experiment.
We are particularly interested in the observations obtained by
repeating the experiment several times.
-
3
2.1 Sample Space
more info less info
Each outcome in S is called an element or a member or a sample point.
If the sample space has a finite number of elements, then S may be
written as: S = {H, T} or {1, 2, 3, 4, 5, 6} or {even, odd}
Sometimes, it is useful to represent all outcomes using a tree
diagram.
The set of all possible outcomes of a statistical experiment is called the sample space and is represented by the symbol S.
-
4
2.1 Sample Space Example:
Consider the experiment flipping a coin. If a head (H) appears on the first toss flip it again. If a tail (T) appears on the first toss roll a die. List all the elements of state space using a tree diagram.
By proceeding along the paths, we construct the sample space as: S = {HH, HT, T1, T2, T3, T4, T5, T6}
Starting
point
H
T
1
2
3
4
5
6
H
T
First
outcome
Second
outcome
HH
HT
T1
T2
T3
T4
T5
T6
Sample
points
-
5
2.1 Sample Space
Example: Similarly, if three items are selected randomly from a manufacturing process and tested for defects, the possible outcomes are: S = {DDD, DDN, DND, NDD, DNN, NDN, NND, NNN} If the sample space has an infinite number of points, a statement or rule should be used to describe the state space: S = {x|x is a city with a population over 1 million} S = {(x, y)|x2 + y2 4}
-
6
2.2 Events
In this case, we are interested in the occurrence of certain events rather than the outcome of a specific element. Roll a die Event (# is divisible by 3) A = {3, 6} Defective Event (# of D > 1) B = {DDN, DND, NDD, DDD}
An event may 1) contain all the elements of the sample space, S, or 2) it may contain no elements at all (NULL SET)
A = {x|x is a factor of 11 other than 1} =
An event is a subset of the sample space.
-
7
2.2 Events
For example, if A = {x|x is a male} A = {x|x is a female} We now consider certain operations with events that will result in the formation of new events. For example, if A = {x|x is an even number resulting from rolling a die} = {2, 4, 6} B = {x|x > 3 from rolling a die} = {4, 5, 6} A and B are subsets of the sample space S = {1, 2, 3, 4, 5, 6}. A and B will occur if the outcome is an element of {4, 6}.
The complement of an event A with respect to S is the subset of all elements of S that are not in A. Complement of A is A or .
C = A B (A inter B)
-
8
2.2 Events
If A = {a, e, i, o, u} and B = {r, s, t} C = A B =
Two events A and B are mutually exclusive or disjoint if A B = .
That is, A and B have no elements in common.
Often we are interested in the occurrence of at least one of two events associated with an experiment. That is,
1) either A occurring; or 2) B occurring; or 3) both A and B occurring. So if, A = {2, 4, 6} and B = {4, 5, 6} A U B = {2, 4, 5, 6}
Union of A and B = A U B
The intersection of two events A and B, (A B), is the event containing all elements that are common to A and B.
-
9
2.2 Events
If P = {x|x is a smoker} and Q = {x|x is an alcoholic}, then P U Q = {x|x is either a smoker or an alcoholic}
If A = {x|3 < x < 9} and B = {y|5 < y < 12}
A U B = {z|3 < z < 12}
The union of two events A and B, (A U B), is the event containing all the elements that belong to A or B or both.
The relationship between events and the corresponding sample space can be illustrated graphically by means of Venn Diagrams.
-
10
2.2 Events
A B = regions 1 and 2 B C = regions 1 and 3 A U C = regions 1, 2, 3, 4, 5, 7 B A = regions 4 and 7 A B C = region 1 (A U B) C = regions 2, 6, 7
4 3
2
1
7
5
6
A B
C
S
-
11
2.2 Events
Similarly, we see in the following Venn Diagram that: A, B, C are subsets of S B is a subset of A B C = A U B = A
The events in the Venn Diagram may be associated with
selecting a card from a deck such that:
A: Card is red B: Card is jack, queen, or king of diamond C: Card is an ace
A
B
C
S
-
12
2.2 Events
The following relations hold true: A =
A U = A
A A =
A U A = S
S =
= S
(A) = A
(A B) = A U B
(A U B) = A B
-
13
2.3 Counting Sample Points Probability problems can be solved by counting the number of points in the sample space (i.e. H, T or 1, 2, 3, 4, 5, 6) without having to list all of them.
Multiplication rule: If an operation can be performed in n1 different ways and if each of these operations can be performed in n2 ways then, the two operations can be performed together in n1n2 ways.
Example: How many sample points are in the sample space when a pair of dice is thrown? First die can land in n1 = 6 different ways. For each of these 6 ways, second die can also land in n2 = 6 different ways. The pair of dice can land in n1 x n2 = 6 x 6 = 36 ways.
-
14
2.3 Counting Sample Points
Example
How many even three-digit numbers can be formed from the digits:
1, 2, 5, 6 and 9 if each digit can be used only once?
# of units digits (even) is n1 = 2 {2, 6} (constrained)
For each of these, there are n2 = 4 choices for tens position; and
For each of these, there are n3 = 3 choices for hundreds position
The generalized multiplication rule can be extended to any number of operations (k)n1 x n2 x x nk.
H T U
n1n2n3
Number of even three-digit numbers is: n1 x n2 x n3 = 2 x 3 x 4 = 24
-
15
2.3 Counting Sample Points Example
How many even four-digit numbers can be formed from the digits:
0, 1, 2, 5, 6 and 9 if each digit can be used only once?
A four-digit number can only be formed if the Th 0. Therefore, we have to consider the units position as 0 or NOT 0.
U = 0
# of units digits (even) is n1 = 1; for this choice, (constrained)
# of tens digits is n2 = 5; for each of these,
# of hundreds digits is n3 = 4; and for each of these,
# of thousands digits is n4 = 3.
Number of even four-digit numbers is: n1 x n2 x n3 x n4 = 1 x 5 x 4 x 3 = 60
H T U
n1n2n3
Th
n4
-
16
2.3 Counting Sample Points Example
U 0
# of units digits (even) is n1 = 2; for each of these, (constrained)
# of thousands digits is n4 = 4; for each of these, (constrained)
# of tens digits is n2 = 4; and for each of these,
# of hundreds digits is n3 = 3.
Number of even four-digit numbers is: n1 x n2 x n3 x n4 = 2 x 4 x 3 x 4 = 96
H T U
n1n2n3
Th
n4
Since the above two cases are mutually exclusive, the total number of even four-digit numbers is: 60 + 96 = 156
-
17
2.3 Counting Sample Points
Example:
Consider the three letters a, b, and c. The possible permutations are:
abc, acb, bac, bca, cab, cba 6 possibilities
Essentially, we are filling one position at a time as follows:
There are n1 = 3 choices for the first position; and
n2 = 2 choices for each of these in the second position; and
n3 = 1 choice for each of the n2 in the third position.
So there are n1 x n2 x n3 = 3 x 2 x 1 = 6 possibilities
A permutation is an arrangement of all or part of a set of objects.
If we are interested in all possible arrangements (orders) of a group of objects, we use permutations.
-
18
2.3 Counting Sample Points
Example:
The four letters a, b, c, and d can be arranged in: 4! = 24 ways
If we take them, two at a time, the choices are:
ab, ac, ad, ba, bc, bd, ca, cb, cd, da, db, dc 12 ways
We can do this, without listing all the possibilities since we have two positions to fill using four distinct letters (each letter can be used only once) n1 = 4 and n2 = 3 n1 x n2 = 4 x 3 = 12 ways
The number of permutations of n distinct objects is n!
In general, n distinct objects can be arranged in: n x (n-1) x (n-2) x x (2) x (1) = n! ways
-
19
2.3 Counting Sample Points
In general, n distinct objects taken r at a time can be arranged in:
n x (n-1) x (n-2) x x (n-(r-1))
!
!
121
121121
121
rn
n
rnrn
rnrnrnnnn
rnnnn
divided
multiplied
!rn!n
Prn
The number of permutations of n distinct objects taken r at a time is:
-
20
2.3 Counting Sample Points Example:
Two lottery tickets are drawn from 20 for a first and second prize. Find the number of sample points in the space S.
380192018
20220
!
!P
Example:
A president and a treasurer are to be chosen from a student club consisting of 50 people. How many different choices of officers are possible if
a) there are no restrictions;
b) A will serve only if he is president;
c) B and C will serve together or not at all;
d) D and E will not serve together?
-
21
2.3 Counting Sample Points
2450504948
50250
!
!P
Example:
a) The total number of officers if there are no restrictions is:
b) A will serve only if he is president. We have two possibilities:
b.1) A president
Number of possibilities for president is 1
Number of possibilities for treasurer is 49
Number of possibilities when A is president is 1 x 49 = 49
b.2) A is not president
The two officers are chosen from the remaining 49 people.
2352484947
49249
!
!P
Total number of possibilities is 49 + 2353 = 2401
-
22
2.3 Counting Sample Points c) B and C will serve together or not at all. We have two possibilities:
c.1) B and C serve together
Number of possibilities is 2
c.2) B and C will not serve at all
The two officers are chosen from the remaining 48 people.
2256474846
48248
!
!P
Total number of possibilities is 2 + 2256 = 2258
-
23
2.3 Counting Sample Points d) D and E will not serve together. We have three possibilities:
d.1) D serves as an officer but E does not
Number of possibilities for D is 2 (President or Treasurer)
Number of possibilities for other officer is 48 (E is excluded)
Number of possibilities when only D is an officer is 2 x 48 = 96
d.2) E serves as an officer but D does not
Number of possibilities for E is 2 (President or Treasurer)
Number of possibilities for other officer is 48 (D is excluded)
Number of possibilities when only E is an officer is 2 x 48 = 96
d.2) Neither D nor E serve as officers
The two officers are chosen from the remaining 48 people.
2256474846
48248
!
!P
Total number of possibilities is 2 x 96 + 2256 = 2448
Since D and E can serve together in 2 ways and there are 2450 ways of selecting the officers without restrictions (part a), there are 2450 2 = 2448 ways of selecting the two officers where D and E do not serve together.
-
24
2.3 Counting Sample Points
Two circular arrangements are not considered different unless corresponding objects in the two arrangements are preceded and followed by a different object as we proceed in a clockwise direction.
For circular arrangements, we fix one position and calculate the number of permutations for the rest.
The number of permutations of n distinct objects arranged in a circle is (n-1)!
abcabc bcabca cabcab
acbacb bacbac cbacba
-
25
2.3 Counting Sample Points
ways3!2
!3
If the objects are not distinct, the number of permutations will be different. So the letters a, b, c can be arranged as follows:
abc, acb, bac, bca, cab, cba 6 ways = 3!
If b = c = x, the sample points become:
axx, axx, xax, xxa, xax, xxa axx, xax, xxa = 3 ways =
The number of distinct permutations of n objects of which n1 are of one kind, n2 of a second, , nk of a kth kind is:
!...!!
!
21 Knnn
n
-
26
2.3 Counting Sample Points Example
How many different ways can 3 red, 4 yellow and 2 blue bulbs be arranged in a string of Christmas tree lights with 9 balls.
ways1260!4!3!2
!9
-
27
2.3 Counting Sample Points Often we are concerned with the number of ways of partitioning a
set of n objects into r subsets called cells such that
1) The intersection of each two subsets is the Null Set = {}
2) The union of all subsets is the entire sample space = {S}
3) the order of the elements in each cell is not important
5!1!4
!5
1,4
5
Example Consider the set {a, e, i, o, u} and partition it into two cells such that - the first cell contains 4 elements. - the second cell contains 1 element. - the order is not important
{(a, e, i, o), (u)}, {(a, e, i, u)}, (o)}, {(a, e, o, u), (i)}, {(a, i, o, u),(e)}, {(e, i, o, u), (a)}
There are 5 partitions, calculated as follows:
-
28
2.3 Counting Sample Points The number of ways of partitioning a set of n objects into r cells with n1 elements in the first cell, n2 in the second and so on is:
where n = n1+ n2+ + nr
!...!!
!
,,,2121 rr nnn
n
nnn
n
Sometimes we are interested in the number of ways of selecting r objects from n without regard to the order combinations.
A combination is a partition with two cells, one cell combining r elements and the other combining the (n-r) elements that are left.
The number of combinations of n distinct objects taken r at a time is:
!!!
, rnr
nC
r
n
rnr
nrn
-
29
2.3 Counting Sample Points Example:
From 4 chemists and 3 physicists, find the number of committees that can be formed consisting of 2 chemists and 1 physicist.
# of ways of selecting 2 chemists from 4 is:
# of ways of selecting 1 physicist from 3 is:
Using the multiplication rule with n1 = 6 and n2 = 3 is:
n1 x n2 = 6 x 3 = 18 ways
622
4
2
4
!!
!
3!1!2
!3
1
3
-
30
2.4 Probability of an Event The likelihood of the occurrence of an event resulting from a
statistical experiment is evaluated by means of real numbers called weights or probabilities ranging from 0 to 1.
Probability is a scientific measure of chance that can be represented by a probability scale:
Predictions are measured by means of probabilities.
- If event is very likely to occur probability is close to 1
- If event is not likely to occur probability is close to 0
- If all outcomes are equally likely all outcome prob. are equal
0 0.5 1
Toss of
coin
Absolute
impossibility
Absolute
certainty
-
31
2.4 Probability of an Event
Example:
A die is loaded in such a way that an even number is twice as likely to occur as an odd number. If E is the event that a number less than 4 occurs on a single roll of the die, find P(E).
The sample space of this experiment is: S = {1, 2, 3, 4, 5, 6}
Assign w = probability that an odd number occurs; and
2w = probability that an even number occurs.
The probability of an event A is the sum of the weights of all sample points in A.
0 P(A) 1, P() = 0, and P(S) = 1 Furthermore, is A1, A2, A3, is a sequence of mutually exclusive events, then
P(A1 U A2 U A3 U ) = P(A1) + P(A2) + P(A3) +
-
32
2.4 Probability of an Event
P(S) = 1 = 3w + 3(2w) = 9w
E = {1, 2, 3} P(E) = w + 2w + w = 4w
Now let A = event that an even number turns up: A = {2, 4, 6} and
B = event that a number divisible by 3 occurs = {3, 6}
Find P(AUB) and P(AB).
A U B = {2, 3, 4, 6} and A B = {6}
P(AUB) = 2w + 1w + 2w + 2w = 7w =
P(AB) = 2w =
9
1w
9
4EP
9
7
9
2
-
33
2.4 Probability of an Event If an experiment can result in any one of N different equally likely outcomes, and if exactly n of those outcomes correspond to event A, then the probability of event A is:
N
nAP
Example:
A mixture of candies contains 6 mints, 4 toffees, and 3 chocolates. (N = M + T + C = 6 + 4 + 3 = 13 ). If you make a random selection of one of these candies, find the probability of getting:
a) a mint (M)
b) a toffee or a chocolate (T or C)
13
6
N
MMP
13
7
N
CTCTP
-
34
2.4 Probability of an Event Example:
In a poker hand consisting of 5 cards, find the probability of holding
2 aces and 3 jacks.
# of ways 2 aces out of 4 can be dealt is:
# of ways of being dealt 3 jacks from 4 is:
Using the multiplication rule, the number of ways of being dealt 2
aces and 3 jacks is: n1n2 = 6 x 4 = 24 ways (all equally likely)
# of ways of dealing 5 cards out of 52 is:
4!1!3
!4
3
4
960,598,2!47!5
!52
5
52
5109234.0960,598,2
24 P
6!2!2
!4
2
4
-
35
2.5 Additive Rule This rule allows us to calculate the probability of an event from the probabilities of other events.
BAPBPAPBAP
P(A) + P(B) is the sum of all probabilities in A plus the sum of all probabilities in B. Since P(AB) is added twice, we have the following equation: P(AUB) = P(A) + P(B) - P(AB)
AB
S
AB
If A and B are mutually exclusive, then:
BPAPBAP
0 BAPBA
-
36
2.5 Additive Rule If A1, A2, , An are mutually exclusive, then:
If A1, A2, , An is a partition of a sample space S, then
For three events A, B, and C that are NOT mutually
exclusive:
nn APAPAPAAAP 2121
12121 SPAPAPAPAAAP nn
CBAP
ACPCBPBAP
CPBPAPCBAP
-
37
2.5 Additive Rule Example:
What is the probability of getting a total of 7 or 11 when a pair of fair dice are rolled?
A = event that 7 occurs = {16, 25, 34, 43, 52, 61} 6 outcomes
B = event that 11 occurs = {56, 65} 2 outcomes
N = 36 outcomes, all equally likely
From the listing, the two events are clearly mutually exclusive.
or simply,
6
1
36
6AP
18
1
36
2BP
9
2
18
4
18
1
6
1 BPAPBAP
9
2
36
8
N
nBAP
-
38
2.5 Additive Rule
Example:
If the probabilities that an automobile mechanic will service 3, 4, 5, 6, 7 or (8 or more) cars on any given working day are respectively 0.12, 0.19, 0.28, 0.24, 0.10, 0.01, what is the probability that he will service at least 5 cars on his next working day?
E = event that at least 5 cars are serviced ( 5)
E= event that less than 5 cars are serviced (< 5)
P(E) = 1 - P(E) = 1 - P(3) - P(4) = 1 - 0.12 - 0.19 = 0.69
1 APAP
Often it is more difficult to calculate the probability that an event occurs than it is to calculate the probability that this event does not occur.
-
39
2.6 Conditional Probability The probability of an event B occurring, when it is known that some
event A has occurred is called a conditional probability and is denoted P(B|A).
P(B|A) is read the probability that B occurs given that A has occurred or B given A.
Example: Consider B to be the event of getting a perfect square when a loaded die is rolled, B = {1, 4}. We know that S = {1, 2, 3, 4, 5, 6} and
3
1
9
3
9
2
9
14,1
9
22
9
1
PBP
occuringnumberevenanofyprobabilitw
occuringnumberoddanofyprobabilitw
-
40
2.6 Conditional Probability Now suppose that the roll resulted in a number greater than 3.
The new sample space is now A = {4, 5, 6} subset of S.
The probability that B occurs relative to the sample space A is needed.
First, we calculate the probabilities of the outcomes in subset A.
w = probability of an odd number in A
2w = probability of an even number in A
5
15221 wwwwwAP
AP
BAP
P
squareperfectP
w
wABP
3
&3
5
2
95
92
5
2
Using the original Sample Space S, the probability is given by:
5
224 wPABP
-
41
2.6 Conditional Probability
Example:
Let S be the sample space representing the population of adults in a small town. Well categorize them by sex and employment status:
0
APifAP
BAPABP
Employed Unemployed Total
Male 460 40 500
Female 140 260 400
Total 600 300 900
The conditional probability of B given A, P(B|A) is defined:
-
42
2.6 Conditional Probability One of these individuals is selected at random
Let M = Event that a man is chosen
E = Event that an employed person is chosen
a) Find the probability that a man is chosen given that he is employed.
76667030
23
600
460.
employedof#
menemployedof# EMP
This question is solved using the reduced sample space E
EP
MEP
SnEn
SnMEn
En
MEnEMP
This equation can be modified to use the original sample space S. Let n(A) denote the number of elements in any set A.
30
23
32
4523
3
2
900
600;
45
23
900
460 EMPEPMEP
-
43
2.6 Conditional Probability Example:
The probability that a regularly scheduled flight departs on time is P(D) = 0.83; the probability that it arrives on time is P(A) = 0.82; and the probability that it departs and arrives on time is P(DA)= 0.78.
a) Find the probability that a plane arrives on time given that it
departed on time.
939760830
780.
.
.
DP
DAPDAP
The probability is
high as expected
b) Find the probability that a plane departed on time given that it has arrived on time.
951220820
780.
.
.
AP
DAPADP
The probability is
high as expected
-
44
2.6 Conditional Probability c) Find the probability that a plane arrives on time given that it did not depart on time.
2352908301
78082.0
1
..
.DAP
DP
DAPAP
DP
DAPDAP
The probability is very small
The notion of conditional probability provides the capability to re-evaluate the idea of probability of an event in light of additional information. That is, the probability P(A|B) is an updating of P(A) based on knowledge that event B has occurred.
-
45
Independent events:
Conditional probability allows us to understand the concept of independent events. In the airport example,
2.6 Conditional Probability
DP. ADP 83.0951220
This suggests that the occurrence of A influenced the event D.
If P(A|B) = P(A), then A and B are independent and the occurrence of B has no impact on the occurrence of A.
Two events are independent if and only if
P(B|A) = P(B) or P(A|B) = P(A)
Otherwise they are dependent.
The condition P(B|A) = P(B) implies that P(A|B) = P(A) and vice versa.
-
46
2.7 Multiplicative Rules
Example:
Suppose that we have a fuse box containing 20 fuses of which 5 are defective. If 2 fuses are selected at random and removed from the box in succession without replacement, what is the probability that both fuses are defective?
If in an experiment, the events A and B can both occur, then:
P(AB) = P(A) P(B|A) = P(B) P(A|B)
Define the following events:
A = event that the first fuse is defective; and
B = event that second fuse is defective.
Then AB is the event that both fuses are defective.
P(AB) = P(A).P(B|A)
-
47
2.7 Multiplicative Rules
19
1
19
4
4
1
19
44
1
20
5
ABPAPBAP
ABP
AP
Example:
One bag has 4 white and 3 black balls. A second bag has 3 white and 5 black balls. One ball is drawn from the first bag and placed unseen in the second bag. What is the probability that a ball now drawn from the second bag is black?
Let us define the following events:
B1 = event that a black ball is drawn from bag 1.
W1 = event that a white ball is drawn from bag 1.
B2 = event that a black ball is drawn from bag 2.
-
48
2.7 Multiplicative Rules We are interested in the union of the mutually exclusive events:
B1B2 and W1B2
60317063
38
63
20
63
18
63
20
9
5
7
4
63
18
9
6
7
3
21212
12121
12121
.BWPBBPBP
WBPWPBWP
BBPBPBBP
Two events are independent if and only if
P(AB) = P(A) P(B)
-
49
2.7 Multiplicative Rules Example:
A pair of dice is thrown twice. What is the probability of getting totals of 7 and 11?
Let define the following events:
A1 = 7 occurs on 1st throw. B1 = 11 occurs on 1
st throw.
A2 = 7 occurs on 2nd throw. B2 = 11 occurs on 2
nd throw.
7 occurs as follows: {(6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6)}
11 occurs as follows: {(6, 5), (5, 6)}
We are interested in the mutually exclusive events of A1 B2 = {7, 11} and B1 A2 = {11, 7}. That is, the union of these events:
P[(A1 B2) U (B1 A2)] = P(A1 B2) + P(B1 A2)
-
50
2.7 Multiplicative Rules But A1 and B2, and B1 and A2 are independent. Therefore, the probability of getting 7 and 11 in two throws of a pair of dice is:
0185054
1
36
6
36
2
36
2
36
62121 .APBPBPAP
If, in an experiment, the events A1, A2, , AK can occur, then:
P(A1 A2 AK) = P(A1) P(A2|A1) P(A3|A1 A2) P(Ak|A1 A2 Ak-1)
If A1, A2, , AK are independent, then:
P(A1 A2 AK) = P(A1) P(A2) P(AK)
Example: A coin is biased so that a head is twice as likely to occur as a tail. If the coin is tossed three time, what is the probability of getting 2 tails and 1 head?
-
51
2.7 Multiplicative Rules
For each toss, the sample is S = {H, T}
If P(H) = 2w, then P(T) = w
P(S) = P(H) + P(T) = 2w + w = 3w = 1 w = 1/3
The sample space of interest is A = {TTH,THT,HTT}
The probability of each event is A is calculated as follows:
27
2
3
2
3
1
3
1 HPTPTPHTTPTTHP
27
2 HTTPTHTPTTHP
22209
2
27
6
27
23 .AP
-
52
2.8 Bayes Rule Lets reconsider the example of employed & unemployed males and females.
Suppose that we know that 36 of these employed and 12 of those unemployed are members of the Rotary Club.
We wish to find the probability of event A that the individual selected is a member of the Rotary Club.
-
53
2.8 Bayes Rule Well solve this problem with the help of Venn Diagram.
E Individual is employed
E Individual is unemployed
A Individual is a member of the Rotary Club
A = (E A) U (E A) partition
EAPEPEAPEP
AEPAEPAEAEPAP
75
4
25
1
3
1
50
3
3
2
25
1
300
12
50
3
600
363
1
900
300
3
2
900
600
AP
EAPEAP
EPEP
E
S
AE
EA EA
-
54
2.8 Bayes Rule Theorem of total probability or Rule of elimination:
If the events B1, B2, , Bk constitute a partition of the sample space S such that P(Bi) 0 for i = 1, 2, , k, then for any event A of S,
k
i
ii
k
i
i BAPBPABPAP11
Example: In a certain plant, three machines B1, B2 and B3 make 30%, 45% and 25% of the products. It is known that 2%, 3%, and 2% of the products made by each machine are defective. If a finished product is selected at random, what is the probability that it is defective? A: product is defective Bi: product is made by machine i (i = 1, 2, 3)
-
55
2.8 Bayes Rule
Now suppose that we need to find P(Bi|A). That is, if a product is selected and it is defective, what is the probability that it was made by machine Bi? We use Bayes Rule to find the answer.
k...,,,rfor
BAPBP
BAPBP
ABP
ABPABP
k
i
ii
rr
k
i
i
rr 21
11
0245.002.025.003.045.002.03.0
332211 BAPBPBAPBPBAPBPAP
Bayes Rule:
If the events B1, B2, , Bk constitute a partition of the sample space S where P(Bi) 0 for i = 1, 2, , k, then for any event A of S such that P(A) 0,
-
56
2.8 Bayes Rule So for our example, If product were chosen randomly and found to be defective, what is the probability that it was made by machine 3. That is, find P(B3|A).
2041.00245.0
02.025.0332211
33
3
BAPBPBAPBPBAPBP
BAPBP
ABP