ProbabilityNote 3
ProbabilityNote 3
Contents
I PROBABILITY I: Foundations 3
1 PROBABILITY II (STA 211) - Course Outline 3
2 Combinatorial Analysis 3
2.1 Introduction to Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Counting Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Partition of a Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Combinatorial Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Binomial Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Stirling’s Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1
6 Part 5: Expectation and Variance 18
6.1 Expected Value (Mean) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2 Properties of Expected Value . . . . . . . . . . . . . . . . . . . . . . . . 18
6.3 Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.4 Properties of Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2
Part I
PROBABILITY I: Foundations
1 PROBABILITY II (STA 211) - Course Outline
1. Combinatorial Analysis
2. Probability models for the study of random phenomena in finite sample spaces.
3. Probability distributions of discrete and continuous random variables.
4. Expectations and moments, generating functions.
5. Chebyshev’s Inequality, Bivariate, Marginal distributions and moments.
6. Convolution of two distributions, the Central Limit Theorem and its uses.
2 Combinatorial Analysis
2.1 Introduction to Combinatorics
Combinatorial Analysis is a branch of mathematics concerned with permutations or com-
binations. It is the theory of enumerating, or to solve problems about the probability
of constructing arrangements of objects which satisfy specified conditions, especially in
statistics and probability.
Combinatorics is a branch of mathematics concerning the study of finite or countably
discrete structures.
n! = n(n − 1)(n − 2) . . . 3 · 2 · 1
Factorial Examples
1. Evaluate 5!
Solution
5! = 5 × 4 × 3 × 2 × 1 = 120
(n+2)!
2. Show that: n!
= n2 + 3n + 2
3
Solution
(n + 2)! (n + 2)(n + 1)n!
=
n! n!
= (n + 2)(n + 1) = n + n + 2n + 2 = n2 + 3n + 2
2
n!
3. Simplify (n−2)!
Solution
n! n(n − 1)(n − 2)!
= = n(n − 1) = n2 − n
(n − 2)! (n − 2)!
Permutation
A permutation is the number of different ways you can arrange a set of objects, taking
order into account. The number of ways of arranging n objects, taking r at a time, is
given by the formula:
n n!
Pr =
(n − r)!
Permutation Examples
1. Evaluate 7 P4
Solution
7 7! 7! 7 × 6 × 5 × 4 × 3!
P4 = = = = 840
(7 − 4)! 3! 3!
2. If A = {a, b, c}, in how many ways can the elements be arranged in pairs?
Solution
Here n = 3 and r = 2.
3 3! 3! 3×2×1
P2 = = = =6
(3 − 2)! 1! 1
The paired arrangements are: ab, ac, ba, bc, ca, cb.
n+1
3. For what positive value of n is P2 = 6?
Solution
n+1 (n + 1)! (n + 1)!
P2 = = = (n + 1)n
(n + 1 − 2)! (n − 1)!
Given (n + 1)n = 6 =⇒ n2 + n − 6 = 0 =⇒ (n + 3)(n − 2) = 0. The positive
value of n is 2.
4
Combination
Combination means selection of objects without regard to order. The number of ways of
choosing r objects from a set of n objects is:
n n n!
Cr or =
r (n − r)!r!
Combination Examples
1. Evaluate 4 C3 and 7 C4 .
Solution
4 4 4! 4!
C3 = = = =4
3 (4 − 3)!3! 1!3!
7 7 7! 7!
C4 = = = = 35
4 (7 − 4)!4! 3!4!
Solution
9 9
If r+1
= r
, then either r + 1 = r (impossible) or r + 1 = 9 − r.
2r = 8 =⇒ r = 4
nP
3. If nC
2
2
= 6, find n.
Solution
Note: The original notes contain contradictory working. The problem as stated,
n!/(n−2)!
n!/((n−2)!2!)
= 6 =⇒ 2! = 6, has no solution. The notes then appear to solve a
different problem, which is transcribed below.
(n−2)!
Solving the problem (n−3)!
= 3:
4. Committee Problem 1: In how many ways can a committee of 3 boys and 2 girls
be selected from 6 boys and 4 girls?
5
Solution
Number of ways = (Ways to choose 3 boys from 6) × (Ways to choose 2 girls from
4)
6 4
Total = × = 20 × 6 = 120 ways
3 2
5. Committee Problem 2: A committee of 5 men and 4 women is to be formed
from 9 men and 8 women.
(a) No restrictions: Total = 95 × 84 = 126 × 70 = 8820 ways.
where N = ki=1 Ki .
P
Example: Committees
In how many ways can a group of 12 students be put into 3 respective committees such
that 4, 3, 5 students belong to the respective committees? Solution: This is the partition
of a set of 12 (N = 12) students into subsets of sizes 3 (K1 = 3), 4 (K2 = 4), and 5
(K3 = 5).
12!
Required number of ways = = 27, 720
3!4!5!
6
n n−1 n−1
(b) Pascal’s Identity: Prove r
= r−1
+ r
Proof:
(n − 1)! (n − 1)!
R.H.S = +
(n − r)!(r − 1)! (n − r − 1)!r!
Find common denominator r!(n − r)!:
r · (n − 1)! (n − r) · (n − 1)!
= +
r!(n − r)! r!(n − r)!
(n − 1)!(r + n − r) n(n − 1)! n! n
= = = = (L.H.S)
r!(n − r)! r!(n − r)! r!(n − r)! r
(c) Prove: nr = nr n−1
r−1
Proof:
n (n − 1)! n (n − 1)!
R.H.S = · = ·
r ((n − 1) − (r − 1))!(r − 1)! r (n − r)!(r − 1)!
n · (n − 1)! n! n
= = = (L.H.S)
r · (r − 1)!(n − r)! r!(n − r)! r
(d) Prove: nr + 2 r−1
n n
= n+2
+ r−2 r
Proof:
n n n n
L.H.S = + + +
r r−1 r−1 r−2
Apply Pascal’s Identity to each pair:
n+1 n+1
= +
r r−1
Apply Pascal’s Identity again:
(n + 1) + 1 n+2
= = (R.H.S)
r r
Examples
Pn n n n
Pn n n−r r n
(a) Prove:
Pn n r=0 r = 2 Let x = 1, y = 1: (1 + 1) = r=0 r (1) (1) =⇒ 2 =
r=0 r .
Pn r n
n
Pn n n−r
(b) Prove:
Pn r=0 (−1) r
= 0 Let x = 1, y = −1: (1−1) = r=0 r (1) (−1)r =⇒
0 = r=0 (−1)r nr .
7
2.6 Stirling’s Approximation
When n is very large, evaluating n! is difficult. Stirling’s formula provides an approxima-
tion: √ n n
n! ≈ 2πn
e
Or equivalently: √
n! ≈ 2π · nn+1/2 · e−n
Example
Find the Stirling’s approximation of 8!. Solution:
√
8! ≈ 2π · 88.5 · e−8
p
8! ≈ 2(3.142) · (47745313.28) · (0.00033546)
8! ≈ (2.50679) · (47745313.28) · (0.00033546) ≈ 39902.39
(The exact value is 8! = 40320)
8
3 Part 2: Foundations of Probability
3.1 Basic Terminology
Probability: Probability is the mathematical term which shows all the degree of
belief which we have about something. It is the measure of the likelihood that an
event would occur.
Experiment: Any operation or process that is followed by a result. This means
performing an act: for example tossing a coin, throwing a die, dipping your hand
into a bowl, centering balls to pick one etc. It is the process which leads to the
outcome of one (and only one) of several possible observations. It is also seen as
a painstaking test using scientific methods to discover how something in someone
reacts under certain conditions.
Trial: A trial is just one act performed.
Outcome: An outcome is one of the possible results that can happen in a trial
of an experiment. However it is a particular result of an experiment.
Statistical Experiment: It refers to any process that yields a collection of
outcomes.
Random Experiment: It is an experiment whose outcome may not be the same
even though the conditions of the experiment may be fair. E.g., Tossing a coin,
throwing a fair die.
Sample Space (U or S): It is the set of all possible outcomes of a sample exper-
iment.
Finite Sample Space: Contains a definite (countable) number of points. E.g.,
S = {1, 2, 3, 4, 5, 6}.
Continuous Sample Space: Contains uncountably infinite points. E.g., Human
heights.
Event: It is a collection of sample points; a subset of the sample space.
Simple Event (Elementary Event): An event consisting of one sample point.
Composite Event: An event consisting of two or more sample points.
Sure Event: An event that contains all elements of the sample space (S).
Impossible Event (∅): An event that contains no elements of the sample space.
9
3.3 Axioms of Probability
Let P (·) be a real valued function defined on every event A ⊂ U . Then P (A) is the
probability function of event A if:
1. P (A) ≥ 0
2. P (U ) = 1
A2
A2 − A1
A1
A1
2. Theorem 2: 0 ≤ P (A) ≤ 1.
Proof: By Axiom 1, P (A) ≥ 0. Since A ⊂ U , by Theorem 1, P (A) ≤ P (U ). By
Axiom 2, P (U ) = 1. Thus, P (A) ≤ 1.
3. Theorem 3: P (∅) = 0.
Proof: U = U ∪ ∅. U and ∅ are mutually exclusive. P (U ) = P (U ) + P (∅) =⇒
1 = 1 + P (∅) =⇒ P (∅) = 0.
10
U
A A′
11
4 Part 3: Event Operations and Conditional Proba-
bility
4.1 Types of Events
Mutually Exclusive Events: Two events A and B are mutually exclusive if they
cannot occur simultaneously. A ∩ B = ∅ =⇒ P (A ∩ B) = 0.
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
A B
P (A ∩ B) = P (A)P (B)
12
4.3 Conditional Probability
The conditional probability of event B occurring, given that event A has already occurred,
is:
P (A ∩ B)
P (B|A) = provided P (A) > 0
P (A)
Example: 25 Students
A department has 25 students classified by course (A, B) and sex (M, F).
Problem: (1) What is P (F |B) (Prob. is Female, given takes Course B)? (2) What is
P (A|F ) (Prob. takes Course A, given is Female)?
∩B) ∩B)
Solution: (1) P (F |B) = P P(F(B) = n(F
n(B)
7
= 12 ≈ 0.583 (2) P (A|F ) = P P(A∩F
(F )
)
=
n(A∩F ) 3
n(F )
= 10 = 0.3
(Note: The original notes solved for P (B|F ) = 7/10 = 0.7)
P (B) = P (B ∩ A1 ) + P (B ∩ A2 ) + · · · + P (B ∩ An )
n
X
P (B) = P (Ai )P (B|Ai )
i=1
A1 A2
B
A4 A3
13
Example: Defective Items
Machines A, B, C produce 45%, 35%, 20% of items, respectively. Their defective rates
are 3%, 4%, 5%. Find the probability a random item is defective (D). Solution:
P (B1 )P (B|B1 )
P (B1 |B) =
P (B1 )P (B|B1 ) + P (B2 )P (B|B2 )
1 3 3 3
2
× 5 10 10 3 70 21
= 1 3
1 2
= 3 1 = 21+10 = × =
2
× 5
+ 2
× 7 10
+ 7 70
10 31 31
14
Conditional probabilities of drawing Blue from Bowl II: P (B|W1 ) (Bowl II has 2R,
3B) = 3/5 P (B|W2 ) (Bowl II has 3R, 2B) = 2/5 P (B|W3 ) (Bowl II has 4R, 1B) = 1/5
P (B|W4 ) (Bowl II has 1R, 4B)P= 4/5 60
× 35 + 252
120 2 60
× 5 + 252 × 15 +
TotalProbability P (B) = P (Wi )P (B|Wi ): P (B) = 252
6
252
× 45 P (B) = 180+240+60+24
1260
504
= 1260 42
= 105 = 25
Now, find P (W1 |B) using Bayes’ Theorem:
180/1260 1/7 1 5 5
= = = × =
2/5 2/5 7 2 14
(Note: The notes’ calculation P (W1 |B) = (1/7)/(42/105) = 15/42 = 5/14 is correct.)
15
Part II
PROBABILITY II: Random
Variables
5 Part 4: Random Variables
5.1 Definition and Types
Random Variable (R.V.): A function X which assigns a real number X(s) to every
sample point s in the sample space U .
Discrete Random Variable: Takes on a finite or countably infinite number of
values.
Continuous Random Variable: Takes on an uncountably infinite number of
values (e.g., all values in an interval).
16
Example: Continuous PDF
Let f (x) = kx2 for −1 ≤ x ≤ 1. (a) Find k. (b) Compute P (X ≥ 1/2).
Solution: (a) Find k
1 1
x3
Z
2
kx dx = 1 =⇒ k =1
−1 3 −1
1 1 2 3
k − − = 1 =⇒ k = 1 =⇒ k =
3 3 3 2
(b) Compute P (X ≥ 1/2)
1 1
3 x3
Z
3 2 1
P (X ≥ 1/2) = x dx = = [x3 ]11/2
1/2 2 2 3 1/2 2
1 3 1 3 1 1 7
= 1 −( ) = 1− =
2 2 2 8 16
Rx
Continuous: F (x) = −∞ f (t)dt. This is a continuous function.
3/4
F (x)
1/2
1/4
0
0 1 2
x
17
Example: CDF for f (x) = 32 x2 on [−1, 1]
For x ∈ [−1, 1]:
x x
3 t3
Z
3 2 1 1
F (x) = t dt = = [x3 − (−1)3 ] = (x3 + 1)
−1 2 2 3 −1 2 2
18
6 Part 5: Expectation and Variance
6.1 Expected Value (Mean)
The Expected Value E(X) (or µ) is the long-run average of the R.V.
1. E(C) = C
2. E(aX + b) = aE(X) + b
6.3 Variance
The Variance V (X) (or σ 2 ) measures the spread of the distribution.
Computational Formula:
V (X) = E(X 2 ) − (E(X))2
p
The Standard Deviation is σ = V (X).
19
Example: V (X) for f (x) = 1/4 on [−2, 2]
1. Find E(X):
Z 2
1 1 1
E(X) = x dx = [x2 ]2−2 = [4 − 4] = 0
−2 4 8 8
2. Find E(X 2 ):
Z 2
2 1 21 1 16 4
E(X ) = x dx = [x3 ]2−2 = [8 − (−8)] = =
−2 4 12 12 12 3
3. Find V (X):
4 4
V (X) = E(X 2 ) − (E(X))2 = − (0)2 =
3 3
4. Find Standard Deviation (S.D.):
r √
p 4 2 2 3
S.D. = V (X) = =√ =
3 3 3
1. V (C) = 0
20