Вы находитесь на странице: 1из 56

Chapter 2

PROBABILITY

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.

2.1 Sample Space


The set of all possible outcomes of a statistical experiment is
called the sample space and is represented by the symbol S.
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}
more info

less info

Sometimes, it is useful to represent all outcomes using a tree


diagram.

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.
First
outcome
H
Starting
point
T

Second Sample
outcome points
H
HH
T
HT
1
T1
2
T2
3
T3
4
T4
5
T5
6
T6

By proceeding along the paths, we construct the sample space as:


S = {HH, HT, T1, T2, T3, T4, T5, T6}
4

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}

2.2 Events
An event is a subset of the sample space.
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} =

2.2 Events
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 .
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}.
C=AB

(A inter B)
7

2.2 Events
The intersection of two events A and B, (A B), is the event containing
all elements that are common to A and B.
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
Union of A and B = A U B
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}
8

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.

2.2 Events
S
B

A
2

1
4

3
5

AB
BC
AUC
B A
ABC
(A U B) C

= regions 1 and 2
= regions 1 and 3
= regions 1, 2, 3, 4, 5, 7
= regions 4 and 7
= region 1
= regions 2, 6, 7

10

2.2 Events
Similarly, we see in the following Venn Diagram that:
S

A, B, C are subsets of S
B is a subset of A
BC=
AUB=A

A
B

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

11

2.2 Events
The following relations hold true:

A =
AU =A
A A =
A U A = S
S
=

=S
(A)
=A
(A B) = A U B
(A U B) = A B
12

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.
13

2.3 Counting Sample Points


The generalized multiplication rule can be extended to any number
of operations (k)n1 x n2 x x nk.
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?

H
n3

T
n2

U
n1

# 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
Number of even three-digit numbers is: n1 x n2 x n3 = 2 x 3 x 4 = 24
14

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?
H T U
n4 n3 n2 n1
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.
Th

Number of even four-digit numbers is: n1 x n2 x n3 x n4 = 1 x 5 x 4 x 3 = 60

15

2.3 Counting Sample Points


Example
Th

n4

H
n3

T
n2

U
n1

U0
# 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

Since the above two cases are mutually exclusive, the total number of
even four-digit numbers is: 60 + 96 = 156
16

2.3 Counting Sample Points


If we are interested in all possible arrangements (orders) of a group of
objects, we use permutations.
A permutation is an arrangement of all or part of a set of objects.

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
17

2.3 Counting Sample Points


In general, n distinct objects can be arranged in:
n x (n-1) x (n-2) x x (2) x (1) = n! ways
The number of permutations of n distinct objects is n!

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
18

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))

nn 1n 2 n r 1
multiplied

nn 1n 2 n r 1n r n r 1 21
n!

n r n r 1 21
n r !

divided

The number of permutations of n distinct objects taken r at a time is:

n!
n Pr
n r !
19

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.
20 P2

20 !
20 19 380
18 !

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?
20

2.3 Counting Sample Points


Example:
a) The total number of officers if there are no restrictions is:
50 P2

50 !
49 50 2450
48 !

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.
49 !
P

49 48 2352
49 2
47 !
Total number of possibilities is 49 + 2353 = 2401
21

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.
48 P2

48 !
48 47 2256
46 !

Total number of possibilities is 2 + 2256 = 2258

22

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.
48 P2

48 !
48 47 2256
46 !

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.
23

2.3 Counting Sample Points


abcabc

bcabca

cabcab

acbacb

bacbac

cbacba

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)!

24

2.3 Counting Sample Points


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:
3!
axx, axx, xax, xxa, xax, xxa axx, xax, xxa = 3 ways =
3 ways
2!

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:

n!
n1!n2 !... nK !
25

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.

9!
1260 ways
2!3! 4!

26

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
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)}

5
5!

5
There are 5 partitions, calculated as follows:

4, 1 4!1!
27

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:
n

n!

n , n , , n n !n !... n !
r
1 2
1
2
r
where n = n1+ n2+ + nr

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:
n

n
n!

r , n r r n r
r!n r !

28

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:
4
4!

6
2
2!2!

# of ways of selecting 1 physicist from 3 is:


3
3!

3
1
2!1!

Using the multiplication rule with n1 = 6 and n2 = 3 is:


n1 x n2 = 6 x 3 = 18 ways
29

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:
0
Absolute
impossibility

0.5
Toss of
coin

1
Absolute
certainty

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
30

2.4 Probability of an Event


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) +
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.
31

2.4 Probability of an Event


P(S) = 1 = 3w + 3(2w) = 9w w

1
9

E = {1, 2, 3} P(E) = w + 2w + w = 4w PE

4
9
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}

7
P(AUB) = 2w + 1w + 2w + 2w = 7w =
9
P(AB) = 2w = 2
9

32

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
P A
N
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)

M
6
PM

N 13

T C
7
PT C

N
13
33

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.
4
4!

6
# of ways 2 aces out of 4 can be dealt is:
2 2!2!
4
4!

# of ways of being dealt 3 jacks from 4 is: 3 3!1! 4


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: 52 52! 2,598,960

5

5!47!

24
0.9234 10 5
2,598,960
34

2.5 Additive Rule


This rule allows us to calculate the probability of an event from the
probabilities of other events.

P A B P A PB P A B

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
B

If A and B are mutually exclusive, then: A B P A B 0

P A B P A PB
35

2.5 Additive Rule


If A1, A2, , An are mutually exclusive, then:

P A1 A2 An P A1 P A2 P An
If A1, A2, , An is a partition of a sample space S, then

P A1 A2 An P A1 P A2 P An PS 1
For three events A, B, and C that are NOT mutually
exclusive:
P A B C P A PB PC
P A B PB C PC A
P A B C
36

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
6
1
P A

36 6

P B

2
1

36 18

From the listing, the two events are clearly mutually exclusive.
1
1
4
2
P A B P A PB

6 18 18
9
or simply,
P A B

n
8
2

N
36
9
37

2.5 Additive Rule


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.

P A P A 1

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
38

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
w

1
probabilit y of an odd number occuring
9

2w

2
probabilit y of an even number occuring
9

PB P1,4

1 2 3 1

9 9 9 3

39

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

P A 1 2w w 2w 5w w

PB A P4 2w

2
5

1
5

Using the original Sample Space S, the probability is given by:


PB A

2 2 9 2w P 3 & perfect square P A B

5 5 9 5w
P 3
P A
40

2.6 Conditional Probability


The conditional probability of B given A, P(B|A) is defined:
P A B
PB A
if P A 0
P A
Example:
Let S be the sample space representing the population of adults in a
small town. Well categorize them by sex and employment status:

Employed

Unemployed

Total

Male

460

40

500

Female

140

260

400

Total

600

300

900

41

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.
This question is solved using the reduced sample space E
PM E

# of employed men 460 23

0.76667
# of employed
600 30

This equation can be modified to use the original sample space S.


Let n(A) denote the number of elements in any set A.

nE M nE M nS PE M
PM E

nE
nE nS
P E
P E M

460 23
600 2
23 45 23
; P E
PM E

900 45
900 3
23
30
42

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.
P A D 0.78

P AD

0.93976
P D

0.83

The probability is
high as expected

b) Find the probability that a plane departed on time given that it


has arrived on time.
P A D 0.78

P DA

0.95122
P A

0.82

The probability is
high as expected
43

2.6 Conditional Probability


c) Find the probability that a plane arrives on time given that it
did not depart on time.
P A D P A P A D

P D
1 P D
The probability
is very small
0.82 0.78
P A D
0.23529
1 0.83
P A D

The notion of conditional probability provides the capability to reevaluate 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.

44

2.6 Conditional Probability


Independent events:
Conditional probability allows us to understand the concept of
independent events. In the airport example,
PD A 0.95122 0.83 PD

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.
45

2.7 Multiplicative Rules


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)
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?
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)
46

2.7 Multiplicative Rules


5
1

20
4 P A B P A PB A 1 4 1

4
4 19 19

PB A
19
P A

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.
47

2.7 Multiplicative Rules


We are interested in the union of the mutually exclusive events:
B1B2 and W1B2
3 6 18
PB1 B2 PB1 PB2 B1
7 9 63
4 5 20
PW1 B2 PW1 PB2 W1
7 9 63
18 20 38
PB2 PB1 B2 PW1 B2

0.60317
63 63 63

Two events are independent if and only if


P(AB) = P(A) P(B)

48

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 1st throw.

A2 = 7 occurs on 2nd throw.

B2 = 11 occurs on 2nd 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)
49

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:

6 2
2 6
1
P A1 PB2 PB1 P A2

0.0185
36 36 36 36 54
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?
50

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:

1 1 2 2
PTTH PT T H PT PT PH
3 3 3 27
2
PTTH PTHT PHTT
27
2
6 2
P A 3

0.222
27 27 9
51

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.

52

2.8 Bayes Rule


Well solve this problem with the help of Venn Diagram.
S

E Individual is employed
E Individual is unemployed
A Individual is a member of the Rotary Club
A = (E A) U (E A) partition

EA

EA

P E A P E A
P A PE A E A
P E P A E P E P A E
P E

600
2

900
3
36
3
PA E

600
50
P A

P E

300
1

900
3
12
1

P
A
E

300
25

2
3
1
1
4

3 50 3 25
75

53

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,

P A PBi A PBi PA Bi
k

i 1

i 1

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)
54

2.8 Bayes Rule


PB1 PA B1 PB2 PA B2 PB3 PA B3
P A
0.3 0.02 0.45 0.03 0.25 0.02 0.0245
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.
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,

PBr A

PBr A
k

P B
i 1

PBr PA Br

P B P A B
k

i 1

for r 1, 2, ..., k

55

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).

PB3 P A B3

PB3 A PB1 P A B1 PB2 P A B2 PB3 P A B3


0.25 0.02 0.2041

0.0245

56

Вам также может понравиться