Lecture2

advertisement
STA2001 Probability and Statistics
Lecture 2
Tianshi Chen
Typeset by Arina Wang
Review
I
Set Theory
I
P(A) = lim
I
Probability function is a function that assigns P(A) to an
event A, A ⊆ S
n→∞
N (A)
n
1. P(A) ≥ 0
2. P(S) = 1
3. A1 , A2 , · · · , countable and mutually exclusive
P(A1 ∪ A2 ∪ · · · ) = P(A1 ) + P(A2 ) + · · ·
Section 1.2 Method of Enumeration (Permutation and
Combination)
Motivation
Why enumeration?
For some cases, to calculate P(A) can be converted to count
the number of outcomes in A → counting techniques.
Assumption 1: S contains m possible outcomes
ek ,
k = 1, 2, · · · , m,
i.e.,
S = {e1 , e2 , · · · , em }.
Assumption 2: The m outcomes are “equally likely”
P({ek }) =
1
,
m
k = 1, · · · , m.
Motivation
Then
P(A) =
N (A)
,
N (S)
where N (X ) is the number of outcomes in X ⊆ S.
I
It can be verified P(A) is a well-defined probability function
that satisfies the three conditions.
I
To calculate P(A) ⇔ to count the number of elements in A
and in S under Assumptions 1& 2 ⇒ links to the counting
techniques, e.g., the method of enumeration.
Extension of rolling die example.
S={1,2,3,4,5,6}, P({k})= 16 , k=1,· · · ,6.
Counting Technique
Problem
To develop counting techniques for determining the number
of outcomes associated with the events of random experiments.
Assumption: a random experiment can be done by a sequential
implementation of two or more sub-experiments.
Multiplication Principle
Problem
Consider that an experiement E can be done by a sequential
implementation of 2 sub-experiments E1 and E2 .
→ Experiment E1 → n1 outcomes
→ Experiment E2 → n2 outcomes
→ Experiment E1 → Experiment E2 → n1 n2 possible outcomes
|
{z
}
sequential implementation
Example 1
E: Test drugs A, B and placebo on rats (male or female).
E1 : select a rat from the cage which is either male or female,
n1 = 2
E2 : for each selected rat either drug A, drug B or placebo, n2 = 3
In total there are n1 · n2 = 2 × 3 = 6 outcomes.
Then the outcomes for the experiment are denoted by
ordered pair:
(F,A),
(M,A),
(F,B),
(M,B),
(F,P)
in total 6 = 2 × 3
(M,P)
Permutation of n objects
Problem
Consider that n positions are to be filled with n different
objects.
By multiplication principle,
→
position 1
n
→
pos.2
→
···
→
pos.n
n−1
1
in total n! = n(n − 1) · · · 2 · 1 arrangements (0! = 1)
Definition: each of the n! arrangements of n different objects is
called permutation of n objects
Permutation of n objects taken r at a time
Problem
Consider that only r positions are to be filled with objects
selected from n different objects.
By multiplication principle,
→
pos.1
n
→
pos.2
→
···
n−1
in total n Pr = n(n − 1) · · · (n − r + 1) =
→
pos.r
→
n−r +1
n!
(n−r )!
arrangements.
Definition: Each of the n Pr arrangements is called a permutation
of n objects taken r at a time.
Example 2
The number of possible 4-English letter words with different letters
26 P4
= 26 × 25 × 24 × 23 =
26!
22!
Ordered Sample
Defintion[Ordered sample of size r ]
If r objects are selected from a set of n objects and if the
order of selection is noted, then the selected set of r objects
is called ordered sample of size r .
Defintion[Sampling with replacement]
Occurs when an object is selected and then replaced before
the next object is selected (nr ).
Defintion[Sampling without replacement]
Occurs when an object is not replaced after it has been selected (n Pr ).
Example 2 (Revisited)
The number of 4-letter words with different letters
26 P4
−→ sampling without replacement
The number of 4-letter words which can have the same letters.
264 −→ sampling with replacement
Combination of n objects taken r at a time
Motivation
Sometimes, the order of selection is not important and we
are only interested in the number of subsets of size r taken
from a set of n different objects.
Instead to solve the problem in a direct way, we solve the problem
in an indirect way and we consider permutation of n objects
taken r at a time by multiplication principle.
Combination of n objects taken r at a time
1. → pos.1 → pos.2 → · · · → pos.r →n Pr
→
2.
unordered subset of size r
X
permute r objects
r!
→
→
n Pr
n!
∆
=
=n Cr
r!
r !(n − r )!
n
n
=
=
=n Cn−r
r
n−r
⇒ X × r ! =n Pr ⇒ X =
Definition: Each of the n Cr unordered subsets is called
combination of n objects taken r at a time.
Example 3
5 P2
= 5 × 4.
Alternatively,
5
5!
× 2! = 5 × 4
× 2! =
2
2!3!
Example 4
The number of possible 5-card hands drawn from a deck of 52
playing card is
52 C5
I
The number
n
r
=
52
5
is often called binomial coefficients, because
in binomial expansion
n X
n r n−r
(a + b) =
b a
= (a + b)(a + b) · · · (a + b)
r
n
r =0
Distinguishable Permutation of objects of two types
Motivation
Consider permutation of n objects of two types: r of one type
and (n − r ) of the other type.
Instead to solve the problem in a direct way, we solve the problem
in an indirect way and we consider permutation of n different
objects by multiplication principle.
Distinguishable Permutaion
1. → pos.1 → pos.2 → · · · → pos.n →
→
2.
n!
permute n objects of two types
X
permute r objects of one type
r!
permute (n − r ) objects of the other typer
(n − r )!
n
n! = X · r ! · (n − r )! ⇒ X =n Cr =
r
→
→
→
Definition: Each of the n Cr permutations of n objects of two types:
r of one type and (n − r ) of the other type.
Example
Question
Flip a coin 10 times and the sequence of heads and tails is
observed. What is the number of possible 10 tuplets with 4
heads and 6 tails?
Example
Question
Flip a coin 10 times and the sequence of heads and tails is
observed. What is the number of possible 10 tuplets with 4
heads and 6 tails?
The number of possible 10 tuplets with 4 heads and 6 tails is
10
4
because it is a distinguishable permutation of 10 objects of two
types: 4 of one type and 6 of the other type.
Distinguishable permutation of objects of m types
Consider a set of n objectss of m types:
n1 of one type, n2 of one type, · · · , nm of one type, where
n1 + n2 + · · · + nm = n
What’s the number of distinguishable permutation of these n
objects?
Distinguishable permutation of objects of m types
1. permutation of n different objects n!
→
2.
permutation of n objects of m types
X
permutation of type 1
n1 !
..
.
→
permutation type m
nm !
→
n! = X · n1 ! · · · nm ! ⇒ X =
→
n
n1 ! · · · nm !
Download