Download 2.6 Tools for Counting sample points

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
2.6 Tools for Counting sample points
When the number of simple events in S is
too large, manual enumeration of every sample
point in S is tedious or even impossible.
(Example) If S contains N equiprobable sample points and an event A contains exactly na
sample points, P (A) = na/N .
How about too large na or N ?
(Theorem 2.1)(mn rule)
With m elements a1, a2, . . . , am and n elements
b1, b2, . . . , bn it is possible to form mn = m × n
pairs containing one element from each group.
(Proof)
[Note] (Generalization of mn rule)
If R groups are such that each group may contains nr elements where r = 1, . . . , R, it is possible to form n1 · n2 · · · nR pairs from R groups.
19
(Example 2.5) An experiment involves tossing
a pair of dice and observing the numbers on the
upper faces. Find the number of sample points
in S, the sample space for the experiments.
(Example) Lottery
From the numbers 1,2,. . .,44, a person may
pick any six for her ticket. The winning number is then decided by randomly selecting six
numbers from the forty-four. How many possible lottery tickets?
1 Ordered, without replacement
:
2 Ordered, with replacement
:
3 Unordered, without replacement
:
20
Two important factors in counting rules are
• Order and Replacement
Number of possible arrangements of size r from
n objects :
With
Without
Replacement
Replacement
Ordered
Unordered
nr
Permutation
Combination
(Definition 2.7)(permutation)
An ordered arrangement of r distinct objects
is called a permutation. The number of ways
of ordering n distinct objects taken r at a time
will be designated by the symbol Prn.
(Theorem 2.2)
Prn = n(n − 1)(n − 2) · · · (n − r + 1) =
n!
.
(n − r)!
Note that if n = r, Prn = n! = n(n−1) · · · (2)(1)
and 0! = 1.
21
(Example) From 10 persons, choose a president, a vice president, a secretary and a treasurer for a club. How many possible results?
(Definition 2.8)(combination)
The number of combinations of n objects taken
r at a time is the number of subsets of size r
chosen (without replacement) from n objets.
n
This number will be denoted by Crn or r .
(Theorem 2.4)
n
r
Prn
n
= Cr =
=
r!
n!
n!
n
=
= Cn−r
r!(n − r)!
(n − r)!r!
(Proof)
(Example) In a class, there are 20 male students. Choose 2 male students. How many
possible choices?
If one chooses 5 students from 20 students?
22
The terms nr are generally referred to as bi-
nomial coefficients, because they occur in the
expansion of the binomial expansion
n X
n n−i i
n
(x + y) =
x
y.
i=0 i
(Example 2.12) Let A denote the event that
exactly one of the two best applicants appears
in a selection of two out of five. Find the
number of sample points in A and P (A).
(Example) There are 10 balls, of which 3 are
basket balls, and 7 are footballs. If we want
to put them in a row, how many possible arrangement?(There are two methods, using Crn
n .)
and Cn−r
23
We can use the following theorem to determine
the number of subsets of various sizes that can
be formed by partitioning a set of n distinct
objects into k nonoverlapping groups.
(Theorem 2.3)
The number of ways of partitioning n distinct
objects into k distinct groups containing n1, n2,
. . . , nk objects, respectively, where each object
Pk
appears in exactly one and i=1 ni = n, is
n
n!
N =
=
.
n1n2 · · · nk
n1!n2! · · · nk !
(Proof)
n
n1 n2 ···nk
The terms
are often called multinomial coefficients, because they occur in the expansion of the multinomial term y1 + y2 + · · · +
yk raised to the nth power:
(y1 + y2 + · · · + yk )n =
n
n
n n
y1 1 y2 2 · · · yk k
n1n2 · · · nk
X
where n1 + · · · + nk = n.
24
(Example 2.10) A labor disputes has arisen
concerning the distribution of 20 laborers to
four different construction jobs. The first job
required 6 laborers; the second, third, and fourth
utilized 4,5, and 5 laborers, respectively. Determine the number of ways the 20 laborers
can be divided into groups of the appropriate
sizes to fill all of the jobs.
(Example) There are 10 balls, of which 3 basket balls, 2 footballs, 3 are volleyballs and 2
soccer balls put all balls in a row. How many
possible arrangement?
25
[Summary for counting rules]
Number of possible arrangements of size r from
n objects :
Ordered
Unordered
With
Replacement
Without
Replacement
nr
Prn
Crn
26
2.7 Conditional probability
(Example) The probability of a 1 in the toss
of one balanced die is 1/6.
One has new information that an odd number
has fallen. Then probability of a 1 is 1/3.
The probability of an event will sometimes depend on whether we know that other events
have occurred.
• Unconditional probability of an event:
• Conditional probability of an event: the
probability of the event given the fact that
one or more events have already occurred.
(Example) The unconditional probability of a
1 in the toss of one balanced die is 1/6.
If we know that an even number has fallen, the
conditional probability of the occurrence of a
1 is
.
27
(Def 2.9) The conditional probability of an
event A, given that an event B has occurred,
is equal to
P (A ∩ B)
P (A|B) =
P (B)
provided P (B) > 0. P (A|B) is read “probability
of A given B”. Note that the outcome of event
B allows us to update the probability of A.
(Example 2.14) Suppose that a balanced die is
tossed once.
1) Use (Def 2.9) to find the probability of a 1,
given that an odd number was obtained.
2) Use (Def 2.9) to find the probability of a 4,
given that an odd number was obtained.
28
(Example) In a class, there 44 Junior and Senior students, 30 are men and 40 Junior of
whom 12 are women. If a student is randomly
selected from this class,
(a) What is the probability that the selected
student is a Junior male student?
(b) If the selected student is female, what is
the probability that she is a Senior?
(Example) A child mixes ten good and three
dead batteries. To find the dead batteries, his
father tests them one by one and without replacement. What is the probability that his
father find all three dead batteries at the fifth
test?
29
If probability of the occurrence of an event A is
unaffected by the occurrence or nonoccurrence
of event B, we would say that events A and B
are independent.
(Def 2.10) Two events A and B are said to be
independent, if any one of the following holds:
P (A|B) = P (A),
P (B|A) = P (B),
P (A ∩ B) = P (A)P (B).
Otherwise, the events are said to be dependent.
(Example 2.15) Consider the following events
in the toss of a single die:
A : Observe an odd number.
B : Observe an even number.
C : Observe 1 or 2.
a) Are A and B independent events?
b) Are A and C independent events?
31
(Example) A red fair dice and a white fair dice
are rolled:
A : 4 on the red die.
B : Sum of dice is odd.
C : Sum of dice is 10.
a) Are A and B independent events?
b) Are A and C independent events?
(Theorem)
If A and B are independent, then the following
pairs of events are also independent.
(a)A and B̄,
(b)Ā and B,
(c)Ā and B̄.
(Proof) (a)
32
Extension of (Def 2.10) Three events A, B
and C are said to be mutually independent, if
and only if the following two conditions hold:
(a) They are pairwise independent :
P (A ∩ B) = P (A)P (B),
P (A ∩ C) = P (A)P (C),
P (B ∩ C) = P (B)P (C),
(b) P (A ∩ B ∩ C) = P (A)P (B)P (C).
Otherwise, the events are said to be dependent.
(Example) An urn contains 3 red, 2 white and
4 yellow balls. An ordered sample 3 is drawn
from the urn with replacement. Find the probability of the sequence RWY(i.e., R in 1st, W
in 2nd and Y is 3rd).
A : R in 1st.
B : W in 2nd.
C : Y is 3rd.
Are A, B and C mutually independent?
34
(Example) Consider tossing a fair coin three
times and consider the following three events:
A : Number of heads is even.
B : The first two flips are the same
C : The second two flips are heads.
Are A, B and C mutually independent?
(Example) An experiment consists of tossing
different balanced dice, white and black. The
sample space S of the outcomes consists of all
ordered pairs (i, j)(i = 1, . . . , 6, j = 1, . . . , 6):
S = (1, 1), (1, 2), . . . , (1, 6), . . . , (6, 1), (6, 2), . . . , (6, 6).
Define the following events:
E1 = First die is 1, 2, or 3,
E2 = First die is 3, 4, or 5,
E3 = Sum of the faces is 9.
Are E1, E2 and E3 mutually independent?
35
Generally, many experiments consists of a sequence of n trials that are mutually independent. If the outcomes of the trials do not
have anything to do with one another, then
events, such that each is associated with a different trial, should be independent in probability sense. That is if Ai is associated with the
ith trial, i = 1, . . . , n, then
P (A1 ∩ A2 ∩ · · · ∩ An) = P (A1) ∩ P (A2) · · · P (An).
(Example) A fair six-sided die is rolled 6 independent times. Define an event Ai as follows: Ai = side i is observed on the i-th roll ,
i = 1, . . . , 6. What is the probability that none
of Ai occurs?
36
2.8 Two laws of probability
Theorem 2.5 and 2.6 are useful for calculating
the probabilities of unions and intersections of
events. They play an important role in the
event-composition approach(Section 2.9).
(Theorem 2.5)
The probability of the intersection of two events
A and B is
P (A ∩ B) = P (A)P (B|A)
= P (B)P (A|B)
If A and B are independent, then
P (A ∩ B) = P (A)P (B).
(Proof) From (Def 2.9).
Its extension: The probability of the intersection of any number of, say, k events, can be
obtained in the following way:
P (A1 ∩ A2 ∩ · · · Ak ) =P (A1)P (A2|A1)P (A3|A1 ∩ A2)
· · · P (Ak |A1 ∩ A2 · · · Ak−1).
37
(Theorem 2.6) The probability of the union of
two events A and B is
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
If A and B are mutually exclusive,
P (A ∩ B) = 0 and P (A ∪ B) = P (A) + P (B).
(Proof) .
Its extension for three events:
(Theorem 2.7)
If A is an event, then
P (A) = 1 − P (Ā)
(Proof)
Sometimes it is easier to calculate P (Ā) than
to calculate P (A). In such cases, it is easier to
find P (A) by the relationship P (A) = 1 − P (Ā)
than to find P (A) directly.
38
(Exercise 2.94)
(Exercise 2.95)
(Exercise 2.104)
39
2.9 Calculating the Probability of an
event
The event-composition method : calculate the
probability of an event(defined on a discrete
sample space), A, expresses A, as a composition involving unions and/or intersections of
other events. The laws of probability are then
applied to find P(A).
A summary of the steps follows:
1. Define the experiment.
2. Visualize the nature of the sample points.
Identify a few to clarify your thinking.
3. Write an equation expressing the event of
interest, say, A, as a composition of two
or more events, using unions, intersections,
and/or complements. Make certain that
event A and the event implied by the composition represent the same set of sample
points.
4. Apply the additive and multiplicative laws
of probability to the compositions obtained
in step 3 to find P (A).
40
(Examples 2.20) It is known that a patient
with a disease will respond to treatment with
probability equal to 0.9. If three patients with
disease are treated and respond independently,
find the probability that at least one will respond.
(Examples 2.22)
(Exercise 2.111) An advertising agency notices
that approximately 1 in 50 potential buyers of
a product sees a given magazine ad, and 1 in
5 sees a corresponding ad on television. One
in 100 see both. One in 3 actually purchases
the product after seeing the ad, 1 in 10 without seeing it. What is the probability that a
randomly selected potential customer will purchase the product?
41
2.10 Bayes’ Rule
The event-composition approach is sometimes
facilitated by viewing the sample space S as a
union of mutually exclusive subsets and using
the following law of total probability.
(Def 2.11) For some positive integer k, let the
sets B1, B2, . . . , Bk be such that
1. S = B1 ∪ B2 ∪ · · · Bk .
2. Bi ∩ Bj = φ for i 6= j.
Note that Bi, i = 1, . . . , k are mutually exclusive
and exhaustive. Then the collection of sets
{B1, B2, . . . , Bk } is said to be a partition of S.
If A is any subset of S and {B1, B2, . . . , Bk }
is a partition of S, A can be decomposed as
follows:
A=
42
(Theorem 2.8)
Assume that {B1, B2, . . . , Bk } is a partition of
S such that P (Bi) > 0 for i = 1, 2, . . . , k. Then
for any event A
P (A) =
k
X
P (A|Bi)P (Bi)
i=1
(Proof)
(Theorem 2.9)[Bayes’s Rule]
Assume that {B1, B2, . . . , Bk } is a partition of
S such that P (Bi) > 0 for i = 1, 2, . . . , k. Then
P (A|Bj )P (Bj )
P (Bj |A) = Pk
i=1 P (A|Bi )P (Bi )
(Proof)
43
(Examples 2.23)
(Exercise 2.124) A population of voters contains 40% Republicans and 60% Democrats.
It is reported that 30% of the Republicans and
70% of the Democrats favor an election issue.
A person chosen at random from this population is found to favor the issue in question.
Find the conditional probability that this person is a Democrat.
44
(Example) Box B1 contains 2 red and 4 white
balls. Box B2 contains 1 red and 2 white balls.
Box B3 contains 5 red and 4 white balls.
The experiment consists of selecting a box and
then drawing a ball from that box. The probability for selecting the boxes are not the same
but given by P (B1) = 1/3, P (B2) = 1/6 and
P (B3) = 1/2, where B1, B2 and B3 are the
events that B1, B2 and B3 are chosen, respectively.
If the selected ball is red, find the conditional
probability that it was drawn from box B1.
45
(Example) A package, say P1, of 24 balls, contains 8 green, 8 white, and 8 purple balls. A
Package, say P2, of 24 balls contains 6 are
green, 6 white and 12 purple balls. One of the
two packages is selected at random.
(a) If 3 balls from this package were selected,
all 3 are purple. Compute the conditional probability that package P2 was selected.
(b) If 3 balls from this package were selected,
they are 1 green, 1 white, and 1 purple ball.
Compute the conditional probability that package P2 was selected.
46