TIA Exam P Probability Course Handouts
TIA Exam P Probability Course Handouts
Lesson Handouts
A. Discrete Probability 3
A.1 Fundamentals of Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
A.1.1 Fundamentals of Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
A.1.2 Complements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
A.1.3 Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
A.1.4 De Morgan’s Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
A.1.5 Inclusion-Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
A.2 Conditional Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
A.2.1 Conditional Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
A.2.2 Independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.2.3 Sequences of Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
A.2.4 Bayes’ Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.3 Discrete Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.3.1 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.3.2 Median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A.3.3 Moments: Expected Value/Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.3.4 Tools for Finding Means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.3.5 Means: Survival Function Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.3.6 Variance: Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
A.3.7 Variance: Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
A.3.8 Discrete Uniform Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
A.4 Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A.4.1 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A.4.2 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
A.4.3 The Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A.4.4 Multinomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.4.5 Hypergeometric Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.5 Key Discrete Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.5.0a Geometric Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.5.0b Taylor Series for exp(x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
A.5.1 The Geometric Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
A.5.2 Memoryless Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A.5.3 Negative Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
A.5.4 The Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
A.5.5 Sums of Independent Poissons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
A.6 Deductibles and Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A.6.1 Deductibles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A.6.2 Policy Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
A.6.3 Calculator Approach to Deductible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
A.7 Discrete Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
A.7.1 Discrete Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
2
A.1.1 Fundamentals of Probability Exam P Handouts – Page 3
Fundamentals of Probability 1
Basic Principles
Unions and Intersections
Exercise
1. 0 ≤ P[A] ≤ 1
2. P[S] = 1 P[∅] = 0
3. If A1 ∩ A2 = ∅, then P[A1 ∪ A2 ] = P[A1 ] + P[A2 ]
Example 1
Roll a fair six sided die
S = “Sample Space” = all possible outcomes = {1, 2, 3, 4, 5, 6}
4
A = {3, 4, 5, 6} P[A] =
6
A1 = {3, 4, 5} A2 = {6} A1 ∪ A2 = A A1 ∩ A2 = ∅
3 1
P[A1 ] = P[A2 ] = P[A1 ] + P[A2 ] = P[A]
6 6
4
A.1.1 Fundamentals of Probability Exam P Handouts – Page 5
1. 0 ≤ P[A] ≤ 1
2. P[S] = 1 P[∅] = 0
3. If A1 ∩ A2 = ∅, then P[A1 ∪ A2 ] = P[A1 ] + P[A2 ]
Example 2
Pick a point “at random” from S, where total area of S = 1
P[A] = area of A A1 ∩ A2 = ∅, A1 ∪ A2 = A
Area of A = area of A1 + area of A2
P[A] = P[A1 ] + P[A2 ]
A
S
A1 A2
1. 0 ≤ P[A] ≤ 1
2. P[S] = 1 P[∅] = 0
3. P[A ∪ B] = P[A] + P[B] − P[A ∩ B]
Example 1
Roll a fair six sided die
S = “Sample Space” = all possible outcomes = {1, 2, 3, 4, 5, 6}
3
A = “roll an odd number” = {1, 3, 5} P[A] =
6
3
B = “roll a 3 or less” = {1, 2, 3} P[B] =
6
A ∪ B = {1, 2, 3, 5} A ∩ B = {1, 3}
4 3 3 2
P[A ∪ B] = = + − = P[A] + P[B] − P[A ∩ B]
6 6 6 6
5
A.1.1 Fundamentals of Probability Exam P Handouts – Page 6
1. 0 ≤ P[A] ≤ 1
2. P[S] = 1 P[∅] = 0
3. P[A ∪ B] = P[A] + P[B] − P[A ∩ B]
Example 2
Pick a point “at random” from S, where total area of S = 1
P[A] = area of A.
Area of A ∪ B = area of A + area of B - area of A ∩ B
P[A ∪ B] = P[A] + P[B] − P[A ∩ B]
A B
S
Exercise 6
The probability that a visit to a primary care physician’s (PCP) office results in either
lab work or referral to a specialist is 60%. Of those coming to a PCP’s office, 35% are
referred to specialists and 50% require lab work. Determine the probability that a visit
to a PCP’s office results in both lab work and referral to a specialist.
6
A.1.1 Fundamentals of Probability Exam P Handouts – Page 7
Exercise 6
The probability that a visit to a primary care physician’s (PCP) office results in either
lab work or referral to a specialist is 60%. Of those coming to a PCP’s office, 35% are
referred to specialists and 50% require lab work. Determine the probability that a visit
to a PCP’s office results in both lab work and referral to a specialist.
Let L denote the event that the trip requires lab work, and S the event that it results
in a referral to a specialist.
We are given:
P[L ∪ S] = 0.60 P[S] = 0.35 P[L] = 0.50
and we want P[L ∩ S]
P[L ∪ S] = P[S] + P[L] − P[L ∩ S]
0.60 = 0.35 + 0.50 − P[L ∩ S]
P[L ∩ S] = 0.25
7
A.1.2 Complements Exam P Handouts – Page 8
Complements 1
Recap
Complements
Exercise
Recap 2
8
A.1.2 Complements Exam P Handouts – Page 9
Complements 3
S
A
A0
Complements 4
S
A B
A0
A ∩ A0 = ∅ A ∪ A0 = S
P[A] + P[A0 ] = P[A ∪ A0 ] = P[S] = 1
P[A0 ] = 1 − P[A]
9
A.1.2 Complements Exam P Handouts – Page 10
Exercise 5
In a group of patients with shoulder injuries, 20% visit a physical therapist but not a
chiropractor, and 75% visit at least one of these. The probability that a patient visits a
chiropractor exceeds by 0.1 the probability of visiting a physical therapist. Find the
probability that a randomly chosen member of this group visits a physical therapist.
Exercise 5
In a group of patients with shoulder injuries, 20% visit a physical therapist but not a
chiropractor, and 75% visit at least one of these. The probability that a patient visits a
chiropractor exceeds by 0.1 the probability of visiting a physical therapist. Find the
probability that a randomly chosen member of this group visits a physical therapist.
10
A.1.3 Venn Diagrams Exam P Handouts – Page 11
Venn Diagrams 1
Venn Diagrams
Examples
Mutually Exclusive Events
Exercises
Venn Diagrams 2
They allow us to easily deal with more complicated cases than what we have seen so
far.
11
A.1.3 Venn Diagrams Exam P Handouts – Page 12
Example 1 3
Example 1 4
G .11 − .05 B
.16 .11
= 0.06
We want the probability that someone watches none of these sports, so we want
12
A.1.3 Venn Diagrams Exam P Handouts – Page 13
Example 2 5
In a company’s health care plan, employees may choose exactly two of the coverages
A, B, and C, or they may choose none of them. The proportions of the employees that
choose A, B, and C are 1/4, 1/3, and 5/12, respectively. Find the probability that a
randomly chosen employee will choose none of A, B, or C.
A B
0 x 0
1 1
4 −x 0 3 −x
0
C
A B
0 x 0
1 1
4 −x 0 3 −x
0
C
5 1 1 7 1
P[C ] = = + −x −x = − 2x, x=
12 4 3 12 12
0 1 1
P[(A ∪ B ∪ C ) ] = 1 − x − −x − −x
4 3
1 3−1 4−1 1
=1− − − =
12 12 12 2
13
A.1.3 Venn Diagrams Exam P Handouts – Page 14
Example 2 7
Alternatively, P[A] + P[B] + P[C ] counts each person who buys coverage twice since
each person buys exactly 2 coverages. P[A ∪ B ∪ C ] counts each person who buys
coverage once, so
From the point of view of a Venn diagram, we can draw them as non-overlapping sets.
A B
14
A.1.3 Venn Diagrams Exam P Handouts – Page 15
Exercise 9
Exercise 9
B 0.26 0.13 C
x 0 0.1 − x
15
A.1.3 Venn Diagrams Exam P Handouts – Page 16
Exercise (cont) 10
B 0.26 0.13 C
x 0 0.1 − x
F
We want the probability that someone plays none of these 4, which is
16
A.1.4 De Morgan’s Laws Exam P Handouts – Page 17
De Morgan’s Laws 1
Key Words
De Morgan’s Laws
Exercise
Key Words 2
A B
17
A.1.4 De Morgan’s Laws Exam P Handouts – Page 18
A∪B A0 ∩ B 0 = (A ∪ B)0
A B
A B
The left hand diagram is A or B, while the right hand diagram is neither A nor B.
A∪B ∪C A0 ∩ B 0 ∩ C 0 = (A ∪ B ∪ C )0
A B
A B
C C
18
A.1.4 De Morgan’s Laws Exam P Handouts – Page 19
De Morgan’s Laws 5
" k
#0 " k
#
[ \
Ai = A0i
i=1 i=1
" k
#0 " k
#
\ [
Ai = A0i
i=1 i=1
If you bring the complement inside the brackets, unions and intersections get flipped.
Example 6
We want P[Y ].
19
A.1.4 De Morgan’s Laws Exam P Handouts – Page 20
Example 7
P[Y 0 ∩ M 0 ] = 0.2
P[Y ∪ M 0 ] = 0.6 Y M
P[(Y ∪ M 0 )0 ] = 1 − 0.6 0.4
0
P[Y ∩ M] = 0.4
P[Y 0 ] = P[Y 0 ∩ M 0 ] + P[Y 0 ∩ M] 0.2
P[Y 0 ] = 0.2 + 0.4 = 0.6
P[Y ] = 1 − 0.6 = 0.4
Exercise 8
20
A.1.4 De Morgan’s Laws Exam P Handouts – Page 21
Exercise 8
P[A ∩ B ∩ C ] = 0.1
0
A ∩ B ∩ C 0 = A0 ∪ B 0 ∪ C
P[A ∩ B ∩ C 0 ] = 1 − 0.7 = 0.3
P[A ∩ B] = P[A ∩ B ∩ C ] + P[A ∩ B ∩ C 0 ]
= 0.1 + 0.3
= 0.4
21
A.1.5 Inclusion-Exclusion Exam P Handouts – Page 22
Inclusion-Exclusion 1
Complements: A ∩ A0 = ∅, A ∪ A0 = S
1 = P[S] = P[A] + P[A0 ]
P[A] = 1 − P[A0 ] P[A0 ] = 1 − P[A]
22
A.1.5 Inclusion-Exclusion Exam P Handouts – Page 23
Inclusion-Exclusion 3
A B
Inclusion-Exclusion 4
23
A.1.5 Inclusion-Exclusion Exam P Handouts – Page 24
Exercise 5
Exercise 5
Again, let G , B and S denote those who watch gymnastics, baseball, and soccer
respectively. Then our inclusion-exclusion formula gives us
P[G ∪ B ∪ S] = P[G ] + P[B] + P[S] − P[GB] − P[BS] − P[GS] + P[GBS]
= 0.31 + 0.25 + 0.21 − 0.11 − 0.08 − 0.09 + 0.05
= 0.54
P[(G ∪ B ∪ S)0 ] = 1 − 0.54 = 0.46
24
A.2.1 Conditional Probability Exam P Handouts – Page 25
Conditional Probability 1
Suppose you roll a fair 6-sided die. Given that the result is odd, what is the probability
that it is 3 or less?
# of ways to roll 3 or less and odd
P[roll 3 or less | odd] =
# ways to roll an odd number
#{1, 3} 2
= =
#{1, 3, 5} 3
25
A.2.1 Conditional Probability Exam P Handouts – Page 26
Example 1 3
In a group of 635 men who died in 1999, 160 of the men died from causes related to
heart disease. Moreover, 275 of the 635 men had at least one parent who suffered from
heart disease, and, of these 275 men, 95 died from causes related to heart disease.
Find the probability that a man randomly selected from this group died of causes not
related to heart disease and that neither of his parents suffered from heart disease.
At least 1 parent
95 180 275
with heart disease
Neither parent
65 295 360
with heart disease
HD No HD
160 475
Answer: 295/635
Example 2 4
In a group of 635 men who died in 1999, 160 of the men died from causes related to
heart disease. Moreover, 275 of the 635 men had at least one parent who suffered from
heart disease, and, of these 275 men, 95 died from causes related to heart disease.
Find the probability that a man randomly selected from this group died of causes not
related to heart disease, given that neither of his parents suffered from heart disease.
At least 1 parent
95 180 275
with heart disease
Neither parent
65 295 360
with heart disease
HD No HD
160 475
Answer: 295/360
26
A.2.1 Conditional Probability Exam P Handouts – Page 27
Definitions 5
P[A ∩ B] P[AB]
P[A | B] = =
P[B] P[B]
Key words 6
“Given that a person is in college, there is an 80% chance that they use Facebook”
as does “College students have an 80% chance of using Facebook, while non-college
students . . . ”
Language that restricts possible outcomes to one group/case means condition on that
case.
27
A.2.1 Conditional Probability Exam P Handouts – Page 28
Exercise 7
The blood pressure (high, low, or normal) and heartbeats (regular or irregular) of a random
sample of patients are measured. Of the patients,
1. 36% have high blood pressure and 16% have low blood pressure.
2. 21% have an irregular heartbeat.
3. Of those with an irregular heartbeat, one-third have high blood pressure.
4. Of those with normal blood pressure, one-eighth have an irregular heartbeat.
What portion have a regular heartbeat and low blood pressure?
Exercise 7
The blood pressure (high, low, or normal) and heartbeats (regular or irregular) of a random
sample of patients are measured. Of the patients,
1. 36% have high blood pressure and 16% have low blood pressure.
2. 21% have an irregular heartbeat.
3. Of those with an irregular heartbeat, one-third have high blood pressure.
(1/3) · 0.21 = 0.07
4. Of those with normal blood pressure, one-eighth have an irregular heartbeat.
(1/8) · 0.48 = 0.06
What portion have a regular heartbeat and low blood pressure?
0.08 0.42 0.29 0.79 regular
28
A.2.2 Independence Exam P Handouts – Page 29
Independence 1
Independence
Examples
Exercise
Independence 2
Previously saw
P[A ∩ B] P[AB]
P[A | B] = =
P[B] P[B]
P[AB] = P[B] · P[A | B] = P[A] · P[B | A]
Definition (Independence)
A and B are independent if P[AB] = P[A] · P[B].
29
A.2.2 Independence Exam P Handouts – Page 30
Examples 3
1. Suppose A and B are independent events with P[A] = 0.6 and P[AB] = 0.3. Find
P[B] and P[A | B].
P[AB] = P[A] · P[B] by independence
0.3 = 0.6 · P[B]
0.3
P[B] = = 0.5
0.6
P[A | B] = P[A] = 0.6 by independence
2. A and B are events such that P[A] = 0.4, P[B] = 0.1 and P[AB] = 0.05. Are they
independent? What is P[B | A]?
P[A] · P[B] = 0.4 · 0.1 = 0.04 6= 0.05 = P[AB]
so not independent
P[AB] 0.05
P[B | A] = = = 0.125
P[A] 0.4
Exercise 4
30
A.2.2 Independence Exam P Handouts – Page 31
Exercise 4
31
A.2.3 Sequences of Events Exam P Handouts – Page 32
Sequences of Events 1
Probability of a Flush
Urn Problem
Exercises
Key Idea 2
P[AB]
P[B | A] =
P[A]
This equation can be thought of as a sequence of events: first we need A to occur, and
then second we need B to also occur, taking into account the fact that A occurred.
32
A.2.3 Sequences of Events Exam P Handouts – Page 33
Probability of a flush 3
Find the probability of having a flush after being dealt five cards from a standard deck?
(Flush: at least 5 cards of one same suit. Standard deck: 4 suits, each with 13 cards)
We want: P[all 5 cards have the same suit].
Method 1:
If exactly three of the first 5 cards dealt are spades, what is the probability of being
dealt a flush in the first 7 cards?
33
A.2.3 Sequences of Events Exam P Handouts – Page 34
If exactly four of the first 5 cards dealt are spades, what is the probability of being
dealt a flush in the first 7 cards?
Method 1:
If exactly four of the first 5 cards dealt are spades, what is the probability of being
dealt a flush in the first 7 cards?
non-
38/47
spade
non-
37/46
spade
9 38 9
So P[flush] = + · = 0.35
47 47 46
34
A.2.3 Sequences of Events Exam P Handouts – Page 35
Urn Problem 7
An urn contains 10 balls: 4 red and 6 blue. A second urn contains 16 red balls and an
unknown number of blue balls. A single ball is drawn from each urn. The probability
that both balls are different colors is 0.528.
b/(16+b)
blue
6/10 blue
16/(16+b) red
b/(16+b)
blue
4/10 red
16/(16+b) red
Urn Problem 8
b/(16+b)
blue
6/10 blue
16/(16+b) red
b/(16+b)
blue
4/10 red
16/(16+b) red
6 16 4 b
0.528 = · + ·
10 16 + b 10 16 + b
96 + 4b
=
160 + 10b
b= 9
35
A.2.3 Sequences of Events Exam P Handouts – Page 36
Exercise 1 9
A family has two children, and they are not twins. Given that at least one of the
children is a boy, what is the probability that both children are boys?
Exercise 1 9
A family has two children, and they are not twins. Given that at least one of the
children is a boy, what is the probability that both children are boys?
1/2
boy
1/2 boy
girl
1/2
1/2
boy
1/2 girl
girl
1/2
1/4
P[2 boys | at least 1 boy] = = 1/3
3/4
36
A.2.3 Sequences of Events Exam P Handouts – Page 37
Exercise 2 10
A family has two children, and they are not twins. Given that the oldest child is a boy,
what is the probability that both children are boys?
Exercise 2 10
A family has two children, and they are not twins. Given that the oldest child is a boy,
what is the probability that both children are boys?
1/2
boy
1/2 boy
girl
1/2
1/2
boy
1/2 girl
girl
1/2
1/4
P[2 boys | oldest is a boy] = = 1/2
2/4
37
A.2.4 Bayes’ Theorem Exam P Handouts – Page 38
Bayes’ Theorem 1
Example 1
Statement of Bayes’ Theorem
Example 2
Exercises
Bayes’ Theorem 2
Can use
38
A.2.4 Bayes’ Theorem Exam P Handouts – Page 39
Example 1 3
An auto insurance company insures drivers of all ages. An actuary compiled the
following statistics on the company’s insured drivers:
A randomly selected driver that the company ensures has an accident. Calculate the
probability that the driver was 31-65.
Example 1 (cont.) 4
39
A.2.4 Bayes’ Theorem Exam P Handouts – Page 40
The sets A1 , . . . , Ak are called a partition of the sample space. We will often refer to
them as a list of all possible cases.
In the previous example, the age groups were the Ai , and B was the event of an
accident.
Bayes’ Theorem 6
P[A1 B]
P[A1 | B] =
P[B]
P[A1 ] · P[B | A1 ]
=
P
k
P[BAi ]
i=1
P[A1 ] · P[B | A1 ]
P[A1 | B] =
P
k
P[Ai ] · P[B | Ai ]
i=1
X
The final denominator is P[case] · P[B | case]
cases
40
A.2.4 Bayes’ Theorem Exam P Handouts – Page 41
Example 2 7
Life insurance policy holders are categorized as standard, preferred, and ultra-preferred.
Of a company’s policyholders, 50% are standard, 40% are preferred, and 10% are
ultra-preferred. The probability of dying in the next year is 0.010 for each standard
policyholder, 0.005 for preferred policyholders, and 0.001 for ultra-preferred.
A policyholder dies in the next year. What is the probability that the deceased
policyholder was standard?
Exercise 1 8
Taxicabs in Crobuzon are all either green or blue. On Tuesday, a taxicab got into an
accident. A witness to the accident thought that the cab involved was blue, and
further tests showed that the witness has an 80% chance of correctly identifying the
color of a taxicab, independently of its color.
If 100% of the taxicabs on the streets on Tuesday were green, what was the probability
that the taxicab involved in the accident was blue?
41
A.2.4 Bayes’ Theorem Exam P Handouts – Page 42
Exercise 1 8
Taxicabs in Crobuzon are all either green or blue. On Tuesday, a taxicab got into an
accident. A witness to the accident thought that the cab involved was blue, and
further tests showed that the witness has an 80% chance of correctly identifying the
color of a taxicab, independently of its color.
If 100% of the taxicabs on the streets on Tuesday were green, what was the probability
that the taxicab involved in the accident was blue?
None of the taxicabs were blue that night. The witness is wrong and the cab was not
blue. So the answer is 0% (and in particular, not 80%)!
Exercise 2 9
Taxicabs in Crobuzon are all either green or blue. On Tuesday, a taxicab got into an
accident. A witness to the accident thought that the cab involved was blue, and
further tests showed that the witness has an 80% chance of correctly identifying the
color of a taxicab, independently of its color.
If 85% of the taxicabs on the streets on Tuesday were green, what was the probability
that the taxicab involved in the accident was blue?
42
A.2.4 Bayes’ Theorem Exam P Handouts – Page 43
Exercise 2 9
Taxicabs in Crobuzon are all either green or blue. On Tuesday, a taxicab got into an
accident. A witness to the accident thought that the cab involved was blue, and
further tests showed that the witness has an 80% chance of correctly identifying the
color of a taxicab, independently of its color.
If 85% of the taxicabs on the streets on Tuesday were green, what was the probability
that the taxicab involved in the accident was blue?
43
A.3.1 Mode Exam P Handouts – Page 44
Mode 1
Overview
Random Variables
Mode
Example
Exercise
Overview 2
Median and mode are relatively easy to find, usually appear as part of a longer
problem. Mean can be either a step or an entire problem.
44
A.3.1 Mode Exam P Handouts – Page 45
Random Variables 3
Typically we will use capital letters for random variables and lower case letters for
possible (non-random!) values.
Mode 4
For a discrete random variable X , y is the mode of X if P[X = y ] ≥ P[X = x] for all x.
It is possible that the max is not unique so X can have multiple modes.
45
A.3.1 Mode Exam P Handouts – Page 46
Mode Example 5
Suppose I roll an otherwise fair 7 sided die whose faces are 1, 1, 1, 2, 4, 4, and 6. Find
the mode.
Exercise 6
Find the mode of a Poisson random variable with mean 2.8, meaning that
2.8n −2.8
P[N = n] = ·e for n = 0, 1, 2, . . .
n!
where n! = n(n − 1)(n − 2) . . . (2)(1)
46
A.3.1 Mode Exam P Handouts – Page 47
Exercise 6
Find the mode of a Poisson random variable with mean 2.8, meaning that
2.8n −2.8
P[N = n] = ·e for n = 0, 1, 2, . . .
n!
where n! = n(n − 1)(n − 2) . . . (2)(1)
47
A.3.2 Median Exam P Handouts – Page 48
Medians 1
Definitions
Example
Percentiles
Exercise
Median 2
Definition (Median)
Exam definition: The median of X is the smallest m such that
P[X ≤ m] = F (m) ≥ 1/2.
Remark: there are more complicated definitions because the median is not uniquely
defined for some random variables. Such cases will not appear on the exam, this
simplified definition is equivalent when the median is uniquely defined.
48
A.3.2 Median Exam P Handouts – Page 49
Median Example 3
Suppose I roll an otherwise fair 7 sided die whose faces are 1, 1, 1, 2, 4, 4, and 6. Find
the median.
Percentiles 4
Definition (Percentiles)
The 100% · p th percentile πp is the smallest possible x such that P[X ≤ x] ≥ p.
Example: If X is our die rolling example from before:
x 0 1 2 4 6
F (x) 0 3/7 4/7 6/7 1
49
A.3.2 Median Exam P Handouts – Page 50
Exercise 6
50
A.3.2 Median Exam P Handouts – Page 51
Exercise 6
So the median is 4.
51
A.3.3 Moments: Expected Value/Mean Exam P Handouts – Page 52
Example
Defintions
Example
Exercise
Example 2
52
A.3.3 Moments: Expected Value/Mean Exam P Handouts – Page 53
Definitions 3
Definition (Generalizations)
X 2
E X2 = x · P[X = x]
x
X
E[g (X )] = g (x) · P[X = x]
x
Example 4
An insurance policy pays 100 per day for up to 3 days of hospitalization and 50 per day
of hospitalization thereafter. Find the expected payment for hospitalization if the
number of days of hospitalization, X , is a discrete random variable with
6 − k for k = 1, 2, 3, 4, 5
P(X = k) = 15
0 otherwise
Let g (k) = payment for k days in the hospital.
X
E[g (X )] = g (k) · P[X = k]
k 1 2 3 4 5
g (k) 100 200 300 350 400
P[X = k] 5/15 4/15 3/15 2/15 1/15
5 4 3 2 1
E[g (X )] = 100 · + 200 · + 300 · + 350 · + 400 · = 220
15 15 15 15 15
53
A.3.3 Moments: Expected Value/Mean Exam P Handouts – Page 54
Exercise 5
Exercise 5
54
A.3.4 Tools for Finding Means Exam P Handouts – Page 55
Overview
Law of Total Expectation
Linear Combinations
Exercise
Overview 2
Previously had
X
E[X ] = x · P[X = x]
x
X
E[g (X )] = g (x) · P[X = x]
x
55
A.3.4 Tools for Finding Means Exam P Handouts – Page 56
This often happens with the Ai being high / medium / low risk groups
Linear Combinations 4
Note that
X
E[aX + b] = (ax + b) · P[X = x]
x
X X
= ax · P[X = x] + b · P[X = x]
x x
!
X X
=a· x · P[X = x] +b· P[X = x]
x x
E[aX + b] = a · E[X ] + b
In general, E[aX + bY ] = a E[X ] + b E[Y ] for any two random variables X and Y .
56
A.3.4 Tools for Finding Means Exam P Handouts – Page 57
Exercise 5
40% of an insurer’s claims are from high risk individuals, with an average claim amount
of 500, and 60% are from low risk individuals with an average claim amount of 100.
Due to administrative costs, a claim of X costs the insurer 1.05X + 10. What is the
expected cost to the insurer of a randomly selected claim?
Exercise 5
40% of an insurer’s claims are from high risk individuals, with an average claim amount
of 500, and 60% are from low risk individuals with an average claim amount of 100.
Due to administrative costs, a claim of X costs the insurer 1.05X + 10. What is the
expected cost to the insurer of a randomly selected claim?
57
A.3.5 Means: Survival Function Approach Exam P Handouts – Page 58
58
A.3.5 Means: Survival Function Approach Exam P Handouts – Page 59
The name is because P[N > n] = 1 − F (n) is called the survival function.
The discrete version doesn’t extend easily to finding E[g (X )] (but the continuous
version of the survival function method will).
Exercise 1 4
Following a certain type of surgery, patients are hospitalized for N days, with
5−k
P[N ≥ k] = for k = 0, 1, 2, 3, 4 or 5. Find E[N] using the survival method.
5
59
A.3.5 Means: Survival Function Approach Exam P Handouts – Page 60
Exercise 1 4
Following a certain type of surgery, patients are hospitalized for N days, with
5−k
P[N ≥ k] = for k = 0, 1, 2, 3, 4 or 5. Find E[N] using the survival method.
5
∞
X
E[N] = P[N > n]
n=0
= P[N > 0] + P[N > 1] + P[N > 2] + P[N > 3] + P[N > 4]
= P[N ≥ 1] + · · · + P[N ≥ 5]
4 3 2 1
= + + + +0
5 5 5 5
= 2
Exercise 2 5
Following a certain type of surgery, patients are hospitalized for N days, with
5−k
P[N ≥ k] = for k = 0, 1, 2, 3, 4 or 5. Find E[N] using the definition.
5
60
A.3.5 Means: Survival Function Approach Exam P Handouts – Page 61
Exercise 2 5
Following a certain type of surgery, patients are hospitalized for N days, with
5−k
P[N ≥ k] = for k = 0, 1, 2, 3, 4 or 5. Find E[N] using the definition.
5
P[N = k] = P[N ≥ k] − P[N ≥ k + 1]
5−k 5 − (k + 1)
= −
5 5
1
= for k = 0, 1, 2, 3 or 4
5
1 1 1 1 1
E[N] = 0 · + 1 · + 2 · + 3 · + 4 ·
5 5 5 5 5
10
=
5
= 2
61
A.3.6 Variance: Definition Exam P Handouts – Page 62
Variance 1
Basic Definition
Exercise
Example 2
P[X = 2] = 1
1 1 1
P[Y = 1] = P[Y = 2] = P[Y = 3] =
3 3 3
1 1
P[Z = 1] = P[Z = 3] =
2 2
Then E[X ] = E[Y ] = E[Z ] = 2. But intuitively, Y is more likely to differ from the
mean than X , and Z is even more likely to do so.
The variance of a variable is a way to quantify how much it differs from its mean.
Definition (Variance)
Var[X ] = E[(X − µX )2 ] where µX = E[X ]
62
A.3.6 Variance: Definition Exam P Handouts – Page 63
Example 3
P[X = 2] = 1
1 1 1
P[Y = 1] = P[Y = 2] = P[Y = 3] =
3 3 3
1 1
P[Z = 1] = P[Z = 3] =
2 2
Terminology 4
h i
E X k is the kth moment of X . Sometimes it is called the kth raw moment of X .
63
A.3.6 Variance: Definition Exam P Handouts – Page 64
Exercise 5
An insurance policy pays 100 per day for up to 3 days of hospitalization and 50 per day
for each day of hospitalization thereafter. The number of days of hospitalization, X , is
a discrete random variable with probability function
6−k
P(X = k) = for k = 1, 2, 3, 4, 5 and 0 otherwise.
15
The mean payment amount is 220. Find the variance of a payment for hospitalization.
Exercise 5
An insurance policy pays 100 per day for up to 3 days of hospitalization and 50 per day
for each day of hospitalization thereafter. The number of days of hospitalization, X , is
a discrete random variable with probability function
6−k
P(X = k) = for k = 1, 2, 3, 4, 5 and 0 otherwise.
15
The mean payment amount is 220. Find the variance of a payment for hospitalization.
64
A.3.7 Variance: Tools Exam P Handouts – Page 65
Variance 1
Remark: from the definition, Var[X ] ≥ 0, with Var[X ] = 0 if and only if P[X = µ] = 1,
i.e, X is constant.
This implies that E X 2 ≥ (E[X ])2 .
65
A.3.7 Variance: Tools Exam P Handouts – Page 66
Example Revisited 3
An insurance policy pays 100 per day for up to 3 days of hospitalization and 50 per day
thereafter. The number of days of hospitalization, X , has probability function
6−k
P(X = k) = for k = 1, 2, 3, 4, 5 and 0 otherwise.
15
Find the variance of a payment Y for hospitalization.
k 1 2 3 4 5
Y 100 200 300 350 400
P[X = k] 5/15 4/15 3/15 2/15 1/15
5 4 3 2 1
E[Y ] = 100 · + 200 · + 300 · + 350 · + 400 · = 220
15 15 15 15 15
5 4 3 2 1
E[Y 2 ] = 1002 · + 2002 · + 3002 · + 3502 · + 4002 · = 59,000
15 15 15 15 15
Var[Y ] = 59,000 − 2202 = 10,600
Multiplying by a Constant 4
66
A.3.7 Variance: Tools Exam P Handouts – Page 67
Linear Transformations 5
I.e., shifting by a constant doesn’t change distances from the mean so variance is same.
Var[aX + b] = Var[aX ]
= a2 Var[X ]
67
A.3.7 Variance: Tools Exam P Handouts – Page 68
Exercise 7
Exercise 7
68
A.3.8 Discrete Uniform Random Variables Exam P Handouts – Page 69
Standard Uniform
Generalizations
Exercise
n2 − 1
We will see later that Var[X ] =
12
69
A.3.8 Discrete Uniform Random Variables Exam P Handouts – Page 70
Example 3
As before, we find E[X ] by pairing extremes (3 and 8, 4 and 7, ...). Each pair has an
3+8 11 11
average value of = so E[X ] =
2 2 2
Alternatively, X is not a standard uniform because it starts at 3, not 1. But X − 2 is a
standard uniform on {1, 2, . . . , 6}
1+6 7
E[X − 2] = =
2 2
E[X ] = E[X −2] + 2
7 11
= +2=
2 2
Example 4
n2 − 1
Var[X − 2] =
12
36 − 1
=
12
35
=
12
Var[X ] = Var[X − 2]
35
=
12
70
A.3.8 Discrete Uniform Random Variables Exam P Handouts – Page 71
General case 5
[b − (a − 1)]2 − 1
Var[X ] =
12
(# of values in range)2 − 1
=
12
Exercise 6
The number of losses N is uniformly distributed on {5, 6, . . . , 20}. Each loss results in
a payment of 100. Find the mean and standard deviation of the payment amount.
71
A.3.8 Discrete Uniform Random Variables Exam P Handouts – Page 72
Exercise 6
The number of losses N is uniformly distributed on {5, 6, . . . , 20}. Each loss results in
a payment of 100. Find the mean and standard deviation of the payment amount.
72
A.4.1 Permutations Exam P Handouts – Page 73
Permutations 1
Complete Lists
Partial Lists
Exercises
Complete Lists 2
How many possible rankings are there of a group of 3 people named A, B and C ?
A B C
AB AC BA BC CA CB
There are 3 choices of who comes first, 2 people left who can be second, and then only
1 choice remaining for third. The total number of possibilities is 3 · 2 · 1
73
A.4.1 Permutations Exam P Handouts – Page 74
Complete Lists 3
12 11 10 . . . 3 2 1
There are 12 choices of who can be first.
There are 11 people left who can be second.
There are 10 people left who can be third.
.. .. .. ..
. . . .
There are 3 people left who can be tenth.
There are 2 people who can be eleventh, and that leaves just one who can be last.
Complete Lists 4
Key idea: at each step, multiply the number of choices for the new step with the
choices so far. That gives an answer of
12 · 11 · 10 · · · 2 · 1
= 12!
n! = n · (n − 1) · (n − 2) · · · 2 · 1
1! = 1
0! = 1
74
A.4.1 Permutations Exam P Handouts – Page 75
Partial Lists 5
A contest with 12 people gives out 3 distinct prizes. How many ways are there to give
out these prizes?
12 11 10
Exam questions will have complications so that formula doesn’t apply but ideas do.
Exercise 1 6
How many 3 digit numbers are there with all even digits?
75
A.4.1 Permutations Exam P Handouts – Page 76
Exercise 1 6
How many 3 digit numbers are there with all even digits?
4 · 5 · 5 = 100
The first digit can’t be 0 because then our number would be at most 2 digits. So there
are 4 choices of first digit (namely 2, 4, 6 or 8)
The second and third digits can be 0, so there are 5 choices for each of them (namely
0, 2, 4, 6 or 8).
Exercise 2 7
How many 3 digit numbers are there with all even digits and no repeated digits?
76
A.4.1 Permutations Exam P Handouts – Page 77
Exercise 2 7
How many 3 digit numbers are there with all even digits and no repeated digits?
4 · 4 · 3 = 48
The first digit can’t be 0 because then our number would be at most 2 digits. There
are 4 choices of first digit (namely 2, 4, 6 or 8)
The second digit can be 0, which should give 5 choices (0, 2, 4, 6 or 8). But we
cannot repeat the first digit, leaving only 5 − 1 = 4 choices.
The third digit can be 0, giving 5 potential choices (0, 2, 4, 6 or 8). But we cannot
repeat either of the first 2 digits, leaving only 5 − 2 = 3 choices.
77
A.4.2 Combinations Exam P Handouts – Page 78
Combinations 1
Example
Combinations
Partitions
Exercises
Partial Lists 2
A contest with 12 people gives out 3 distinct prizes. Previously counted the ways to
give out these prizes.
12 11 10
How many ways are there to give out the prizes if all 3 are the same?
The key difference in the second version is whether the top 3 in order are A, B, C or B,
A, C, or C, B, A, or ... we give out the same prizes and there is no difference.
The answer will be less because each rearrangement of the top 3 gives the same prizes.
78
A.4.2 Combinations Exam P Handouts – Page 79
Partial Lists 3
A contest with 12 people gives out 3 prizes. How many ways are there to give out the
prizes if all 3 are the same?
In writing 12 · 11 · 10, each top 3 was counted 3 · 2 · 1 times (since that is how many
orders there are of 3 things), so our answer is
12 · 11 · 10
3·2·1
This comes up often enough to deserve notation.
12
Answer is
3
Can be found on calculator by 12 nCr 3 under ‘prb’ menu
Key Ideas 4
n! = n · (n − 1) · · · 3 · 2 · 1
= # ways to arrange n items in a list
To choose r items from a group of n, if all items we choose are equal then the number
of ways to do so is:
n · (n − 1) · (n − 2) · · · · (n − r + 1) n!
=
r · (r − 1) · (r − 2) · · · · (2) · (1) (n − r )!r !
n! n
= is called n choose r .
(n − r )!r ! r
n n
Notes: = = nCr on calculators
r n − r
n n n!
= = = 1 since 0! = 1 as there is only 1 way to choose the entire set.
0 n 0! · n!
79
A.4.2 Combinations Exam P Handouts – Page 80
Partitions 5
18 people are to be divided into 3 groups, one with 8 people, one with 6, and one with
4. How many such divisions are possible?
Standard method: Initially assume that we have a complete rank, and then divide by
the amount of “overcounting”
So first we rank all 18 people, and let group A be the top 8, group B the next 6, and
group C the bottom 4.
A B C
Partitions 6
18 people are to be divided into 3 groups, one with 8 people, one with 6, and one with
4. How many such divisions are possible?
Second approach:
80
A.4.2 Combinations Exam P Handouts – Page 81
Exercise 1 7
4 distinct numbers are picked from the integers {1, 2, . . . , 30}. How many ways are
there to draw them such that all 4 are divisible by 3?
Exercise 1 7
4 distinct numbers are picked from the integers {1, 2, . . . , 30}. How many ways are
there to draw them such that all 4 are divisible by 3?
different ways.
81
A.4.2 Combinations Exam P Handouts – Page 82
Exercise 2 8
4 distinct numbers are picked from the integers {1, 2, . . . , 30}. How many ways are
there to draw them such that 3 are divisible by 5 and the other is divisible by 7?
Exercise 2 8
4 distinct numbers are picked from the integers {1, 2, . . . , 30}. How many ways are
there to draw them such that 3 are divisible by 5 and the other is divisible by 7?
82
A.4.3 The Binomial Distribution Exam P Handouts – Page 83
Example
Bernoulli random variables
Binomial distributions
Exercises
Example 2
Avery is practicing free throws. If they make each shot with probability 0.7 and each
shot is independent, what is the probability that they make the next 4 shots and then
miss the 2 after that? What is the probability that they make exactly 4 of the next 6
shots?
83
A.4.3 The Binomial Distribution Exam P Handouts – Page 84
A Bernoulli(p) random variable, aka a Bernoulli 0-1 random variable, is a variable that
can only be 0 or 1. Sometimes the case X = 1 is called a success, and X = 0 a failure.
P[X = 1] = p
P[X = 0] = 1 − p = q
E[X ] = 1 · p + 0 · (1 − p) = p
2
E X = 12 · p + 02 · (1 − p) = p
Var[X ] = E X 2 − (E[X ])2
Var[X ] = p − p 2 = p(1 − p)
Var[X ] = pq
If X is a random variable that can only take on two values a and b, with
P[X = b] = p P[X = a] = 1 − p = q
then the mean and variance are
E[X ] = a · q + b · p = a + p · (b − a)
2
E X = a2 · q + b 2 · p
Var[X ] = E X 2 − (E[X ])2
Var[X ] = (b − a)2 · p · q
Or: X = (b − a)Y + a Y ∼ Bernoulli(p)
E[X ] = (b − a)E[Y ] + a = p(b − a) + a
Var[X ] = (b − a)2 Var[Y ]
Var[X ] = (b − a)2 · p · q
Final result arguably worth memorizing especially on later exams
84
A.4.3 The Binomial Distribution Exam P Handouts – Page 85
Binomial distributions 5
In the free throw example, n = 6, p = 0.7 and X was the number of made free throws.
n k
P[X = k] = p (1 − p)n−k
k
Binomial Distributions 6
85
A.4.3 The Binomial Distribution Exam P Handouts – Page 86
Exercise 1 7
A commuter airline sells 32 tickets for a flight on a plane that has 30 seats. The
probability that any particular passenger will not show up for a flight is 0.10,
independent of other passengers. Find the probability that more passengers show up
for the flight than there are seats available.
Exercise 1 7
A commuter airline sells 32 tickets for a flight on a plane that has 30 seats. The
probability that any particular passenger will not show up for a flight is 0.10,
independent of other passengers. Find the probability that more passengers show up
for the flight than there are seats available.
86
A.4.3 The Binomial Distribution Exam P Handouts – Page 87
Exercise 2 8
An airline sells 32 tickets for a flight. The probability that any particular passenger will
not show up for a flight is 0.10, independent of other passengers. What are the mean
and variance of the number of passengers who show up?
Exercise 2 8
An airline sells 32 tickets for a flight. The probability that any particular passenger will
not show up for a flight is 0.10, independent of other passengers. What are the mean
and variance of the number of passengers who show up?
87
A.4.4 Multinomial Distribution Exam P Handouts – Page 88
Multinomial Distribution 1
Example
Multinomial Distribution
Exercise
Example 2
Accidents are categorized into three groups: minor, moderate, and severe. These occur
with probabilities 0.5 for minor, 0.4 for moderate, and 0.1 for severe.
Two accidents occur independently in one month. Find the probability that neither
accident is severe and at most one is moderate.
This is not binomial because each trial / accident has more than 2 possible outcomes.
But many of the ideas remain the same.
88
A.4.4 Multinomial Distribution Exam P Handouts – Page 89
n n − k1 n − k1 − k2 k1 k2 k3
P[X1 = k1 , X2 = k2 , X3 = k3 ] = p1 p2 p3
k1 k2 k3
n! (n − k1 )! k3 k1 k2 k3
= · p p p
k1 !(n − k1 )! k2 !(n − k1 − k2 )! k3 1 2 3
n!
= p1k1 p2k2 p3k3
k1 !k2 !k3 !
Suppose that there are n independent trials, each with the same r possible outcomes.
Let p1 , p2 , . . . , pr be the probabilities of the outcomes, and Xi the number of trials
resulting in the i-th outcome. Then
n!
P[X1 = k1 , X2 = k2 , . . . , Xr = kr ] = p1k1 p2k2 . . . prkr
k1 !k2 ! . . . kr !
As with binomial, need:
• A fixed number of trials
• Different trials are independent
• All trials have same distribution
Difference is now can have > 2 possibilities.
89
A.4.4 Multinomial Distribution Exam P Handouts – Page 90
Exercise 5
Accidents are categorized as minor, moderate, or severe. The probability that a given
accident is minor is 0.5, that it is moderate is 0.4, and that it is severe is 0.1.
Four accidents occur independently in one month. Find the probability that there is at
least one accident of each type.
Exercise 5
Accidents are categorized as minor, moderate, or severe. The probability that a given
accident is minor is 0.5, that it is moderate is 0.4, and that it is severe is 0.1.
Four accidents occur independently in one month. Find the probability that there is at
least one accident of each type.
90
A.4.5 Hypergeometric Distribution Exam P Handouts – Page 91
Hypergeometric Distribution 1
Hypergeometric Distribution
Binomial vs Hypergeometric
Examples
Exercises
Non-Independent Draws 2
Two cases: none of the 3 are defective, or 1 of the three is defective. Those are
mutually disjoint, so we can sum their probabilities, giving
91
A.4.5 Hypergeometric Distribution Exam P Handouts – Page 92
Hypergeometric Distribution 3
Hypergeometric: have G good pieces out of N total. Choose n, and want the
probability of choosing g good items.
G N −G
Number of ways to choose exactly g good items g n−g
=
Number of ways to choose n total items N
n
This is not a binomial distribution: knowing whether or not the first item is good
gives information about whether or not the second one will be good.
If n > g , then it isn’t possible to have n successes, while that would be possible with a
binomial.
Binomial vs Hypergeometric 4
A binomial needs each trial to be independent. This occurs when sampling with
replacement.
92
A.4.5 Hypergeometric Distribution Exam P Handouts – Page 93
Examples 5
When packing for a trip, I draw 6 socks without replacement from a drawer that
contains 16 black socks and 4 white socks.
What is the probability that I will draw 6 white socks? What is the probability that I
will draw 4 black socks and 2 white socks?
Binomial variation 6
Suppose that I draw 6 socks with replacement from a drawer that contains 16 black
socks and 4 white socks.
What is the probability that I will draw 6 white socks? What is the probability that I
will draw 4 black socks and 2 white socks?
P[W = 6] = 0.26
6
P[W = 2] = (0.2)2 (0.8)4
2
= 0.246
93
A.4.5 Hypergeometric Distribution Exam P Handouts – Page 94
Exercise 1 7
I draw 6 socks without replacement from a drawer that contains 10 black socks, 6
brown socks, and 4 white socks. Find the probability that I will draw 2 socks of each
color.
Exercise 1 7
I draw 6 socks without replacement from a drawer that contains 10 black socks, 6
brown socks, and 4 white socks. Find the probability that I will draw 2 socks of each
color.
94
A.4.5 Hypergeometric Distribution Exam P Handouts – Page 95
Exercise 2 8
I randomly select 6 socks from a drawer. Each sock has a 50% chance of being black,
a 30% chance of being brown, and a 20% chance of being white, independently of the
other socks. Find the probability that I will draw 2 socks of each color.
Exercise 2 8
I randomly select 6 socks from a drawer. Each sock has a 50% chance of being black,
a 30% chance of being brown, and a 20% chance of being white, independently of the
other socks. Find the probability that I will draw 2 socks of each color.
Let Bl, Br and W equal # of black, brown, and white socks drawn. Then
6 4
P[Bl = Br = W = 2] = (0.5)2 (0.3)2 (0.2)2
2 2
6!
= (0.5)2 (0.3)2 (0.2)2
2!2!2!
= 0.081
95
A.5.0a Geometric Series Exam P Handouts – Page 96
Geometric Series 1
Overview
Geometric Series
Generalizations
Overview 2
The material in this lesson is optional, will only be used for theory.
96
A.5.0a Geometric Series Exam P Handouts – Page 97
Geometric Series 3
Geometric Series 4
97
A.5.0a Geometric Series Exam P Handouts – Page 98
Example 5
17
X e n+2
Suppose we want to find 5 · 3n −n .
2 3
n=3
n = 3 is the first term, and n = 18 is the first missing term.
The ratio is e/(23 3−1 ) = 3e/8 so we get
17
X e n+2 first term − first missing term
5· =
23n 3−n 1 − ratio
n=3
5e 3+2 5e 18+2
9 3−3
− 3·18 −18
= 2 2 3
3e
1−
8
n · ar n 6
98
A.5.0a Geometric Series Exam P Handouts – Page 99
n2 · ar n 7
Harder still:
∞
X
S= n2 · ar n , |r | < 1
n=0
S = 0 · a + 12 · ar + 22 · ar 2 + . . .
2
Calculus Approach 8
Alternatively,
∞
X a
ar n =
1−r
n=0
∞
X ∞
X
d d n d a
ar n = ar =
dr dr dr 1 − r
n=0 n=0
∞
X a
nar n−1 =
(1 − r )2
n=0
X∞
ar
nar n =
(1 − r )2
n=0
X ar (1 + r )
Taking a second derivative leads to n2 ar n =
(1 − r )3
99
A.5.0b Taylor Series for exp(x) Exam P Handouts – Page 100
x x2 x3 xn
e =1+x + + + ··· + + ···
2 3! n!
d x2 x3
Note : 1+x + + + ···
dx 2 3!
!
x x2
= 0+1+2· +3· + ···
2! 3!
x2
= 1+x + + · · · = ex
2!
u 2 u3
u
e =1+u+ + + ···
2 3!
−x x2 x3
e =1−x + − + ···
2 3!
100
A.5.0b Taylor Series for exp(x) Exam P Handouts – Page 101
Examples 3
∞
X ∞
X
5n e tn −5 −5 (5 e t )n
·e =e
n! n!
n=0 n=0
X∞
−5 un
=e u = 5e t
n!
n=0
−5 t)
=e · e = e −5 · e (5 e
u
t −5
= e 5e
Missing Terms 4
∞
X 2n
Suppose we want to find
n!
n=2
∞
X 2n
We know = e2
n!
n=0
Our sum is missing the n = 0 and n = 1 terms, so
∞
X ∞
X
2n 2n 20 21
= − +
n! n! 0! 1!
n=2 n=0
2 1 2
=e − +
1 1
= e2 − 3
101
A.5.1 The Geometric Distribution Exam P Handouts – Page 102
Suppose I roll a die until I get a 6. Let N be the total number of rolls. What is the
distribution of N?
1
P[N > 0] = 1 P[N = 1] =
6
5 5 1
P[N > 1] = P[N = 2] = ·
6 6 6
2 2
5 5 1
P[N > 2] = P[N = 3] = ·
6 6 6
.. ..
. .
k n−1
5 5 1
P[N > k] = P[N = n] = ·
6 6 6
102
A.5.1 The Geometric Distribution Exam P Handouts – Page 103
Expected Value 3
∞
X ∞
X
E[N] = n · P[N = n] = P[N > k]
n=1 k=0
X∞ n−1 ∞ k
X
1 5 5
= n· · =
6 6 6
n=1 k=0
Variance 4
∞
X
2
E N = n2 · P[N = n]
n=1
X∞ n−1 X∞ n
5 2 1 2 1 6 5
= n · · = n · · ·
6 6 6 5 6
n=0 n=0
1 6 5 11
· · ·
ar (1 + r ) 6 5 6 6
= =
(1 − r )3 5 3
1−
6
1 5 11
· ·
= 5 6 6 = 66
1
63
Var[N] = 66 − 62 = 30
103
A.5.1 The Geometric Distribution Exam P Handouts – Page 104
Geometric starting at 1 5
P[X = n] = p · (1 − p)n−1
1
E[X ] = , memorize or use survival method
p
2 1
E X2 = 2 − (don’t memorize)
p p
2
2 1 1 1 1
Var[X ] = − − = −
p2 p p p2 p
1−p
Var[X ] = (memorize)
p2
Geometrics Starting at 0 6
104
A.5.1 The Geometric Distribution Exam P Handouts – Page 105
Exercise 7
Let N be the number of visits (possibly 0) that a randomly chosen insured makes to the
doctor in a year. If N has a geometric distribution with mean 3, what is the probability
that a randomly chosen insured makes at least 2 visits to the doctor in a year?
Exercise 7
Let N be the number of visits (possibly 0) that a randomly chosen insured makes to the
doctor in a year. If N has a geometric distribution with mean 3, what is the probability
that a randomly chosen insured makes at least 2 visits to the doctor in a year?
105
A.5.2 Memoryless Property Exam P Handouts – Page 106
Memoryless Property 1
Intuitive Example
Algebra Approach
Memoryless Property
Variance
Exercise
“Nines” 2
In each round of the dice game “Nines” I roll two fair six-sided dice. The game ends if
either a 7 or 9 is rolled, and continues to the next round on any other outcome.
If I play a game of Nines, what is the expected number of rounds that I will play?
6 4 5
The game ends on a given round with probability + = .
36 36 18
106
A.5.2 Memoryless Property Exam P Handouts – Page 107
Watching “Nines” 3
If I watch someone play Nines, find the expected number of rounds that I will watch.
There is the same as the previous example, so the answer is still 18/5.
Now suppose I start watching a game after the 3rd round. How many more rounds will
I watch?
Intuitively, this is no different than before. Each round I watch will end the game with
probability 5/18, the number of rounds I watch is a geometric starting at 1, and the
answer is still 18/5.
Algebra Approach 4
The game lasts for more than 3 rounds, so we are given N > 3.
P[N = k + 3, N > 3]
P[N − 3 = k | N > 3] =
P[N > 3]
(1 − p)k+3−1 · p
=
(1 − p)3
= (1 − p)k−1 · p
= P[N = k]
107
A.5.2 Memoryless Property Exam P Handouts – Page 108
Memoryless Property 5
Variance 6
A game of Nines lasts for at least 4 rounds. What are the mean and variance of the
length of the game?
108
A.5.2 Memoryless Property Exam P Handouts – Page 109
Exercise 7
Exercise 7
109
A.5.3 Negative Binomial Distribution Exam P Handouts – Page 110
Roll a die until the third time that a 6 is rolled. Let N denote the number of non-sixes
(failures) that we roll. What is the distribution of N?
The first (n + 3) − 1 rolls had 3 − 1 = 2 sixes. Since there were exactly 3 sixes in the
first n + 3 rolls, there were n non-sixes.
2 n
(n + 3) − 1 1 5 1
P[N = n] =
3−1 6 6 6
3 n
n + (3 − 1) 1 5
=
3−1 6 6
3 n
n + (3 − 1) 1 5
=
n 6 6
110
A.5.3 Negative Binomial Distribution Exam P Handouts – Page 111
111
A.5.3 Negative Binomial Distribution Exam P Handouts – Page 112
Negative binomial 5
Example 6
Find the probability that June will be the fourth month in 2025 in which at least one
accident occurs.
112
A.5.3 Negative Binomial Distribution Exam P Handouts – Page 113
Exercise 7
Exercise 7
113
A.5.4 The Poisson Distribution Exam P Handouts – Page 114
−λ λn
P[X = n] = e · , n = 0, 1, 2, . . .
n!
λ2 λn
eλ = 1 + λ + + ··· + + ···
2! n!
The e −λ term is the constant needed to make the probabilities sum to 1.
114
A.5.4 The Poisson Distribution Exam P Handouts – Page 115
Poisson Means 3
∞
X ∞
X
−λ λn
E[N] = n · P[N = n] = n·e ·
n!
n=0 n=1
∞
X λn−1
=λ e −λ ·
(n − 1)!
n=1
X∞
−λ λm
=λ e · by letting m = n − 1
m!
m=0
∞
X
= λ · 1 since the sum is P[N = m] = 1
m=0
Variance 4
∞ ∞
2 X −λ λ
n X λ · λn−1
E N = 2
n ·e · = n · e −λ ·
n! (n − 1)!
n=0 n=1
∞
X λm
=λ (m + 1) · e −λ · by letting m = n − 1
m!
m=0
∞
! ∞
!
X e −λ · λm X e −λ · λm
=λ m· +λ
m! m!
m=0 m=0
∞
! ∞
!
X X
=λ m · P[N = m] +λ P[N = m]
m=0 m=0
= λ · λ + λ · 1 = λ2 + λ
Var[N] = λ2 + λ − λ2 = λ = E[N]
115
A.5.4 The Poisson Distribution Exam P Handouts – Page 116
Key Points 5
The derivations are harder than what you will be doing on the exam.
−λ λk
P[N = k] = e ·
k!
• E[N] = Var[N] = λ
Exercise 1 6
Policyholders are three times as likely to file two claims as to file four claims.
If the number of claims filed has a Poisson distribution, find the variance of the
number of claims filed.
116
A.5.4 The Poisson Distribution Exam P Handouts – Page 117
Exercise 1 6
Policyholders are three times as likely to file two claims as to file four claims.
If the number of claims filed has a Poisson distribution, find the variance of the
number of claims filed.
P[N = 2] = 3 · P[N = 4]
−λ λ2 −λ λ
4
e · = 3e ·
2 4!
4! λ4
= 2
2·3 λ
4 = λ2
λ=2 or − 2 but λ > 0
so λ = Var[N] = 2
Exercise 2 7
The number of annual losses has a Poisson distribution with second moment equal to
12. Find the probability that the number of annual losses is at least 2.
117
A.5.4 The Poisson Distribution Exam P Handouts – Page 118
Exercise 2 7
The number of annual losses has a Poisson distribution with second moment equal to
12. Find the probability that the number of annual losses is at least 2.
118
A.5.5 Sums of Independent Poissons Exam P Handouts – Page 119
Example
Sums of Poisson
Exercise
Example 2
If X is Poisson with mean 1.7 and Y is an independent Poisson with mean 1.3, find:
a) E[X + Y ]
b) Var[X + Y ]
c) P[X + Y = 2]
119
A.5.5 Sums of Independent Poissons Exam P Handouts – Page 120
Sums of Poisson 3
If N ∼ Poisson (λ), M ∼ Poisson (µ) and they are independent, find P[N + M = n].
n
X
P[N + M = n] = P[N = k] · P[M = n − k]
k=0
Xn
λk −µ µn−k
= e −λ · ·e ·
k! (n − k)!
k=0
n
!
X λk · µn−k 1
= e −(λ+µ) · n! ·
k!(n − k)! n!
k=0
n
X
e −(λ+µ) n
= λk · µn−k ·
n! k
k=0
(λ + µ)n
= e −(λ+µ) ·
n!
= P[Poisson(λ + µ) = n]
Key Point 4
Revisiting our first example: If X is Poisson with mean 1.7 and Y is an independent
Poisson with mean 1.3, find P[X + Y = 2]
120
A.5.5 Sums of Independent Poissons Exam P Handouts – Page 121
Exercise 5
The number of accidents per day at a busy intersection has a Poisson distribution with
mean 0.5 during a workday and 0.3 during a weekend day. If the number of accidents
on different days is independent, what is the probability that there will be exactly three
accidents at the intersection during a week?
Exercise 5
The number of accidents per day at a busy intersection has a Poisson distribution with
mean 0.5 during a workday and 0.3 during a weekend day. If the number of accidents
on different days is independent, what is the probability that there will be exactly three
accidents at the intersection during a week?
The sum of independent Poissons is Poisson, so the number of accidents per week is a
Poisson with mean
121
A.6.1 Deductibles Exam P Handouts – Page 122
Deductibles 1
Deductibles
Finding Expected Payments
Exercises
Deductibles 2
122
A.6.1 Deductibles Exam P Handouts – Page 123
Example 3
Suppose that loss amounts are uniform on {1, 2, 3, 4, 5} and that there is a deductible
of 2. What is the expected payment? What is the probability that the uncovered loss
will be 2?
1 1 1 1 1
E[Payment] = ·0+ ·0+ ·1+ ·2+ ·3
5 5 5 5 5
= 1.2
4
P[Uncovered Loss = 2] =
5
There are often fewer possible values for the uncovered loss than for the payment,
which means that it is often easier to find E[X ∧ d] than E[(X − d)+ ]. We can take
advantage of this as follows:
X = (X − d)+ + (X ∧ d)
E[X ] = E[(X − d)+ ] + E[X ∧ d]
E[(X − d)+ ] = E[X ] − E[X ∧ d]
Warning: This only works for first moments:
X 2 6= (X − d)2+ + (X ∧ d)2
E[X 2 ]6= E[(X − d)2+ ] + E[(X ∧ d)2 ]
Exam questions about second moments are very rare.
123
A.6.1 Deductibles Exam P Handouts – Page 124
Exercise 1 5
A farm is insured against tornado damage. During tornado season, each week has
either 0 or 1 tornados, with a probability of 0.3 of having a tornado. The policy pays
$100 per tornado, with an annual deductible of $50.
Tornado season is 8 weeks long and the number of tornados in different weeks are
independent. Find the expected annual insurance payment.
Exercise 1 5
A farm is insured against tornado damage. During tornado season, each week has
either 0 or 1 tornados, with a probability of 0.3 of having a tornado. The policy pays
$100 per tornado, with an annual deductible of $50.
Tornado season is 8 weeks long and the number of tornados in different weeks are
independent. Find the expected annual insurance payment.
Let N be the number of storms, and X = 100N the total loss. The uncovered loss is
either 0 (if there are no tornados) or 50 (if there is at least 1 tornado). So
E[X ∧ 50] = 0 · P[N = 0] + 50 · P[N ≥ 1]
= 0 + 50 · 1 − 0.78
= 47.12
E[X ] = 100 E[N] = 100 · 8 · 0.3 = 240
E[Payment] = 240 − 47.12 = 192.88
124
A.6.1 Deductibles Exam P Handouts – Page 125
Exercise 2 6
The number of annual losses N is a geometric on {0, 1, 2, . . . } with mean 2. Losses are
insured for $100 each, with an annual deductible of $150. Find the expected annual
payment.
Exercise 2 6
The number of annual losses N is a geometric on {0, 1, 2, . . . } with mean 2. Losses are
insured for $100 each, with an annual deductible of $150. Find the expected annual
payment.
1−p
E[N] = 2 =
p
p = 1/3
E[Uncovered Loss] = 0 · P[N = 0] + 100 · P[N = 1] + 150 · P[N ≥ 2]
= 0 · p + 100 · (1 − p)p + 150 · (1 − p)2
= 88.9
E[Payment] = E[Total Loss] − E[Uncovered Loss]
= 2 · 100 − 88.9
= 111.1
125
A.6.2 Policy Limits Exam P Handouts – Page 126
Policy Limits 1
Policy Limits
Exercises
Policy Limits 2
Another way for the payment to be less than the total loss is to have a policy limit.
Let X be the loss amount, and u the policy limit. With no deductible,
(
X X ≤u
Payment =
u u<X
126
A.6.2 Policy Limits Exam P Handouts – Page 127
With both a deductible of d and a limit of u, then there are different types of limits.
Examples in the study note all have a payment limit, meaning that u is the maximum
payment allowed. In that case:
0 X ≤d
Payment = X − d d < X ≤ d + u
u d +u <X
The expected payment is also called the net premium or the benefit premium.
Exercise 1 4
The number of annual losses is Poisson with mean 2.4. Each loss results in 50 in
damages. Total annual claims are insured with a payment limit of 75. Find the
expected annual payment.
127
A.6.2 Policy Limits Exam P Handouts – Page 128
Exercise 1 4
The number of annual losses is Poisson with mean 2.4. Each loss results in 50 in
damages. Total annual claims are insured with a payment limit of 75. Find the
expected annual payment.
Exercise 2 5
128
A.6.2 Policy Limits Exam P Handouts – Page 129
Exercise 2 5
129
A.6.3 Calculator Approach to Deductible Exam P Handouts – Page 130
Examples Revisited
Example 2
Suppose that loss amounts are uniform on {1, 2, 3, 4, 5} and that there is a deductible
of 2. What is the expected payment?
Put x in L1 , P[X = x] in L2 and payment in L3 . For the payment, we will start with a
formula (L3 = L1 − 2) and then edit to take into account the deductible.
E[Payment] = 1.2
130
A.6.3 Calculator Approach to Deductible Exam P Handouts – Page 131
Example 3
A farm is insured against damage from tornados. Each week during tornado season has
either 0 or 1 tornados, with a probability of 0.3 of having a tornado. The insurance
policy pays $100 per tornado, with an annual deductible of $50.
If tornado season is 8 weeks long and the number of tornados in different weeks are
independent, what is the expected annual insurance payment?
Put N in L1 , probabilities in L2 .
E[Payment] = 193
Example 4
The number of annual losses N is geometric on {0, 1, 2, . . . } with mean 2. Each loss is
insured for $100, with annual deductible of $150. Find the expected annual payment.
Can’t enter all possible values, but E[N] is only 2. Turns out going up to 10 isn’t
enough, 15 gets pretty close.
1−p
E[N] = 2 =
p
1
2p = 1 − p ⇒p=
3
k
1 2
P[N = k] = p(1 − p)k = ·
3 3
Payment is 100N − 150 when positive, 0 otherwise.
131
A.6.3 Calculator Approach to Deductible Exam P Handouts – Page 132
Example 5
Loss amounts X have a binomial distribution with n = 5 and p = 0.4. Suppose that
there is a deductible of 1 and a payment limit of 3. What is the resulting expected
payment?
When X is above the deductible and the limit hasn’t yet been reached, the payment is
X − 1. Below the deductible the payment is 0 and above the limit it is 3.
This time we will edit L3 for both the deductible and limit.
E[Payment] = 1.07
132
A.7.1 Discrete Review Exam P Handouts – Page 133
Discrete Review 1
Basic Formulas
Moments
Combinatorics
Key Distributions
• 0 ≤ P[A] ≤ 1
• P[State Space] = 1, P[∅] = 0
• P[A ∪ B] = P[A] + P[B] − P[A ∩ B]
If A and B are mutually exclusive, then P[A ∩ B] = 0 and P[A ∪ B] = P[A] + P[B]
• A ∪ A0 = State Space, A ∩ A0 = ∅
• P[Ac ] = P[A0 ] = 1 − P[A], P[A] = 1 − P[A0 ]
P[A ∩ B]
• P[A | B] =
P[B]
• P[A ∩ B] = P[AB] = P[A] · P[B | A]
• A and B are independent if and only if P[AB] = P[A] · P[B].
In that case, P[A | B] = P[A]
133
A.7.1 Discrete Review Exam P Handouts – Page 134
Examples 3
If A and B are independent with P[A ∪ B] = 0.58 and P[A] = 0.3, find P[A0 ∪ B 0 ].
Examples 4
If P[A | B] = 3P[B | A], P[A ∪ B] = 7P[AB] and P[B] = 0.1, then what is P[AB]?
P[A | B] = 3P[B | A]
P[AB] P[AB]
=3·
P[B] P[A]
P[A] = 3 · P[B] = 0.3
P[A ∪ B] = P[A] + P[B] − P[AB]
7P[AB] = 0.3 + 0.1 − P[AB]
0.4
P[AB] = = 0.05
8
134
A.7.1 Discrete Review Exam P Handouts – Page 135
Moments, etc. 5
Example 6
x P[X = x] P[X ≤ x]
1 c 1/15
2 2c 3/15
3 3c 6/15
4 4c 10/15
5 5c 15/15
X 1
1= P[X = x] = c + 2c + 3c + 4c + 5c, c=
x
15
The mode is 5 since that maximizes P[X = x] and the median is 4 since that is the
first time F (x) = P[X ≤ x] exceeds 1/2.
135
A.7.1 Discrete Review Exam P Handouts – Page 136
Example 7
1 2 5
E[X ] = 1 · +2· + ··· + 5 ·
15 15 15
55 11
E[X ] = =
15 3
2 1 2 5
E X = 12 · + 22 · + · · · + 52 ·
15 15 15
2 225
E X = = 15
15
2
11 14
Var[X ] = 15 − =
3 9
136
A.7.1 Discrete Review Exam P Handouts – Page 137
Combinatorics 9
n! = n(n − 1)(n − 2) . . . 2 · 1
= # of ways to order n objects
1! = 1
0! = 1
n n!
=
k (n − k)!k!
n
=
n−k
= # of ways to choose k objects from a set of n
Example 10
I randomly select two socks from a drawer that has 4 black socks and 6 brown socks,
and put them into a bag that initially had 3 black and 3 brown socks. I then randomly
select a sock from the bag. Find the probability that both socks from the drawer were
brown given that the sock taken from the bag was brown.
Let X be the number of brown socks taken from the drawer and Y the number of
brown socks drawn from the bag.
P[X = 2, Y = 1]
P[X = 2 | Y = 1] =
P[Y = 1]
6
2 5
10
·
2
8
= 6
6 4
4
2 5 1 1 4 2 3
10
· + 10
· + 10
·
2
8 2
8 2
8
15 · 5 25
= =
15 · 5 + 24 · 4 + 6 · 3 63
137
A.7.1 Discrete Review Exam P Handouts – Page 138
Key Distributions 11
Key Distributions 12
138
B.0.1 Differentiation Exam P Handouts – Page 139
f (x)
The derivative is the
instantaneous rate of change
x x+h
f (x + h) − f (x)
= lim
h→0 h
f (x + dx) − f (x) df
= =
dx dx
Example
The definition is typically cumbersome to use.
For example,
d 2 (x + h)2 − x2
x = lim
dx h→0 h
x2 + 2xh + h2 − x2
= lim
h→0 h
2xh + h2
= lim
h→0 h
= lim (2x + h)
h→0
= 2x
Basic Formulas
d
f (x) = f 0 (x)
dx
d
a = 0 for any constant a
dx
d n
x = nxn−1
dx
d 1
[ln(x)] =
dx x
d x
e = ex
dx
d
[f (x) + g(x)] = f 0 (x) + g 0 (x)
dx
d d
[c f (x)] = c f (x) = cf 0 (x)
dx dx
d 3
x = 3x2
dx
d 2
3y = 3 · 2y 1 = 6y
dy
d
5et + 3t4 = 5et + 3 · 4t3
dt
d 2 d −3
= 2s
ds s3 ds
= −6s−4
−6
= 4
s
Chain Rule
Examples
d n du
u = nun−1
dx dx
d u du
e = eu ·
dx dx
d d
exp −2t + t2 = exp [u]
dt dt
du
= exp [u] ·
dx
= exp −2t + t2 · (−2 + 2t)
d 5 4
2x2 + 5x + 3 = 5 2x2 + 5x + 3 ·(4x + 5)
dx
d
exp 5et − 5 + 3t = exp 5et − 5 + 3t · 5et + 3
dt
Product Rule
What about the derivatives of products or quotients of two
functions?
d dv du
u·v =u· + ·v
dx dx dx
tiny (uv)0 = u · v 0 + u0 · v
dv u · dv
Quotients can be done by
rewriting them as products
v uv du · v
d 1 d 1 1
u· =u· + u0 ·
dx v dx v v
u du −u v 0 u0
= +
v2 v
−uv + u0 v
0
=
v2
d 2 3x
x e = x2 · 3e3x + 2x · e3x
dx
d e−x d −x −3
= e ·x
dx x3 dx
−3 1
= e−x · 4 + (−e−x ) · 3
x x
d h 3 i 3 d 4x
x2 + 3x + 5 · e4x = x2 + 3x + 5 · e
dx dx
d h 2 3 i 4x
+ x + 3x + 5 ·e
dx
3
= x2 + 3x + 5 · 4e4x
+ 3 · (x2 + 3x + 5)2 · (2x + 3) · e4x
Absolute Values
y
|x| |x| = x if x ≥ 0
|x| = −x if x < 0
(
d 1 x>0
|x| =
x dx −1 x<0
d|x|
Note that is
dx
undefined if x = 0.
cos(x) d
cos(x) = − sin(x)
dx
x
sin(x)
x d
sin(x) = cos(x)
dx
Further Examples
d 2x + 5 (−1)(2x − 3) 2
= (2x + 5) +
dx x2 − 3x + 4 (x2 − 3x + 4)2 x2 − 3x + 4
d 2 2 2
(x + 2)ex −5x = (x + 2)(2x − 5)ex −5x + 1 · ex −5x
dx
d 2 −3x2 2 2
x e = x2 (−6x)e−3x + 2x · e−3x
dx
Further Examples
d d
sin |x + 2| = sin(x + 2) if x + 2 > 0
dx dx
= cos(x + 2) x > −2
d d
sin |x + 2| = sin(−x − 2) if x + 2 < 0
dx dx
= − cos(−x − 2) x < −2
Definition of an Integral
f (x)
(x, f (x))
x
a x x + dx b
Zb
f (x) dx = area under curve
a
In some sense, f (x) dx is the area of an infinitely thin rectangle
and the integral says that the area under the curve is the sum
of the areas of infinitely many of these thin rectangles.
B.0 One Dimensional Calculus B.0.2 1-Dimensional integrals 16 / 42
146
B.0.1 Differentiation Exam P Handouts – Page 147
Geometric Examples
Often we can use geometry to find the integral/area under the
curve.
f (x) f (x)
x x
a a
Z a Z a
a2
2dx = 2a xdx =
0 0 2
Geometric Examples
In that example,
1. The integral of a constant was a linear function.
2. The integral of a line was a quadratic function.
So in these two examples, when we integrated the power of a
polynomial increased by 1.
When we differentiate,
1. The derivative of a linear function is a constant.
2. The derivative of a quadratic function is linear.
More generally, when we differentiate the power of a polynomial
decreases by 1. That is the opposite of when we integrate.
t
a x x+h
R
x+h Rx
Zx f (t) dt − f (t) dt
d d a a
F (x) = f (t) dt = lim
dx dx h→0 h
a
f (x) · h
= lim = f (x)
h→0 h
Zx
d
f (t) dx = f (x)
dx
a
Evaluating Integrals
The Fundamental Theorem of Calculus says that derivatives
and integrals are inverse operations. To find the integral of
f (x), we need to find a function whose derivative is f (x).
Examples
Z 5 5
1 52 02 25
x dx = x2 = − =
0 2 0 2 2 2
Zb b
n 1
x dx = · xn+1
n+1 a
a
bn+1 an+1
= −
n+1 n+1
Common Formulas
Z
a dx = ax + C
Z
x2
x dx = +C
2
Z
n xn+1
x dx = + C for n 6= −1
n+1
Z
1
ebx dx = ebx + C
b
Z Z
ax dx = ex ln a dx
1 x
= a +C
ln a
Examples
Z 5 5
4 x5
3x dx = 3 ·
−2 5 −2
55 (−2)5
=3· −3·
Z 5 5
∞ ∞
3 3 1
dx = ·
2 x4 x3 −3 2
−1 −1
= 3− 3
∞ 2
1 1
=0+ =
8 8
Substitution
Substitution
du
= 2x so du = 2x dx and we get
dx
Z
x=b Z 2
u=b
2x e(x ) dx =
2
eu du
x=a u=a2
u=b2 x=b
= e(x )
u 2
=e
u=a2 x=a
b2 a2
=e −e
Substitution Examples
Z ∞
2
xe−2x dx u = 2x2 du = 4x dx
2
x = 2 u = 2 · 22 = 8
x = ∞ u = 2 · ∞2 = ∞
Z∞
du
= e−u ·
4
8
∞
1 −1 −8
= · (−1) · e−u =0− e
4 8 4
1
= e−8
4
Other Formulas
Z
dx
= ln x + C
x
Z Z
cf (x) dx = c f (x) dx
Z Z Z
f (x) + g(x) dx = f (x) dx + g(x) dx
Z
d
cos x dx = sin x + C because sin x = cos x
dx
Z
d
sin x dx = − cos x + C because cos x = − sin x
dx
Examples
u=x+5 x = 2, u = 2 + 5 = 7
du = dx x = 5, u = 5 + 5 = 10
Z 5 Z 10
3x 3(u − 5)
dx = du
2 (x + 5)2 7 u2
Z 10
3 15
= − du
7 u u2
15 10
= 3 ln u +
u 7
15 15
= 3 ln 10 + − 3 ln 7 +
10 7
Examples
Z π π
(1 + cos t)dt = t + sin t
0 0
= (π + 0) − (0 + 0) = π
Z5 Z0 Z5
|x| dx = −x dx + x dx
−2 −2 0
0 5
−x2 x2 (−2)2 25 29
= + = + =
2 −2 2 0 2 2 2
Zx3
d 3 −5
e5t−5 dt = e5x · 3x2 − e5(−2x)−5 (−2)
dx
−2x
Integration By Parts
Integration By Parts
Example
Z Z
x ex dx = u dv
u=x dv = ex dx
du = dx v = ex
so
Z Z
x ex dx = uv − vdu
Z
x
= xe − ex dx
= xex − ex + C
Logarithms
You can use integration by parts to handle functions whose
derivatives are easier to find than their integrals.
Z Z
ln x dx = u dv
u = ln x dv = dx
dx
du = v=x
x
so
Z Z
ln x dx = uv − vdu
Z
dx
= (ln x)x − x
x
= x ln x − x + C
Logarithms
Z Z
x ln x dx = u dv
u = ln x dv = x dx
dx x2
du = v=
x 2
so
Z Z
xln x dx = uv − vdu
Z 2
x2 x
= ln x − dx
2 2x
x2 x2
= ln x − +C
2 4
Easy to Easy to
Differentiate Integrate
Logs Polynomials Exponentials
Integration by parts
Iterated Parts
Z
x2 e2x dx Let u = x2 dv = e2x dx
1
du = 2x dx v = e2x
Z 2
1 2x
2 1 2x
=x · e − e 2x dx
2 2
Z
1 2 2x
= x e − x e2x dx
2
And to find this, we have to repeat integration by parts.
Tabular integration
Tabular integration is a way to organize our work when doing
repeated integration by parts. To integrate x2 e2x ,
Z
1 1 1
x2 e2x dx = x2 · e2x − 2x · · e2x + 2 · e2x − 0
2 4 8
Example
Z ∞
2! 1
x2 e−2x dx = =
0 22+1 4
−b= −2 b=2
a= 2
8x − − 3 e−x/3
8 + 9 e−x/3
0 − 27 e−x/3
Z
So 4x2 e−x/3 dx is
Z∞
a!
and now we plug into xa e−bx =
ba+1
0
" #
2! 1 1
= 4 e−1/3 +2· +
1 3 1 2 1
3 3 3
f (x)
The derivative is the
instantaneous rate of change
x x+h
f (x + h) − f (x)
= lim
h→0 h
f (x + dx) − f (x) df
= =
dx dx
Example
The definition is typically cumbersome to use.
For example,
d 2 (x + h)2 − x2
x = lim
dx h→0 h
x2 + 2xh + h2 − x2
= lim
h→0 h
2xh + h2
= lim
h→0 h
= lim (2x + h)
h→0
= 2x
Basic Formulas
d
f (x) = f 0 (x)
dx
d
a = 0 for any constant a
dx
d n
x = nxn−1
dx
d 1
[ln(x)] =
dx x
d x
e = ex
dx
d
[f (x) + g(x)] = f 0 (x) + g 0 (x)
dx
d d
[c f (x)] = c f (x) = cf 0 (x)
dx dx
d 3
x = 3x2
dx
d 2
3y = 3 · 2y 1 = 6y
dy
d
5et + 3t4 = 5et + 3 · 4t3
dt
d 2 d −3
= 2s
ds s3 ds
= −6s−4
−6
= 4
s
Chain Rule
Examples
d n du
u = nun−1
dx dx
d u du
e = eu ·
dx dx
d d
exp −2t + t2 = exp [u]
dt dt
du
= exp [u] ·
dx
= exp −2t + t2 · (−2 + 2t)
d 5 4
2x2 + 5x + 3 = 5 2x2 + 5x + 3 ·(4x + 5)
dx
d
exp 5et − 5 + 3t = exp 5et − 5 + 3t · 5et + 3
dt
Product Rule
What about the derivatives of products or quotients of two
functions?
d dv du
u·v =u· + ·v
dx dx dx
tiny (uv)0 = u · v 0 + u0 · v
dv u · dv
Quotients can be done by
rewriting them as products
v uv du · v
d 1 d 1 1
u· =u· + u0 ·
dx v dx v v
u du −u v 0 u0
= +
v2 v
−uv + u0 v
0
=
v2
d 2 3x
x e = x2 · 3e3x + 2x · e3x
dx
d e−x d −x −3
= e ·x
dx x3 dx
−3 1
= e−x · 4 + (−e−x ) · 3
x x
d h 3 i 3 d 4x
x2 + 3x + 5 · e4x = x2 + 3x + 5 · e
dx dx
d h 2 3 i 4x
+ x + 3x + 5 ·e
dx
3
= x2 + 3x + 5 · 4e4x
+ 3 · (x2 + 3x + 5)2 · (2x + 3) · e4x
Absolute Values
y
|x| |x| = x if x ≥ 0
|x| = −x if x < 0
(
d 1 x>0
|x| =
x dx −1 x<0
d|x|
Note that is
dx
undefined if x = 0.
cos(x) d
cos(x) = − sin(x)
dx
x
sin(x)
x d
sin(x) = cos(x)
dx
Further Examples
d 2x + 5 (−1)(2x − 3) 2
= (2x + 5) +
dx x2 − 3x + 4 (x2 − 3x + 4)2 x2 − 3x + 4
d 2 2 2
(x + 2)ex −5x = (x + 2)(2x − 5)ex −5x + 1 · ex −5x
dx
d 2 −3x2 2 2
x e = x2 (−6x)e−3x + 2x · e−3x
dx
Further Examples
d d
sin |x + 2| = sin(x + 2) if x + 2 > 0
dx dx
= cos(x + 2) x > −2
d d
sin |x + 2| = sin(−x − 2) if x + 2 < 0
dx dx
= − cos(−x − 2) x < −2
Definition of an Integral
f (x)
(x, f (x))
x
a x x + dx b
Zb
f (x) dx = area under curve
a
In some sense, f (x) dx is the area of an infinitely thin rectangle
and the integral says that the area under the curve is the sum
of the areas of infinitely many of these thin rectangles.
B.0 One Dimensional Calculus B.0.2 1-Dimensional integrals 16 / 42
167
B.0.2 Integration Exam P Handouts – Page 168
Geometric Examples
Often we can use geometry to find the integral/area under the
curve.
f (x) f (x)
x x
a a
Z a Z a
a2
2dx = 2a xdx =
0 0 2
Geometric Examples
In that example,
1. The integral of a constant was a linear function.
2. The integral of a line was a quadratic function.
So in these two examples, when we integrated the power of a
polynomial increased by 1.
When we differentiate,
1. The derivative of a linear function is a constant.
2. The derivative of a quadratic function is linear.
More generally, when we differentiate the power of a polynomial
decreases by 1. That is the opposite of when we integrate.
t
a x x+h
R
x+h Rx
Zx f (t) dt − f (t) dt
d d a a
F (x) = f (t) dt = lim
dx dx h→0 h
a
f (x) · h
= lim = f (x)
h→0 h
Zx
d
f (t) dx = f (x)
dx
a
Evaluating Integrals
The Fundamental Theorem of Calculus says that derivatives
and integrals are inverse operations. To find the integral of
f (x), we need to find a function whose derivative is f (x).
Examples
Z 5 5
1 52 02 25
x dx = x2 = − =
0 2 0 2 2 2
Zb b
n 1
x dx = · xn+1
n+1 a
a
bn+1 an+1
= −
n+1 n+1
Common Formulas
Z
a dx = ax + C
Z
x2
x dx = +C
2
Z
n xn+1
x dx = + C for n 6= −1
n+1
Z
1
ebx dx = ebx + C
b
Z Z
ax dx = ex ln a dx
1 x
= a +C
ln a
Examples
Z 5 5
4 x5
3x dx = 3 ·
−2 5 −2
55 (−2)5
=3· −3·
Z 5 5
∞ ∞
3 3 1
dx = ·
2 x4 x3 −3 2
−1 −1
= 3− 3
∞ 2
1 1
=0+ =
8 8
Substitution
Substitution
du
= 2x so du = 2x dx and we get
dx
Z
x=b Z 2
u=b
2x e(x ) dx =
2
eu du
x=a u=a2
u=b2 x=b
= e(x )
u 2
=e
u=a2 x=a
b2 a2
=e −e
Substitution Examples
Z ∞
2
xe−2x dx u = 2x2 du = 4x dx
2
x = 2 u = 2 · 22 = 8
x = ∞ u = 2 · ∞2 = ∞
Z∞
du
= e−u ·
4
8
∞
1 −1 −8
= · (−1) · e−u =0− e
4 8 4
1
= e−8
4
Other Formulas
Z
dx
= ln x + C
x
Z Z
cf (x) dx = c f (x) dx
Z Z Z
f (x) + g(x) dx = f (x) dx + g(x) dx
Z
d
cos x dx = sin x + C because sin x = cos x
dx
Z
d
sin x dx = − cos x + C because cos x = − sin x
dx
Examples
u=x+5 x = 2, u = 2 + 5 = 7
du = dx x = 5, u = 5 + 5 = 10
Z 5 Z 10
3x 3(u − 5)
dx = du
2 (x + 5)2 7 u2
Z 10
3 15
= − du
7 u u2
15 10
= 3 ln u +
u 7
15 15
= 3 ln 10 + − 3 ln 7 +
10 7
Examples
Z π π
(1 + cos t)dt = t + sin t
0 0
= (π + 0) − (0 + 0) = π
Z5 Z0 Z5
|x| dx = −x dx + x dx
−2 −2 0
0 5
−x2 x2 (−2)2 25 29
= + = + =
2 −2 2 0 2 2 2
Zx3
d 3 −5
e5t−5 dt = e5x · 3x2 − e5(−2x)−5 (−2)
dx
−2x
Integration By Parts
Integration By Parts
Example
Z Z
x ex dx = u dv
u=x dv = ex dx
du = dx v = ex
so
Z Z
x ex dx = uv − vdu
Z
x
= xe − ex dx
= xex − ex + C
Logarithms
You can use integration by parts to handle functions whose
derivatives are easier to find than their integrals.
Z Z
ln x dx = u dv
u = ln x dv = dx
dx
du = v=x
x
so
Z Z
ln x dx = uv − vdu
Z
dx
= (ln x)x − x
x
= x ln x − x + C
Logarithms
Z Z
x ln x dx = u dv
u = ln x dv = x dx
dx x2
du = v=
x 2
so
Z Z
xln x dx = uv − vdu
Z 2
x2 x
= ln x − dx
2 2x
x2 x2
= ln x − +C
2 4
Easy to Easy to
Differentiate Integrate
Logs Polynomials Exponentials
Integration by parts
Iterated Parts
Z
x2 e2x dx Let u = x2 dv = e2x dx
1
du = 2x dx v = e2x
Z 2
1 2x
2 1 2x
=x · e − e 2x dx
2 2
Z
1 2 2x
= x e − x e2x dx
2
And to find this, we have to repeat integration by parts.
Tabular integration
Tabular integration is a way to organize our work when doing
repeated integration by parts. To integrate x2 e2x ,
Z
1 1 1
x2 e2x dx = x2 · e2x − 2x · · e2x + 2 · e2x − 0
2 4 8
Example
Z ∞
2! 1
x2 e−2x dx = =
0 22+1 4
−b= −2 b=2
a= 2
8x − − 3 e−x/3
8 + 9 e−x/3
0 − 27 e−x/3
Z
So 4x2 e−x/3 dx is
Z∞
a!
and now we plug into xa e−bx =
ba+1
0
" #
2! 1 1
= 4 e−1/3 +2· +
1 3 1 2 1
3 3 3
f (x)
The derivative is the
instantaneous rate of change
x x+h
f (x + h) − f (x)
= lim
h→0 h
f (x + dx) − f (x) df
= =
dx dx
Example
The definition is typically cumbersome to use.
For example,
d 2 (x + h)2 − x2
x = lim
dx h→0 h
x2 + 2xh + h2 − x2
= lim
h→0 h
2xh + h2
= lim
h→0 h
= lim (2x + h)
h→0
= 2x
Basic Formulas
d
f (x) = f 0 (x)
dx
d
a = 0 for any constant a
dx
d n
x = nxn−1
dx
d 1
[ln(x)] =
dx x
d x
e = ex
dx
d
[f (x) + g(x)] = f 0 (x) + g 0 (x)
dx
d d
[c f (x)] = c f (x) = cf 0 (x)
dx dx
d 3
x = 3x2
dx
d 2
3y = 3 · 2y 1 = 6y
dy
d
5et + 3t4 = 5et + 3 · 4t3
dt
d 2 d −3
= 2s
ds s3 ds
= −6s−4
−6
= 4
s
Chain Rule
Examples
d n du
u = nun−1
dx dx
d u du
e = eu ·
dx dx
d d
exp −2t + t2 = exp [u]
dt dt
du
= exp [u] ·
dx
= exp −2t + t2 · (−2 + 2t)
d 5 4
2x2 + 5x + 3 = 5 2x2 + 5x + 3 ·(4x + 5)
dx
d
exp 5et − 5 + 3t = exp 5et − 5 + 3t · 5et + 3
dt
Product Rule
What about the derivatives of products or quotients of two
functions?
d dv du
u·v =u· + ·v
dx dx dx
tiny (uv)0 = u · v 0 + u0 · v
dv u · dv
Quotients can be done by
rewriting them as products
v uv du · v
d 1 d 1 1
u· =u· + u0 ·
dx v dx v v
u du −u v 0 u0
= +
v2 v
−uv + u0 v
0
=
v2
d 2 3x
x e = x2 · 3e3x + 2x · e3x
dx
d e−x d −x −3
= e ·x
dx x3 dx
−3 1
= e−x · 4 + (−e−x ) · 3
x x
d h 3 i 3 d 4x
x2 + 3x + 5 · e4x = x2 + 3x + 5 · e
dx dx
d h 2 3 i 4x
+ x + 3x + 5 ·e
dx
3
= x2 + 3x + 5 · 4e4x
+ 3 · (x2 + 3x + 5)2 · (2x + 3) · e4x
Absolute Values
y
|x| |x| = x if x ≥ 0
|x| = −x if x < 0
(
d 1 x>0
|x| =
x dx −1 x<0
d|x|
Note that is
dx
undefined if x = 0.
cos(x) d
cos(x) = − sin(x)
dx
x
sin(x)
x d
sin(x) = cos(x)
dx
Further Examples
d 2x + 5 (−1)(2x − 3) 2
= (2x + 5) +
dx x2 − 3x + 4 (x2 − 3x + 4)2 x2 − 3x + 4
d 2 2 2
(x + 2)ex −5x = (x + 2)(2x − 5)ex −5x + 1 · ex −5x
dx
d 2 −3x2 2 2
x e = x2 (−6x)e−3x + 2x · e−3x
dx
Further Examples
d d
sin |x + 2| = sin(x + 2) if x + 2 > 0
dx dx
= cos(x + 2) x > −2
d d
sin |x + 2| = sin(−x − 2) if x + 2 < 0
dx dx
= − cos(−x − 2) x < −2
Definition of an Integral
f (x)
(x, f (x))
x
a x x + dx b
Zb
f (x) dx = area under curve
a
In some sense, f (x) dx is the area of an infinitely thin rectangle
and the integral says that the area under the curve is the sum
of the areas of infinitely many of these thin rectangles.
B.0 One Dimensional Calculus B.0.2 1-Dimensional integrals 16 / 42
188
B.0.3 Integration by Parts Exam P Handouts – Page 189
Geometric Examples
Often we can use geometry to find the integral/area under the
curve.
f (x) f (x)
x x
a a
Z a Z a
a2
2dx = 2a xdx =
0 0 2
Geometric Examples
In that example,
1. The integral of a constant was a linear function.
2. The integral of a line was a quadratic function.
So in these two examples, when we integrated the power of a
polynomial increased by 1.
When we differentiate,
1. The derivative of a linear function is a constant.
2. The derivative of a quadratic function is linear.
More generally, when we differentiate the power of a polynomial
decreases by 1. That is the opposite of when we integrate.
t
a x x+h
R
x+h Rx
Zx f (t) dt − f (t) dt
d d a a
F (x) = f (t) dt = lim
dx dx h→0 h
a
f (x) · h
= lim = f (x)
h→0 h
Zx
d
f (t) dx = f (x)
dx
a
Evaluating Integrals
The Fundamental Theorem of Calculus says that derivatives
and integrals are inverse operations. To find the integral of
f (x), we need to find a function whose derivative is f (x).
Examples
Z 5 5
1 52 02 25
x dx = x2 = − =
0 2 0 2 2 2
Zb b
n 1
x dx = · xn+1
n+1 a
a
bn+1 an+1
= −
n+1 n+1
Common Formulas
Z
a dx = ax + C
Z
x2
x dx = +C
2
Z
n xn+1
x dx = + C for n 6= −1
n+1
Z
1
ebx dx = ebx + C
b
Z Z
ax dx = ex ln a dx
1 x
= a +C
ln a
Examples
Z 5 5
4 x5
3x dx = 3 ·
−2 5 −2
55 (−2)5
=3· −3·
Z 5 5
∞ ∞
3 3 1
dx = ·
2 x4 x3 −3 2
−1 −1
= 3− 3
∞ 2
1 1
=0+ =
8 8
Substitution
Substitution
du
= 2x so du = 2x dx and we get
dx
Z
x=b Z 2
u=b
2x e(x ) dx =
2
eu du
x=a u=a2
u=b2 x=b
= e(x )
u 2
=e
u=a2 x=a
b2 a2
=e −e
Substitution Examples
Z ∞
2
xe−2x dx u = 2x2 du = 4x dx
2
x = 2 u = 2 · 22 = 8
x = ∞ u = 2 · ∞2 = ∞
Z∞
du
= e−u ·
4
8
∞
1 −1 −8
= · (−1) · e−u =0− e
4 8 4
1
= e−8
4
Other Formulas
Z
dx
= ln x + C
x
Z Z
cf (x) dx = c f (x) dx
Z Z Z
f (x) + g(x) dx = f (x) dx + g(x) dx
Z
d
cos x dx = sin x + C because sin x = cos x
dx
Z
d
sin x dx = − cos x + C because cos x = − sin x
dx
Examples
u=x+5 x = 2, u = 2 + 5 = 7
du = dx x = 5, u = 5 + 5 = 10
Z 5 Z 10
3x 3(u − 5)
dx = du
2 (x + 5)2 7 u2
Z 10
3 15
= − du
7 u u2
15 10
= 3 ln u +
u 7
15 15
= 3 ln 10 + − 3 ln 7 +
10 7
Examples
Z π π
(1 + cos t)dt = t + sin t
0 0
= (π + 0) − (0 + 0) = π
Z5 Z0 Z5
|x| dx = −x dx + x dx
−2 −2 0
0 5
−x2 x2 (−2)2 25 29
= + = + =
2 −2 2 0 2 2 2
Zx3
d 3 −5
e5t−5 dt = e5x · 3x2 − e5(−2x)−5 (−2)
dx
−2x
Integration By Parts
Integration By Parts
Example
Z Z
x ex dx = u dv
u=x dv = ex dx
du = dx v = ex
so
Z Z
x ex dx = uv − vdu
Z
x
= xe − ex dx
= xex − ex + C
Logarithms
You can use integration by parts to handle functions whose
derivatives are easier to find than their integrals.
Z Z
ln x dx = u dv
u = ln x dv = dx
dx
du = v=x
x
so
Z Z
ln x dx = uv − vdu
Z
dx
= (ln x)x − x
x
= x ln x − x + C
Logarithms
Z Z
x ln x dx = u dv
u = ln x dv = x dx
dx x2
du = v=
x 2
so
Z Z
xln x dx = uv − vdu
Z 2
x2 x
= ln x − dx
2 2x
x2 x2
= ln x − +C
2 4
Easy to Easy to
Differentiate Integrate
Logs Polynomials Exponentials
Integration by parts
Iterated Parts
Z
x2 e2x dx Let u = x2 dv = e2x dx
1
du = 2x dx v = e2x
Z 2
1 2x
2 1 2x
=x · e − e 2x dx
2 2
Z
1 2 2x
= x e − x e2x dx
2
And to find this, we have to repeat integration by parts.
Tabular integration
Tabular integration is a way to organize our work when doing
repeated integration by parts. To integrate x2 e2x ,
Z
1 1 1
x2 e2x dx = x2 · e2x − 2x · · e2x + 2 · e2x − 0
2 4 8
Example
Z ∞
2! 1
x2 e−2x dx = =
0 22+1 4
−b= −2 b=2
a= 2
8x − − 3 e−x/3
8 + 9 e−x/3
0 − 27 e−x/3
Z
So 4x2 e−x/3 dx is
Z∞
a!
and now we plug into xa e−bx =
ba+1
0
" #
2! 1 1
= 4 e−1/3 +2· +
1 3 1 2 1
3 3 3
Discrete vs Continuous
Mixed Distributions
Exercises
Comparing Uniforms 2
Let N be an integer uniformly chosen from {1, 2, . . . , 100} and let X be a real number
uniformly chosen from (0, 100). Then
1
P[N = n] = n = 1, 2, 3, . . . , 100
100
n
P[N ≤ n] = n = 1, 2, 3, . . . , 100
100
P[X = x] = 0 for all x for a purely continuous function, and so we’ll need a slightly
different idea.
202
B.1.1 Continuous Distributions: Overview Exam P Handouts – Page 203
Discrete vs Continuous 3
For discrete random variables, we often summed expressions that involved P[X = x],
such as X
E[X ] = x · P[X = x]
In the continuous case, the sums will become integrals and the “density” of X ,
denoted f (x), will replace P[X = x] in most formulas. For example,
Z
E[X ] = x · f (x)dx
Mixed Distributions 4
On the exam, mixed distributions often come from adding deductibles and limits to
continuous loss amounts.
203
B.1.1 Continuous Distributions: Overview Exam P Handouts – Page 204
Mixed Example 5
Losses X are uniformly distributed on (0, 100). Let Y be the payment amount after a
deductible of 30 is applied to the loss.
The deductible of 30 means that Y = 0 if the loss X is less than 30, and Y = X − 30
if the loss exceeds 30. That means that
30
P[Y = 0] = P[X ≤ 30] =
100
P[Y = y ] = 0 for y > 0
y + 30
P[Y ≤ y ] = P[X ≤ y + 30] = for 0 < y < 70
100
so Y has a discrete piece (at 0), a continuous piece (from 0 to 70), and the cdf makes
sense everywhere so we can still use it to study Y .
Exercise 1 6
If N is uniform on {1, 2, 3, 4, 5}, and X is uniform on (0, 5), find P[N ≤ 2.3] and
P[X ≤ 2.3].
204
B.1.1 Continuous Distributions: Overview Exam P Handouts – Page 205
Exercise 1 6
If N is uniform on {1, 2, 3, 4, 5}, and X is uniform on (0, 5), find P[N ≤ 2.3] and
P[X ≤ 2.3].
Exercise 2 7
Loss amounts are uniform on the interval (0, 6), and insured with a deductible of 1.6.
Find the probabilities that:
a) the payment for a randomly chosen loss is 0
b) the payment for a randomly chosen loss is less than 2.
205
B.1.1 Continuous Distributions: Overview Exam P Handouts – Page 206
Exercise 2 7
Loss amounts are uniform on the interval (0, 6), and insured with a deductible of 1.6.
Find the probabilities that:
a) the payment for a randomly chosen loss is 0
b) the payment for a randomly chosen loss is less than 2.
Let X denote the amount of a randomly chosen loss, and Y the corresponding
payment.
1.6
P[Y = 0] = P[X ≤ 1.6] =
6.0
P[Y ≤ 2] = P[X ≤ 2 + 1.6]
3.6
= P[X ≤ 3.6] =
6.0
206
B.1.2 Densities and CDFs Exam P Handouts – Page 207
Definitions: CDF 2
This applies to all random variables, whether they have discrete, continuous, or mixed
distributions.
207
B.1.2 Densities and CDFs Exam P Handouts – Page 208
Definitions: Density 3
d
f (x) = F (x)
dx
Z x
The cdf is then F (x) = f (y )dy
−∞
X
For discrete X , F (x) = P[X ≤ x] = P[X = y ]
y ≤x
208
B.1.2 Densities and CDFs Exam P Handouts – Page 209
Properties of Densities 5
Example 6
Continuous Uniform
Suppose that X is uniform on (0, 0.1). What are F (x) and f (x)?
0x
x <0
F (x) = = 10x 0 ≤ x ≤ 0.1
0.1
1 0.1 < x
0 x <0
f (x) = 10 0 < x < 0.1
0 0.1 < x
209
B.1.2 Densities and CDFs Exam P Handouts – Page 210
On the exam, continuous distributions will usually only have one point x such that
F (x) = k%. In that case the k-th percentile is uniquely defined and we say that x is
the k-th percentile.
Exercise 1 8
210
B.1.2 Densities and CDFs Exam P Handouts – Page 211
Exercise 1 8
Exercise 2 9
A continuous random variable Y has density f (y ) = 2/y 3 for 1 < y < ∞ and f (y ) = 0
otherwise. Find a formula for the CDF F (y ), and find P[Y ≤ 4 | Y > 2].
211
B.1.2 Densities and CDFs Exam P Handouts – Page 212
Exercise 2 9
A continuous random variable Y has density f (y ) = 2/y 3 for 1 < y < ∞ and f (y ) = 0
otherwise. Find a formula for the CDF F (y ), and find P[Y ≤ 4 | Y > 2].
Key point: The CDF is the definite integral, not any arbitrary anti-derivative. f (y ) = 0
for y < 1, so we can start our integral at 1. More precisely, for y > 1,
Z y Z 1 Z y
2
F (y ) = f (t) dt = 0 dt + 3
dt
−∞ −∞ 1 t
Z y
2 −1 y −1 −1 1
= 3
dt = = − = 1 −
1 t t2 1 y2 12 y2
212
B.1.3 Mixed Distributions Exam P Handouts – Page 213
Mixed distributions 1
Remarks:
• Payment always refers to payment made by insurer
• The premium is paid by insured to insurer
• Exam P study note only covers payment limits, other types are on later exams
213
B.1.3 Mixed Distributions Exam P Handouts – Page 214
Deductible example 3
Suppose that loss amounts X have density f (x) = 0.02x, 0 < x < 10. If there is a
deductible of 2 and a maximum payment of 6, then what is the probability of a
payment of 5 or less? What is the probability of a payment of 6?
P[Payment ≤ 5] = P[X ≤ 5 + 2]
Z 7
= 0.02x dx
0
= 0.01 · 72 = 0.49
A Possibility of No Loss 4
Losses, if they occur, are uniformly distributed on the interval (100, 500)
If there is a 60% probability of no loss and a 40% probability of exactly one loss, what
is the cdf of the total loss amount?
P[L ≤ 33] = P[L = 0] = 0.6. In fact, P[L ≤ `] = 0.6 for all ` < 100
0 `<0
0.6 0 ≤ ` < 100
FL (`) =
?? 100 ≤ ` < 500
1 ` ≥ 500
214
B.1.3 Mixed Distributions Exam P Handouts – Page 215
A Possibility of No Loss 5
0 100 500
A Possibility of No Loss 6
F (l)
1
0.6
P[L = 0] = 0.6
`
100 500
215
B.1.3 Mixed Distributions Exam P Handouts – Page 216
Z ∞
If X is purely continuous, then f (x) dx = 1, and F (x) is continuous.
−∞
If F (x) is defined piecewise, it may not be continuous and we may have a mixed
distribution.
There is no jump at 1 even though it is the endpoint of a case because formula for
F (x) leading up to 1 matches F (1).
216
B.1.3 Mixed Distributions Exam P Handouts – Page 217
Exercise 1 10
An insurance policy pays for a random loss X subject to a deductible of d. The loss
amount is a continuous random variable with density function
(
2x for 0 < x < 1
f (x) =
0 otherwise
For a random loss X , the probability that the insurance payment is less then 0.3 is
equal to 0.49. Find d.
217
B.1.3 Mixed Distributions Exam P Handouts – Page 218
Exercise 1 10
An insurance policy pays for a random loss X subject to a deductible of d. The loss
amount is a continuous random variable with density function
(
2x for 0 < x < 1
f (x) =
0 otherwise
For a random loss X , the probability that the insurance payment is less then 0.3 is
equal to 0.49. Find d.
Exercise 2 11
218
B.1.3 Mixed Distributions Exam P Handouts – Page 219
Exercise 2 11
(1 − 1)2
P[X = 1] = F (1) − lim F (x) = −0=0
x↑1 5
(3 − 1)2 1
P[X = 3] = F (3) − lim F (x) = 1 − =
x↑3 5 5
d d (x − 1)2 2(x − 1)
f (x) = F (x) = = for 1 < x < 3
dx dx 5 5
219
B.2.1 Moments of Continuous Distributions Exam P Handouts – Page 220
Definition
Continuous Example
Exercises
Definition of Moments 2
220
B.2.1 Moments of Continuous Distributions Exam P Handouts – Page 221
Definition of Moments 3
turns into
Z
E[g (X )] = g (x) · f (x)dx
x
In particular,
Example 4
A random variable X has density 3x 2 for 0 < x < 1. Find its mean and variance.
Z 1
E[X ] = x · f (x) dx
0
Z 1 Z 1
2
= x · 3x dx = 3x 3 dx
0 0
1
3 4
= x
4 0
3
=
4
221
B.2.1 Moments of Continuous Distributions Exam P Handouts – Page 222
Example: Variance 5
Exercise 1 6
If Y has density f (y ) = 1 − 0.5y for 0 < y < 2, and f (y ) = 0 otherwise, find E[Y ].
222
B.2.1 Moments of Continuous Distributions Exam P Handouts – Page 223
Exercise 1 6
If Y has density f (y ) = 1 − 0.5y for 0 < y < 2, and f (y ) = 0 otherwise, find E[Y ].
Z 2
E[Y ] = y f (y ) dy
0
Z 2
= y (1 − 0.5y ) dy
0
Z 2
= y − 0.5y 2 dy
0
2
y2
0.5y 3
= −
2 3 0
4 2
=2− =
3 3
Exercise 2 7
If Y has density f (y ) = 1 − 0.5y for 0 < y < 2, and f (y ) = 0 otherwise, find Var[Y ].
223
B.2.1 Moments of Continuous Distributions Exam P Handouts – Page 224
Exercise 2 7
If Y has density f (y ) = 1 − 0.5y for 0 < y < 2, and f (y ) = 0 otherwise, find Var[Y ].
2
E[Y ] = from before
3
Z 2 Z 2
2 2
E[Y ] = y f (y ) dy = y 2 (1 − 0.5y ) dy
0 0
Z 2
= y 2 − 0.5y 3 dy
0
2
y3
y4
= −
3 8 0
8 16 2
= − =
3 8 3
2
2 2 2 2 2
Var[Y ] = E[Y ] − (E[Y ]) = − =
3 3 9
224
B.2.2 Moments of Mixed Distributions Exam P Handouts – Page 225
Mixed distributions 2
X
For discrete variables, E[X ] = x · P[X = x]
x Z
For purely continuous variables, E[X ] = x · f (x) dx
225
B.2.2 Moments of Mixed Distributions Exam P Handouts – Page 226
Example 3
F (x)
Example: Mean 4
226
B.2.2 Moments of Mixed Distributions Exam P Handouts – Page 227
Example: Variance 5
Exercise 1 6
Suppose that X is a mixed random variable such that P[X = 3] = 0.5 and X has
density f (x) = x for 0 < x < 1, and 0 otherwise. Find E[X ].
227
B.2.2 Moments of Mixed Distributions Exam P Handouts – Page 228
Exercise 1 6
Suppose that X is a mixed random variable such that P[X = 3] = 0.5 and X has
density f (x) = x for 0 < x < 1, and 0 otherwise. Find E[X ].
Z 1
E[X ] = 3 · P[X = 3] + x f (x) dx
0
Z 1
= 3 · 0.5 + x · x dx
0
1
3 x3
= +
2 3 0
3 1
= +
2 3
11
=
6
Exercise 2 7
Suppose that X is a mixed random variable such that P[X = 3] = 0.5 and X has
density f (x) = x for 0 < x < 1, and 0 otherwise. Find E[X 2 ].
228
B.2.2 Moments of Mixed Distributions Exam P Handouts – Page 229
Exercise 2 7
Suppose that X is a mixed random variable such that P[X = 3] = 0.5 and X has
density f (x) = x for 0 < x < 1, and 0 otherwise. Find E[X 2 ].
Z 1
2 2
E[X ] = 3 · P[X = 3] + x 2 · f (x) dx
0
Z 1
9
= + x 3 dx
2 0
1
9 x4
= +
2 4 0
9 1
= +
2 4
19
=
4
229
B.2.3 The Survival Function Approach Exam P Handouts – Page 230
u=x dv = f (x) dx
du = dx v = F (x)−1
Z ∞ Z ∞
∞
E(X ) = x · f (x) dx = uv + (−v )du
0 0 0
at 0, uv = 0 · [F (0) − 1] = 0
at ∞, v = F (∞) − 1 = 1 − 1 = 0, uv = 0
Z ∞ Z ∞
E(X ) = 0 + [1 − F (x)] dx = P[X > x]dx
0 0
230
B.2.3 The Survival Function Approach Exam P Handouts – Page 231
This actually holds for all non-negative random variables, including discrete and mixed
distributions. For discrete distributions,
Z n+1
P[X > x]dx = P[X > n]
n
Z ∞ ∞
X
P[X > x]dx = P[X > n]
0 n=0
231
B.2.3 The Survival Function Approach Exam P Handouts – Page 232
Disadvantages:
• Because the integral starts at 0, it sometimes will be messier.
• If f (x) is directly given, finding P[X > x] can require an extra step.
Example Revisited 6
232
B.2.3 The Survival Function Approach Exam P Handouts – Page 233
Example: Variance 7
Z ∞ Z ∞
2
d 2
E X = (x ) · P[X > x]dx = 2x · [1 − F (x)]dx
0 dx 0
Z 1 Z 2 Z ∞
2x − x 2
= 2x · 1 dx + 2x · dx + 0 dx
0 1 2 2
Z 1 Z 2
= 2x dx + (2x 2 − x 3 ) dx
0 1
1 3
4
2
2x x
= x2 + −
0 3 4 1
2 · 8 16 2 1 23
= (1 − 0) + − − − =
3 4 3 4 12
2
23 4 5
Var(X ) = − =
12 3 36
Example 8
3 · 1003
Suppose X has density f (x) = for 0 < x < ∞ and 0 otherwise. Find E[X ].
(x + 100)4
We have 3 possible approaches:
Z∞
x · 3 · 1003
1. Find dx using u-substitution with u = x + 100
(x + 100)4
0
Z∞
x · 3 · 1003
2. Find dx using integration by parts
(x + 100)4
0
3. Use the survival method
Remark: The last two approaches are mathematically identical. The survival method is
just automating the integration by parts.
233
B.2.3 The Survival Function Approach Exam P Handouts – Page 234
Survival Approach 9
3 · 1003
f (x) =
(x + 100)4
Z ∞
3 · 1003
P[X > x] = dt
x (t + 100)4
−1003 ∞ 1003
= =
(t + 100)3 x (x + 100)3
Z ∞
1003
E[X ] = dx
0 (x + 100)3
∞
−1 1003
=
2 (x + 100)2 0
1003
= = 50
2 · 1002
Exercise 1 10
234
B.2.3 The Survival Function Approach Exam P Handouts – Page 235
Exercise 1 10
Z ∞ Z ∞
E[X ] = P[X > x] dx = [1 − F (x)] dx
0 0
Z 100 Z ∞
1003
= (1 − 0)dx + 1− 1− 3 dx
0 100 x
Z ∞
1003
= 100 + 3
dx
100 x
−1 1003 ∞
= 100 + = 150
2 x 2 100
Exercise 2 11
235
B.2.3 The Survival Function Approach Exam P Handouts – Page 236
Exercise 2 11
3 · 1003
f (x) = , x > 100
x4
Z ∞ Z ∞
3 · 1003 3 · 1003
E[X ] = x· dx = dx
100 x4 100 x3
−1 3 · 1003 ∞
= · = 150
2 x2 100
236
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 237
Definitions
CDF and Density
Mean and Variance
Exercises
Continuous Uniforms 2
0 10
A
length of A
P[X ∈ A] =
total length
for 0 < x < 10 can find the CDF and thus density by
x
P[X ≤ x] = F (x) =
10
d 1 1
f (x) = F (x) = =
dx 10 total length
237
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 238
If X is uniform on (a, b)
X
a b
1 x −a
f (x) = F (x) =
b−a b−a
If X ∼ uniform (0, 1)
1
f (x) = =1
1−0
Z 1 1
1 1
E[X ] = x · 1 dx = x 2 =
0 2 0 2
Z 1 1
2 x3 1
E X = x 2 · 1 dx = =
0 3 0 3
2 2
Var[X ] = E[X ] − (E[X ])
1 1 1
= − =
3 4 12
238
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 239
General Mean 5
If X ∼ Uniform(a, b)
X − a ∼ Uniform(0, b − a)
X −a
∼ Uniform(0, 1)
b − a
X −a 1
E =
b−a 2
1 1
(E[X ] − a) =
b−a 2
b−a b+a
E[X ] = +a=
2 2
i.e., mean = average of endpoints.
General variance 6
239
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 240
Discrete vs Uniform 7
a+b
E[X ] = = Average of endpoints
2
(b − a)2 (Length of Interval)2
Var[X ] = =
12 12
while for a discrete uniform on a, a + 1, . . . , b
a+b
E[X ] = = Average of endpoints
2
(Number of Possible Values)2 − 1
Var[X ] =
12
Exercise 1 8
If N is uniform on {7, 8, 9, 10, 11, 12, 13}, find the mean and variance of N.
240
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 241
Exercise 1 8
If N is uniform on {7, 8, 9, 10, 11, 12, 13}, find the mean and variance of N.
The key point is that the set of possible values is explicitly listed out as finite, so we
have a discrete uniform.
7 + 13
E[N] = = 10
2
(# possible values)2 − 1
Var[N] =
12
2
7 −1
= =4
12
Exercise 2 9
241
B.3.1 Continuous Uniform - Basics Exam P Handouts – Page 242
Exercise 2 9
242
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 243
a+b
E[X ] = = Average of endpoints
2
(b − a)2 (Length of Interval)2
Var[X ] = =
12 12
while for a discrete uniform on a, a + 1, . . . , b
a+b
E[X ] = = Average of endpoints
2
(Number of Possible Values)2 − 1
Var[X ] =
12
But exam questions won’t just involve a simple uniform distribution and instead will
modify it somehow.
243
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 244
Key idea: Raw moments (eg. mean, 2nd moment) can be broken up into pieces.
Danger: Variance cannot be broken up into cases without an extra correction term.
X
E[X ] = x · P[X = x]
x
and from the law of total probability: if A1 , A2 . . . is a list of all possible cases
X
E[X ] = E[X | X ∈ Ai ] · P[X ∈ Ai ]
all Ai
X
2
E[X ] = E[X 2 | X ∈ Ai ] · P[X ∈ Ai ]
all Ai
X
E[g (X )] = E[g (X ) | X ∈ Ai ] · P[X ∈ Ai ]
all Ai
Example 1 4
Losses are insured with a deductible. At what level must a deductible be set in order
for the expected payment to be 40% of what it would be with no deductible?
X ∼ U(0, 100)
d = deductible
Y = Payment after deductible
(
0 if X ≤ d
Y =
X − d if X > d
0 + 100
E[X ] = = 50
2
and we need d such that E[Y ] = 0.4 · 50 = 20
244
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 245
The slower approach is to use calculus and set up the relevant integral for E[Y ]:
P[Y ≤ y ] = P[X ≤ y + d]
y +d
=
100
1
fY (y ) = for y > 0
100
Z
100−d
1
E[Y ] = 0 · P[Y = 0] + y· dy
100
0
100−d
y2 1 (100 − d)2
= · =
2 100 0 200
245
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 246
Example 2 7
A homeowner insures their home against storm damage with an insurance policy with a
deductible of 50 florins. In the event of storm damage, repair costs are modeled by a
uniform random variable on the interval (0, 300).
Find the standard deviation of the insurance payment in the event that the home
receives storm damage.
X = loss, Y = payment
if X ≤ 50, Y = 0
if X > 50, Y ∼ U(50 − 50, 300 − 50) = U(0, 250)
Example 2 Solution 8
0 + 250
E[Y ] = 0 · P[X ≤ 50] + · P[X > 50]
2
300 − 50 5
= 0 + 125 · = 125 · = 104.17
2 2 300 6
E Y = E Y | X ≤ 50 · P[X ≤ 50] + E Y 2 | X > 50 · P[X > 50]
5
= 0 + · E[U 2 , U ∼ Uniform(0, 250)]
6
for any random variable U, E[U 2 ] = Var[U] + (E[U])2
" 2 #
5 250 2 250
= · + = 17,361
6 12 2
Var[Y ] = 17,361 − 104.172 = 6,510
SD[Y ] = 80.7
246
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 247
Exercise 1 9
Loss amounts are uniform on (0, 20), and insured with a deductible of 3 and a payment
limit of 12. Find the expected payment amount on a randomly selected loss.
Exercise 1 9
Loss amounts are uniform on (0, 20), and insured with a deductible of 3 and a payment
limit of 12. Find the expected payment amount on a randomly selected loss.
247
B.3.2 Continuous Uniform - Exam Concepts Exam P Handouts – Page 248
Exercise 2 10
Loss amounts are uniform on (0, 20), and insured with a deductible of 3 and a payment
limit of 12. Find the variance of the payment for a randomly selected loss.
Exercise 2 10
Loss amounts are uniform on (0, 20), and insured with a deductible of 3 and a payment
limit of 12. Find the variance of the payment for a randomly selected loss.
Again let X denote the loss and Y the payment. We already know E[Y ] = 6.6, so
finding the 2nd moment will give us the variance.
E[Y 2 | 3 < X ≤ 15] = E[U 2 , U ∼ Unif.(0, 12)] = Var[U] + (E[U])2
(12 − 0)2 0 + 12 2
= + = 12 + 36 = 48
12 2
E[Y 2 ] = E[Y 2 | X ≤ 3] · P[X ≤ 3] + E[Y 2 | 3 < X ≤ 15] · P[3 < X ≤ 15]
+ E[Y 2 | 15 < X ] · P[15 < X ]
3 15 − 3 20 − 15
=0· + 48 · + 122 ·
20 20 20
= 0 + 48 · 0.6 + 144 · 0.25 = 64.8
Var[Y ] = E[Y 2 ] − (E[Y ])2 = 64.8 − 6.62 = 21.24
248
B.3.3 Exponential Random Variables Exam P Handouts – Page 249
FX (x) = 1 − e −x/θ
1 − F (x) = e −x/θ
FX (x) = 1 − e −x/θ = 1 − e −λ x
d 1
f (x) = F (x) = e −x/θ = λ e −λ x for x > 0
dx θ
Exponentials often are used to model waiting times (e.g., time between hits of a web
page, time between rain drops, etc.)
249
B.3.3 Exponential Random Variables Exam P Handouts – Page 250
Mean of an exponential 3
1 −x/θ
f (x) = e F (x) = 1 − e −x/θ for 0 < x < ∞
θ
P[X > x] = 1 − F (x) = e −x/θ = survival function
Z∞ Z∞
E[X ] = x · f (x) dx = P[X > x] dx
0 0
Z∞
E[X ] = e −x/θ dx
0
∞
= −θ e −x/θ
0
−∞ −
= −θ e − θ e −0
=θ
Variance 4
Variance = E X 2 − [E(X )]2
Z∞ Z∞
1
E(X 2 ) = x 2 · f (x)dx = x 2 e −x/θ dx
θ
0 0
250
B.3.3 Exponential Random Variables Exam P Handouts – Page 251
Variance 5
Plugging in:
∞
E(X 2 ) = x 2 − e −x/θ − 2x θe −x/θ + 2 − θ2 e −x/θ
0
= −0 − 0 − 0 − − 0 − 0 − 2θ2 e −0
= 2θ2
Var(X ) = 2 θ2 − θ2
= θ2
You won’t need to rederive this. Just remember Var(X ) = [E(X )]2 for exponentials
Variance of Geometrics 6
We can use this to remember the variance formula for geometrics. Geometrics are the
discrete analog to exponentials, and
1 (1 − p)
If N ∼ Geo{1, 2, 3, . . . } then E[N] = , Var[N] =
p p2
1−p (1 − p)
If N ∼ Geo{0, 1, 2, . . . } then E[N] = , Var[N] =
p p2
For a geometric, instead of Variance = Mean2 we have
Var[Geo.] = E[Geo. starting at 0] · E[Geo. starting at 1]
251
B.3.3 Exponential Random Variables Exam P Handouts – Page 252
Memoryless property 7
Since P[X > x + a | X > a] = P[X > x], we have P[X − a > x | X > a] = P[X > x].
In other words, given that X > a, X − a has the same distribution as the original
variable X . For example, if the time between buses is exponential with mean 15
minutes, the amount of time I need to wait (X − a) is an exponential with mean 15
minutes no matter how long it has been (a minutes) since the last bus.
252
B.3.3 Exponential Random Variables Exam P Handouts – Page 253
Example 9
Loss amounts are exponential with rate 0.02. If losses are insured with a deductible of
10, find the probability of a loss exceeding 40 given that a positive payment is made.
Let X denote the loss amount. X is exponential with mean θ = 1/λ = 1/0.02 = 50.
Note: Exponentials are the only continuous distribution that follow the memoryless
property.
Exercise 1 10
Losses are exponential with mean 50, and are insured with a deductible of 10. Find the
median loss amount given that a positive payment is made.
253
B.3.3 Exponential Random Variables Exam P Handouts – Page 254
Exercise 1 10
Losses are exponential with mean 50, and are insured with a deductible of 10. Find the
median loss amount given that a positive payment is made.
Exercise 2 11
Losses have density f (x) = 0.1e −0.1x for x > 0, and 0 otherwise. If losses are insured
with a deductible of 3, find the expected payment for a randomly selected loss.
254
B.3.3 Exponential Random Variables Exam P Handouts – Page 255
Exercise 2 11
Losses have density f (x) = 0.1e −0.1x for x > 0, and 0 otherwise. If losses are insured
with a deductible of 3, find the expected payment for a randomly selected loss.
Let X denote our loss, and Y the payment. X is exponential with mean 1/0.1 = 10,
and
255
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 256
1 −x/θ
f (x) = ·e for x > 0
θ
Z∞
the 1/θ in front is so f (x) dx = 1
0
When α is an integer, it turns out that a Gamma is the sum of α iid exponentials.
256
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 257
1 x 2 −x/θ
α=3: f (x) = · e
2 θ3
General form: for x > 0, α an integer:
1 x α−1 −x/θ
f (x) = · e
(α − 1)! θα
257
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 258
E[Y ] = α · E[X ] = αθ
Var[Y ] = α · Var[X ] = αθ2
Example 1 6
If X is Gamma distributed with mean 10 and variance 50, find P[X > 10].
E[X ] = αθ = 10
Var[X ] = αθ2 = 50
Var [X ]
=θ=5
E[X ]
10
α= =2
5
10 −10/θ
P[X > 10] = e −10/θ + e
θ
= e −2 + 2e −2
= 0.406
258
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 259
Example 2 7
A company has two electric generators. The time until failure for each generator
follows an exponential distribution with mean 10. The company will begin using the
second generator immediately after the first one fails.
What is the probability that the total time that the generators produce electricity is
less than 30 hours?
X1 ∼ exp(10), X2 ∼ exp(10)
Y = X1 + X2 ∼ Gamma(α = 2, θ = 10)
Want: P[Y ≤ 30]
30
= P Poisson ≥2
10
= 1 − e −3 − 3e −3
= 0.80
Exercise 1 8
A random variable X has density f (x) = 4xe −2x for 0 < x < ∞, and 0 otherwise. Find
the variance of X .
259
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 260
Exercise 1 8
A random variable X has density f (x) = 4xe −2x for 0 < x < ∞, and 0 otherwise. Find
the variance of X .
That makes it a Gamma. We get α from the power, θ from what is in the exponential.
Exercise 2 9
An insured has 3 losses. If loss amounts are independent and exponentially distributed
with mean 5, find the probability that the sum of the 3 losses is no more than 11.2.
260
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 261
Exercise 2 9
An insured has 3 losses. If loss amounts are independent and exponentially distributed
with mean 5, find the probability that the sum of the 3 losses is no more than 11.2.
General α (Optional) 10
x α−1 −x/θ
1
e · for α an integer
θα
(α − 1)!
x α−1
1
· α e −x/θ for general α
Γ(α)
θ
Z ∞
where Γ(α) is the number such that f (x) dx = 1
0
261
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 262
The following is not on the exam syllabus, but may be helpful for remembering the
equations.
0 X1 X1 + X2 X1 + X2 + X3 t
262
B.3.4 Gamma, Exponential, and Poisson Exam P Handouts – Page 263
General Result 14
To complete the proof, you can proceed by induction. We have seen the base case
and integration by parts goes from n to n + 1.
Neither mathematical induction nor Poisson processes are on syllabus, so we will omit
the details.
263
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 264
Syllabus Coverage
Beta
Pareto
Single Parameter Pareto
Exercises
Syllabus Coverage 2
But recommended readings aren’t consistent on notation for Beta or even definition of
Pareto.
Historically, both have been tested purely by having density given to avoid ambiguities.
Presumably this will continue in future.
Point: All problems can be done from first principles, material in this lesson is optional
264
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 265
Beta 3
Moments (Optional):
a
E[X ] =
a+b
a(a + 1)
E[X 2 ] =
(a + b)(a + b + 1)
Easy to do from scratch, tested rarely, not worth memorizing anything.
Beta Example 4
Find E[X ] given f (x) = 6x(1 − x) for 0 < x < 1 and 0 otherwise.
Z 1
E[X ] = x · f (x) dx
0
Z 1
= x · 6x(1 − x) dx
0
Z 1
= 6x 2 − 6x 3 dx
0
6 6
= −
3 4
6 1
= =
12 2
Or a = b = 2 and E[X ] = a/(a + b) = 2/(2 + 2) = 1/2
265
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 266
Pareto Distributions 5
Suppose X
R∞≥ 0 but unbounded.
We need 0 f (x) dx = 1, which requires lim f (x) = 0.
x→∞
Problem: x −p is horrible at 0.
Pareto Distribution 6
For α > 0, θ > 0, X is Pareto(α, θ) if f (x) = 0 for x < 0 and for x > 0,
αθα
f (x) =
(x + θ)α+1
Don’t need to memorize! Density or CDF must be given.
Have seen examples in previous lessons.
If α > 1 then
Z ∞ Z ∞
α
1 − F (x) = f (t) dt = θα ·α+1
dt
x x (t + θ)
∞
α −1 θα
=θ · =
(t + θ)α x (x + θ)α
Z ∞ Z ∞
θα
E[X ] = [1 − F (x)] dx = dx
0 0 (x + θ)α
∞
−θα θ
= =
(α − 1)(x + θ)α−1 0 α−1
266
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 267
Exercise 1 8
267
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 268
Exercise 1 8
268
B.3.5 Beta and Pareto Distributions Exam P Handouts – Page 269
Exercise 2 10
2 · 1002
Y has density f (y ) = for 0 < y < ∞, and f (y ) = 0 otherwise. Find the
(y + 100)3
75th percentile of Y .
Exercise 2 10
2 · 1002
Y has density f (y ) = for 0 < y < ∞, and f (y ) = 0 otherwise. Find the
(y + 100)3
75th percentile of Y .
Let t be the 75th percentile. So F (t) = 0.75 and 1 − F (t) = 1 − 0.75 = 0.25.
Z ∞
1 − F (t) = f (y ) dy
t
Z ∞
2 · 1002
0.25 = 3
dy
t (y + 100)
∞
−1002 1002
0.25 = =
(y + 100)2 t (t + 100)2
100
0.5 =
t + 100
0.5t + 50 = 100
t = 100
269
B.4.1 Normal Distribution Exam P Handouts – Page 270
Normal Distribution 1
f (x)
1 2
For a standard normal, f (x) = √ e −x /2
2π
Z∞ makes std. deviation is 1
makes f (x) dx = 1
−∞
270
B.4.1 Normal Distribution Exam P Handouts – Page 271
Other Normals 3
Z ∼ N(0, 1)
Y =σ·Z +µ
E[Y ] = σ · E[Z ] + µ = µ
Var[Y ] = Var[σZ ] = σ 2 · Var[Z ] = σ 2
Y = σZ + µ ∼ Normal(µ, σ 2 )
Other Normals 4
271
B.4.1 Normal Distribution Exam P Handouts – Page 272
f (z)
z
Suppose that Z is a standard normal, so
Z ∼ Normal(0, 1)
Φ(z) = P[Z ≤ z]
denotes the CDF of Z (so it is the shaded area). Fact: No elementary formula for
Φ(z) exists, so we will look it up on tables.
f (z)
area = area =
P[Z ≤ −z] P[Z > z]
z
−z z
Tables for Φ(z) only include z ≥ 0. To find the cdf for negative values, we compare
Φ(−z) with Φ(z).
272
B.4.1 Normal Distribution Exam P Handouts – Page 273
Entries represent the area under the standardized normal distribution from −∞ to z,
i.e., Φ(z) = Pr(Z ≤ z) is the cdf. The value of z to the first decimal is given in the
left column. The second decimal place is given in the top row.
Φ(0.12)= 0.5478
Φ(−0.33)= 1 − Φ(0.33)
= 1 − 0.6293
Probabilities Example 8
273
B.4.1 Normal Distribution Exam P Handouts – Page 274
Percentile Example 9
First, let’s find z, the 95th percentile of Z , then convert to t, the 95th percentile of X .
Sums of Normals 10
If X and Y are independent normals, then it turns out that X + Y is also normal.
If we want averages,
X +Y E(X ) + E(Y ) 1
∼ Normal , Var(X ) + Var(Y )
2 2 4
274
B.4.1 Normal Distribution Exam P Handouts – Page 275
Exercise 1 11
X is normal with mean −2.47 and variance 1.69. Find P[X > 0]
Exercise 1 11
X is normal with mean −2.47 and variance 1.69. Find P[X > 0]
X −µ 0 − (−2.47)
P[X > 0] = P > √
σ 1.69
= P[Z > 1.9]
= 1 − Φ(1.9)
= 1 − 0.9713
= 0.0287
To avoid sign errors, can do reasonability check. We want the probability that X is
much bigger than its mean, so should have a small value as the answer.
275
B.4.1 Normal Distribution Exam P Handouts – Page 276
Exercise 2 12
If X and Y are independent normal random variables with E[X ] = 0.6, E[Y ] = 3.2,
Var[X ] = 1.08 and Var[Y ] = 1.17, find the 75th percentile of the average of X and Y .
Exercise 2 12
If X and Y are independent normal random variables with E[X ] = 0.6, E[Y ] = 3.2,
Var[X ] = 1.08 and Var[Y ] = 1.17, find the 75th percentile of the average of X and Y .
276
B.4.2 Interpolation Exam P Handouts – Page 277
Interpolation 1
Basic Idea
Linear Interpolation
Inverse Values
Exercises
Example 2
Let X ∼ N(µ = 4, σ 2 = 2.2). Find P[X > 3.3] to the nearest thousandth.
X −µ 3.3 − 4
P[X > 3.3] = P > √
σ 2.2
−0.7
=1−P Z ≤ √
2.2
= 1 − Φ(−0.472) = Φ(0.472)
What is Φ(0.472)?
To nearest thousandth, it is at least 0.681, at most 0.684, but can’t immediately tell.
277
B.4.2 Interpolation Exam P Handouts – Page 278
Exam Rules 3
Exam rule: Out of values that are possible based on tables, here 0.681, 0.682, 0.683
and 0.684, the only one included as an answer choice will be true value of 0.682.
Φ(x)
0.6844
Φ(t)
0.6808
0.47 t 0.48 x
Comparing slopes:
278
B.4.2 Interpolation Exam P Handouts – Page 279
From tables, have Φ(a) and Φ(a + 0.01). Want Φ(a + t).
Φ(x)
Φ(a + 0.01)
Φ(a + t)
Φ(a)
x
a a+t a + 0.01
Percentile Example 6
Φ(1.13) = 0.8708 is closer to 0.87 than Φ(1.12) = 0.8686, so exact value is closer to
2.324, which corresponds to z = 1.13, than 2.339. Exact value is around 2.33.
279
B.4.2 Interpolation Exam P Handouts – Page 280
√
We want t = 4 − 2.2 · Φ−1 (0.87)
Exercise 1 8
If X is normal with mean 0.6 and variance 1.3, find P[X ≤ 0.8]
280
B.4.2 Interpolation Exam P Handouts – Page 281
Exercise 1 8
If X is normal with mean 0.6 and variance 1.3, find P[X ≤ 0.8]
X −µ 0.8 − 0.6
P[X ≤ 0.8] = P ≤ √
σ 1.3
= P[Z ≤ 0.1754]
P[Z ≤ 0.17] ≈ 0.5675
P[Z ≤ 0.18] ≈ 0.5714
P[Z ≤ 0.1754] ≈ 0.5675 + 0.54(0.5714 − 0.5675)
= 0.5696
Exercise 2 9
281
B.4.2 Interpolation Exam P Handouts – Page 282
Exercise 2 9
Let z denote the 60th percentile of a standard normal, and t the 60th percentile of X .
z = Φ−1 (0.6)
Φ−1 (0.5987) = 0.25
Φ−1 (0.6026) = 0.26
0.6 − 0.5987
Φ−1 (0.6) = 0.25 + (0.26 − 0.25)
0.6026 − 0.5987
13
= 0.25 + · 0.01 = 0.25333
39
x = σz + µ
√
= 33.8 · z + 81.2 = 82.67
282
B.4.3 The Central Limit Theorem Exam P Handouts – Page 283
Basic CLT
Normal Approximation
Example
Averages
Exercises
Key idea: Sums of a large number of random variables are often approximately normal
Theorem (CLT: Exam version)
If X1 , . . . , Xn are iid random variables, then
(X1 + · · · Xn ) − n E[X1 ]
p ⇒ N(0, 1)
n Var[X1 ]
Alternatively, let Sn = X1 + · · · Xn
E[Sn ] = nE[X1 ] = nµ
p √
SD[Sn ] = nVar[X1 ] = σ n
Sn − n µ
√ ⇒ N(0, 1)
nσ
283
B.4.3 The Central Limit Theorem Exam P Handouts – Page 284
Example 4
An insurance company pays claims on 625 losses. Losses are independent and
exponentially distributed with mean 3. Find the approximate probability that the total
payment is between 1800 and 2010.
Sn = X1 + · · · + X625 Xi ∼ Exponential(3)
E[Xi ] = 3 Var[Xi ] = 32 = 9
E[Sn ] = 625 · 3 = 1,875
Var[Sn ] = 625 · 9 = 5,625
SD[Sn ] = 75
1800 − 1875 Sn − E[Sn ] 2010 − 1875
P[1800 < Sn < 2010] = P < <
75 SD[Sn ] 75
= P[−1 < Z < 1.8]
= Φ(1.8) − Φ(−1) = Φ(1.8) − [1 − Φ(1)]
= 0.9641 − [1 − 0.8413] = 0.8054
284
B.4.3 The Central Limit Theorem Exam P Handouts – Page 285
Suppose X1 , X2 , . . . , X100 are iid random variables with P[Xi = 1] = P[Xi = −1] = 1/2.
Think of Xi as the amount that we win in bet number i.
Averages 6
Suppose that X1 , . . . , Xn are iid random variables, and let X be their average. What is
the distribution of X ?
S = X1 + X2 + · · · + Xn
S 1
X = = (X1 + X2 + · · · + Xn )
n n
1
E[X ] = (E(X1 ) + E(X2 ) + · · · + E(Xn ))
n
1
= · n · E[X ]
n
= E[X ]
285
B.4.3 The Central Limit Theorem Exam P Handouts – Page 286
Averages 7
1
Var[X ] = Var (X1 + · · · + Xn )
n
1
= 2 (Var(X1 ) + · · · + Var(Xn ))
n
1
= 2 · nVarX
n
Var(X )
=
n
Since S is roughly normal, so is S/n, so we have that
Var(X )
X ≈ N E(X ),
n
Exercise 1 8
Losses have mean 4 and standard deviation 3. If losses are independent, use a normal
approximation to estimate the probability that the sum of 30 losses is at least 100.
286
B.4.3 The Central Limit Theorem Exam P Handouts – Page 287
Exercise 1 8
Losses have mean 4 and standard deviation 3. If losses are independent, use a normal
approximation to estimate the probability that the sum of 30 losses is at least 100.
Exercise 2 9
Losses are independent, each with density 0.2e −0.2x for x > 0 and 0 otherwise. Losses
are insured with a deductible of 5. The first 60 randomly selected positive payments are
averaged. Using a normal approximation, estimate the 88th percentile of the average.
287
B.4.3 The Central Limit Theorem Exam P Handouts – Page 288
Exercise 2 9
Losses are independent, each with density 0.2e −0.2x for x > 0 and 0 otherwise. Losses
are insured with a deductible of 5. The first 60 randomly selected positive payments are
averaged. Using a normal approximation, estimate the 88th percentile of the average.
288
B.4.4 Continuity Correction Exam P Handouts – Page 289
Continuity Correction 1
Example
Formulas
Example
Exercises
E[X ] = np = 25 · 0.2 = 5
Var[X ] = np(1 − p) = 25 · 0.2 · 0.8 = 4
X25 X25
25
P[X ≥ 8] = P[X = k] = 0.2k (1 − 0.2)25−k
k
k=8 k=8
X25 X25
25
P[X > 8] = P[X = k] = 0.2k (1 − 0.2)25−k
k
k=9 k=9
289
B.4.4 Continuity Correction Exam P Handouts – Page 290
But normals are continuous, so P[W = 8] = 0 and P[W ≥ 8] = P[W > 8].
W − E[W ] 8−5
P[W > 8] = P > √
SD[W ] 4
= 1 − Φ(1.5)
= 1 − 0.9332
= 0.0668
In those examples, X and W had the same mean and variance, but
P[X ≥ 8] = 0.1091 and P[X > 8] = 0.0468
P[W ≥ 8] = 0.0668 = P[W > 8] = 0.0668.
290
B.4.4 Continuity Correction Exam P Handouts – Page 291
Continuity Correction 5
It corrects for the normal being continuous while the variable we care about is not.
Example 6
A roulette player betting on black has an 18/38 probability of winning on each spin of
the wheel. Using a normal approximation with a continuity correction, find the
approximate probability of betting on black and winning in at least 45 out of 100 spins.
18
Sn = # wins ∼ Binomial 100,
38
18
E[Sn ] = 100 · ≈ 47.368
r 38
18 20
SD[Sn ] = 100 · · ≈ 4.993
38 38
P[Sn ≥ 45] ≈ P[W > 44.5]
W − E[W ] 44.5 − 47.368
=P >
SD[W ] 4.993
= P[Z > −0.5745] = 1 − Φ(−0.5745)
= 1 − (1 − Φ(0.5745)) = Φ(0.5745) ≈ 0.72
291
B.4.4 Continuity Correction Exam P Handouts – Page 292
Exercise 1 7
Exercise 1 7
E[X ] = 2.3
p √
SD[X ] = Var[X ] = 2.3
P[X ≤ 4] ≈ P[W < 4.5]
4.5 − 2.3
=Φ √
2.3
= Φ(1.45)
= 0.9265
292
B.4.4 Continuity Correction Exam P Handouts – Page 293
Exercise 2 8
Exercise 2 8
293
B.4.5 Lognormal Distributions Exam P Handouts – Page 294
Lognormal Distributions 1
Example of lognormal
Definition of lognormal
Moments
Mean and Variance of lognormal
Exercises
Example of lognormal 2
294
B.4.5 Lognormal Distributions Exam P Handouts – Page 295
Lognormal Defintion 3
Definition (lognormal)
Y is a lognormal if Y = e X , X is normal
In words, the log of a lognormal distribution is normal.
Lognormal Moments 4
Key point: For finding moments, we use these formulas about the lognormal. For
finding probabilities, we take logs and work with the underlying normal.
295
B.4.5 Lognormal Distributions Exam P Handouts – Page 296
Losses Y have a lognormal distribution with mean 50 and variance 400. What is the
probability that losses exceed 75?
Y = eX
E(Y ) = E(e X )
2
50 = e µ+σ /2
2 2 2X
E Y = 50 + 400 = E e
2
= e 2µ+2σ
σ2
ln(50) = µ +
2
ln 50 + 400 = 2µ + 2σ 2
2
σ 2 = 0.148 µ = 3.84
Remark: To solve, double ln[E (Y )] equation and subtract from 2nd moment equation.
Losses Y have a lognormal distribution with mean 50 and variance 400. What is the
probability that losses exceed 75?
σ 2 = 0.148 µ = 3.84
P[Y > 75] = P[X > ln(75)]
X − 3.84 ln(75) − 3.84
=P >
0.1481/2 0.1481/2
= 1 − Φ(1.245)
≈ 1 − [0.8925 + 0.5(0.8944 − 0.8925)] ≈ 0.11
296
B.4.5 Lognormal Distributions Exam P Handouts – Page 297
Exercise 1 7
Suppose that X is normal with P[X > 5] = 0.5 and P[X > 8] = 0.05. Find E[e 2X ].
Exercise 1 7
Suppose that X is normal with P[X > 5] = 0.5 and P[X > 8] = 0.05. Find E[e 2X ].
µ=5
8−5
= 1.645
σ
σ = 1.8237
e X ∼ LN(µ = 5, σ 2 = 3.3259)
E[e 2X ] = E[(e X )2 ]
2
= e 2µ+2σ
= e 16.6518
= 17,052,000
297
B.4.5 Lognormal Distributions Exam P Handouts – Page 298
Exercise 2 8
X is lognormal with mean 10 and variance 200. Find P[X > 10].
Exercise 2 8
X is lognormal with mean 10 and variance 200. Find P[X > 10].
2 /2
E[X ] = 10 = e µ+σ
2
E[X 2 ] = 102 + 200 = e 2µ+2σ
2µ + σ 2 = 2 ln(10)
2µ + 2σ 2 = ln(300)
σ 2 = ln(300) − 2 ln(10) = 1.099
µ = 1.753
P[X > 10] = P[ln(X ) > ln(10)]
ln(X ) − µ ln(10) − 1.753
=P > √
σ 1.099
= 1 − Φ(0.52) = Φ(−0.52) = 0.3015
Warning: Lognormals are very sensitive to rounding. Carry as many digits as possible.
298
B.5.1 Deductibles: Calculus Approach Exam P Handouts – Page 299
Percentiles
Expected Values
Payment Limits
Losses Only 2
Loss amounts X have density f (x) = 0.02x for 0 < x < 10 and 0 otherwise. Find the
10th and 90th percentiles of X .
Z x
P[X ≤ x] = 0.02t dt
0
= 0.01x 2
P[X ≤ s] = 0.10
0.01s 2 = 0.10
s = 3.16
0.01t 2 = 0.90
t = 9.49
299
B.5.1 Deductibles: Calculus Approach Exam P Handouts – Page 300
Deductible Example 3
Loss amounts have density f (x) = 0.02x for 0 < x < 10 and 0 otherwise. Losses are
insured subject to a deductible of 4. Let Y denote the payment amount corresponding
to a randomly selected loss. Find the 90th percentile of Y .
Note that this equals the 90th percentile of X minus the deductible of 4.
Deductible Example 4
Loss amounts have density f (x) = 0.02x for 0 < x < 10 and 0 otherwise. Losses are
insured subject to a deductible of 4. Let Y denote the payment amount corresponding
to a randomly selected loss. Find the 10th percentile of Y .
This happened because P[Y = 0] = P[X ≤ 4] = 0.16 > 0.10, so the 16th percentile,
and every smaller percentile, of Y is 0.
The 10th percentile of X was 3.16. A loss of 3.16 results in a payment of 0, which is
the 10th percentile of Y . The p-th percentile of Y is the payment corresponding to
the p-th percentile of X .
300
B.5.1 Deductibles: Calculus Approach Exam P Handouts – Page 301
Loss amounts have density f (x) = 0.02x for 0 < x < 10 and 0 otherwise. Losses are
insured subject to a deductible of 4. Find the 90th percentile of a loss that exceeds the
deductible.
Loss amounts have density f (x) = 0.02x for 0 < x < 10 and 0 otherwise. Losses are
insured subject to a deductible of 4.
301
B.5.1 Deductibles: Calculus Approach Exam P Handouts – Page 302
Loss amounts have density f (x) = 0.02x for 0 < x < 10, and f (x) = 0 otherwise.
Losses are insured subject to a deductible of 2 and a maximum payment limit of 5.
Find the cdf of the payment amount.
F (y )
0 y <0
1
0.04 y =0 Jump = P[Y = 5] = 0.51
FY (y ) = 0.49
0.01(y + 2)2 0<y <5
1 0.04
y >5 Jump = P[Y = 0] = 0.04
y
5
Loss amounts have density f (x) = 0.02x for 0 < x < 10, and f (x) = 0 otherwise.
Losses are insured subject to a deductible of 2 and a maximum payment limit of 5.
Find the expected payment amount.
Y has a mixed distribution: P[Y = 0] = 0.04 and P[Y = 5] = P[X > 7] = 0.51.
R5
E[Y ] = 0 · P[Y = 0] + 5 · P[Y = 5] + 0 y · fY (y )dy
So one approach would be to find fY (y ).
302
B.5.1 Deductibles: Calculus Approach Exam P Handouts – Page 303
Loss amounts have density f (x) = 0.02x for 0 < x < 10, and f (x) = 0 otherwise.
Losses are insured subject to a deductible of 2 and a maximum payment limit of 5.
Find the expected payment amount.
Using the survival method, P[Y > y ] = P[X > y + 2] for 0 < y < 5. P[Y > 5] = 0.
Z ∞ Z 5 Z ∞
P[Y > y ] dy = P[X > y + 2] dy + 0 dy
0 0 5
Z 7
= P[X > x] dx
2
Z 7
= (1 − 0.01x 2 ) dx
2
0.01 · 73 0.01 · 23
=5− +
3 3
= 3.8833
303
B.5.2 Deductibles: Cases Approach Exam P Handouts – Page 304
Overview
Uniform Examples
Exponential Examples
Let X be a loss. With a deductible of d, there are two cases for the payment Y :
(
0 X ≤d
Y =
X −d X >d
E[Y ] = E[Y | X ≤ d] · P[X ≤ d] + E[Y | X > d] · P[X > d]
= 0 · P[X ≤ d] + E[X − d | X > d] · P[X > d]
304
B.5.2 Deductibles: Cases Approach Exam P Handouts – Page 305
Uniform Example 3
There are two cases: either the loss exceeds 20, or it doesn’t. Let X denote the loss,
and Y the reimbursement.
E[Y ] = E[Y | X > 20] · P[X > 20] + E[Y | X ≤ 20] · P[X ≤ 20]
8 2
= E[0.6 · U(0, 80)] · +0·
10 10
= 0.6 · 40 · 0.8
= 19.2
Z 20 Z 100
1 1
or: E[Y ] = 0· dx + 0.6 · (x − 20) · dx
0 100 20 100
Adding Limits 4
Losses X are uniform on (0, 100). An insurance company will pay a reimbursement of
60% of the amount of the loss that exceeds a deductible of 20, up to a maximum
payment of 30. Find the expected reimbursement for a randomly selected loss.
305
B.5.2 Deductibles: Cases Approach Exam P Handouts – Page 306
Exponential Example 5
Losses X are exponentially distributed with mean 50. An insurance company will pay a
reimbursement of 60% of the amount of the loss that exceeds a deductible of 20. Find
the mean and variance of a randomly selected reimbursement Y .
306
B.5.3 Review of Other Continuous Ideas Exam P Handouts – Page 307
Key Formulas
Distribution Review
F (x) = P[X ≤ x]
F (∞) = 1 F (−∞) = 0
If X has a mixed distribution, then F (x) has some jumps. Jump sizes determine
probabilities, i.e.,
307
B.5.3 Review of Other Continuous Ideas Exam P Handouts – Page 308
Moments 3
If X is continuous, then
Z
E[X ] = x · f (x)dx
Z
E[g (X )] = g (x) · f (x)dx
Normal Approximation 4
Let S = X1 + X2 + . . . Xn
S − E[S] S − n E[X ] S − nµ
= p = √ ≈ N(0, 1)
SD[S] n Var[X ] σ n
308
B.5.3 Review of Other Continuous Ideas Exam P Handouts – Page 309
Key Distributions 5
309
C.1.1 Joint Distributions and CDFs Exam P Handouts – Page 310
Joint Distributions
Joint CDFs
Exercises
Joint Distribution 2
P
In 1-dimension, for a random variable X we had Pr[X = x] = 1
x
310
C.1.1 Joint Distributions and CDFs Exam P Handouts – Page 311
Example 3
X
0 1 2
1 0.1 0.2 0.3
Y
2 0.1 0.1 0.2
P[X = 0, Y = 1] = 0.1
P[X = 2, Y = 2] = 0.2
=1
Uniform Example 4
311
C.1.1 Joint Distributions and CDFs Exam P Handouts – Page 312
Joint CDFs 5
Properties:
1. 0 ≤ F (x, y ) ≤ 1
2. F (x, ∞) = P[X ≤ x, Y ≤ ∞] = P[X ≤ x] = FX (x)
3. F (∞, y ) = P[X ≤ ∞, Y ≤ y ] = P[Y ≤ y ] = FY (y )
4. F (∞, ∞) = 1
5. F (−∞, y ) = 0 = F (x, −∞)
CDF Example 6
X
0 1 2
1 0.1 0.2 0.3
Y
2 0.1 0.1 0.2
312
C.1.1 Joint Distributions and CDFs Exam P Handouts – Page 313
Exercise 1 7
Exercise 1 7
If x = 1 then y = 1.
If x = 2 then y can be 1 or 2
If x = 3, then y can be 1, 2, or 3.
That gives 6 possible cases to sum, and
313
C.1.1 Joint Distributions and CDFs Exam P Handouts – Page 314
Exercise 2 8
X and Y are integer valued random variables. If you know that FX ,Y (3, 3) = 1,
FX ,Y (3, 2) = 0.7, FX ,Y (2, 3) = 0.6, FX ,Y (2, 2) = 0.4, FX ,Y (1, 3) = 0.3, and
FX ,Y (1, 2) = 0.2, find P[X = 2].
Exercise 2 8
X and Y are integer valued random variables. If you know that FX ,Y (3, 3) = 1,
FX ,Y (3, 2) = 0.7, FX ,Y (2, 3) = 0.6, FX ,Y (2, 2) = 0.4, FX ,Y (1, 3) = 0.3, and
FX ,Y (1, 2) = 0.2, find P[X = 2].
314
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 315
Marginal Distributions
Discrete Example
Conditional Distributions
Key Points
Exercises
Marginal distributions 2
is marginal distribution of X .
315
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 316
X has two possible values, 0 or 1. Finding the marginal probability function means
finding P[X = 0] and P[X = 1].
2x + y
p(x, y ) =
12
for (x, y ) = (0, 1), (0, 2), (1, 2), (1, 3), and 0 otherwise.
316
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 317
P[X = 0, Y = 2]
P[X = 0 | Y = 2] =
P[Y = 2]
2·0+2 2
P[X = 0, Y = 2] = =
12 12
P[Y = 2] = P[X = 0, Y = 2] + P[X = 1, Y = 2]
2·0+2 2·1+2 6
= + =
12 12 12
2/12 1
P[X = 0 | Y = 2] = =
6/12 3
Conditional distributions 6
317
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 318
Independence 7
In particular, X and Y are independent if and only if the joint probability mass
function factors as a function of x times a function of y and the range of {X , Y } is a
discrete rectangle.
Example 8
318
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 319
Key Points 9
The marginal distribution P[X = x] of X can only involve x. It cannot involve any
other variable.
Exercise 1 10
x 2y
p(x, y ) =
23
for (x, y ) = (1, 1), (1, 2), (2, 2), (2, 3), and 0 otherwise. Determine the marginal
probability function of X .
319
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 320
Exercise 1 10
x 2y
p(x, y ) =
23
for (x, y ) = (1, 1), (1, 2), (2, 2), (2, 3), and 0 otherwise. Determine the marginal
probability function of X .
Exercise 2 11
x 2y
p(x, y ) =
23
for (x, y ) = (1, 1), (1, 2), (2, 2), (2, 3), and 0 otherwise. Find P[X = 1 | Y = 2]
320
C.1.2 Marginal and Conditional Distributions Exam P Handouts – Page 321
Exercise 2 11
P[X = 1, Y = 2]
P[X = 1 | Y = 2] =
P[Y = 2]
P[X = 1, Y = 2]
=
P[X = 1, Y = 2] + P[X = 2, Y = 2]
1 2
23 (1 · 2)
= 1 2 2
23 (1 · 2 + 2 · 2)
2 1
= =
2+8 5
321
C.2.1 Joint Moments Exam P Handouts – Page 322
Joint Moments 1
Examples
Definitions
Exercises
Discrete Example 2
Let X denote that number of years I will use my current computer, and Y the number
of years that I will use my tablet. The joint distribution of X and Y is
X
1 2 3
1 0.05 0.16 0.19
Y 2 0.10 0.13 0.12
3 0.07 0.10 0.08
What is the average number of years that I will use the tablet?
One approach is to first find the marginal distribution of Y .
322
C.2.1 Joint Moments Exam P Handouts – Page 323
Discrete Example 3
Discrete Example 4
When we are dealing with X + Y , the first approach no longer works (easily), but we
can still use the second.
323
C.2.1 Joint Moments Exam P Handouts – Page 324
Definitions 5
Exercise 1 6
324
C.2.1 Joint Moments Exam P Handouts – Page 325
Exercise 1 6
Exercise 2 7
325
C.2.1 Joint Moments Exam P Handouts – Page 326
Exercise 2 7
Key difference: now we want the mean of something that involves both X and Y . We
must use the joint probability mass.
326
C.2.2 Covariances and Correlations Exam P Handouts – Page 327
Definitions
Example
Using independence
SOA # 75; S.03.15
Exercises
h i
Var[X ] = E (X − µX ) = E X 2 − (E[X ])2
2
Cov(X , Y ) = E [(X − µX ) (Y − µY )]
= E(XY ) − E(X ) · E(Y )
Note: Cov(X , b) = E[bX ] − bE[X ] = 0
327
C.2.2 Covariances and Correlations Exam P Handouts – Page 328
Variance of Sums 3
Correlation 4
Definition (Correlation)
The correlation of X and Y is given by
Cov (X , Y )
Corr (X , Y ) =
SD(X ) · SD(Y )
328
C.2.2 Covariances and Correlations Exam P Handouts – Page 329
Properties of Correlation 5
Cov(X , Y ) = Cov(X , a X + b)
= a · Cov(X , X ) + Cov(X , b)
= a · Var[X ]
Fact : −1 ≤ Corr (X , Y ) ≤ 1
Example 6
1 = k[1 · 1 + 1 · 2 + 2 · 1 + 2 · 2 + 3 · 1 + 3 · 2] = 18k
k = 1/18
1 · (1 · 1 + 1 · 2) + 2 · (2 · 1 + 2 · 2) + 3 · (3 · 1 + 3 · 2) 42 7
E[X ] = = =
18 18 3
1 · (1 · 1 + 2 · 1 + 3 · 1) + 2 · (1 · 2 + 2 · 2 + 3 · 2) 30 5
E[Y ] = = =
18 18 3
(1 · 1) · (1 · 1) + (1 · 2)2 + (2 · 1)2 + (2 · 2)2 + (3 · 1)2 + (3 · 2)2 70 35
E[XY ] = = =
18 18 9
35 7 5
Cov[X , Y ] = E[XY ] − E[X ]E[Y ] = − · =0
9 3 3
329
C.2.2 Covariances and Correlations Exam P Handouts – Page 330
Theorem
X and Y are independent if both
1. The support of (X , Y ), i.e., the points such that P[X = x, Y = y ] > 0, is a
rectangular lattice
2. P[X = x, Y = y ] = P[X = x] · P[Y = y ]
Remark: The Soviet notation for independence was X ⊥ Y , partly because of this
requirement that the support be a rectangle.
Applications of Independence: 8
More generally,
330
C.2.2 Covariances and Correlations Exam P Handouts – Page 331
Example of Independence 9
We could have simply observed that the support is a rectangle, and f (x, y ) factors as a
function of x times a function of y , so X and Y are independent and therefore
Cov(X , Y ) = 0.
An insurance policy pays a total medical benefit consisting of two parts for each claim.
Let X represent the part of the benefit that is paid to the surgeon, and let Y represent
the part that is paid to the hospital. The variance of X is 5,000, the variance of Y is
10,000, and the variance of the total benefit, X + Y , is 17,000.
Due to increasing medical costs, the company that issues the policy decides to increase
X by a flat amount of 100 per claim and to increase Y by 10% per claim. Calculate
the variance of the total benefit after these revisions have been made.
331
C.2.2 Covariances and Correlations Exam P Handouts – Page 332
Exercise 1 12
332
C.2.2 Covariances and Correlations Exam P Handouts – Page 333
Exercise 1 12
Exercise 2 13
X and Y are random variables with Corr(X , Y ) = 0.6, Var[X ] = 64 and Var[Y ] = 100.
Find Var[2X − 3Y ].
333
C.2.2 Covariances and Correlations Exam P Handouts – Page 334
Exercise 2 13
X and Y are random variables with Corr(X , Y ) = 0.6, Var[X ] = 64 and Var[Y ] = 100.
Find Var[2X − 3Y ].
Cov[X , Y ]
Corr(X , Y ) =
SD[X ]SD[Y ]
Cov[X , Y ]
0.6 = √ √
64 100
48 = Cov[X , Y ]
Var[2X − 3Y ] = 22 Var[X ] + 2(2)(−3)Cov[X , Y ] + (−3)2 Var[Y ]
= 4 · 64 − 12 · 48 + 9 · 100
= 580
334
C.2.3 Conditional Moments Exam P Handouts – Page 335
Conditional Moments 1
Example
Double Expectation Theorem
Examples
Law of Total Variation
Exercises
Example 2
X
0 1 2
1 0.1 0.2 0.3
Y
2 0.1 0.1 0.2
Previously we saw
1 2 3
P[X = 0 | Y = 1] = P[X = 1 | Y = 1] = P[X = 2 | Y = 1] =
6 6 6
Conditional Moments:
X
E[X | Y = y ] = x · P[X = x | Y = y ]
all x
1 2 3 4
E[X | Y = 1] = 0 · +1· +2· =
6 6 6 3
0.1 0.1 0.2 5
E[X | Y = 2] = 0 · +1· +2· =
0.4 0.4 0.4 4
335
C.2.3 Conditional Moments Exam P Handouts – Page 336
Example Continued 3
4 5
E[X | Y = 1] = E[X | Y = 2] =
3 4
Key point: E[X | Y ] is a function of Y . As a result, it is also a random variable.
E[X ] = E[E[X | Y = y ]]
X
E[X ] = E[X | Y = y ] · P[Y = y ]
all y
336
C.2.3 Conditional Moments Exam P Handouts – Page 337
Example 5
Let N be the value rolled by a fair six-sided die. Suppose that I then flip N
independent fair coins. What is the expected number of heads? What is the variance
in the number of heads?
The key to this example is that if we know N then it is easy to find the first and
second moment
N
E[Heads | N] =
2
So by double expectation,
Example (Cont) 6
For the second moment, if we know N then the number of heads (H) is binomial with
N trials and p = 1/2.
That means that
N N
E[H | N] = , Var[H | N] =
2 4
E[H | N] = Var[H | N] + (E[H | N])2
2
N N2
= +
4 4
2 2
E[H ] = E[E[H | N]]
N N2
=E +
4 4
337
C.2.3 Conditional Moments Exam P Handouts – Page 338
Example (cont) 7
1+6
E[N] =
2
2
6 −1 35
Var[N] = =
12 12
2
35 7 91
E[N 2 ] = + =
12 2 6
N N2
E[H 2 ] = E +
4 4
7 91 14
= + =
2·4 6·4 3
2
14 7 77
Var[H] = − =
3 4 48
E[X ] = E[E[X | Y ]]
E[X 2 ] = E[E[X 2 | Y ]]
but the analogous statement is not true for variances which is why we used
Var[H] = E[H 2 ] − (E[H])2 .
For the variance you need an additional term:
Definition (Law of Total Variation)
This is heavily tested on later exams, but we only care about one specific application.
338
C.2.3 Conditional Moments Exam P Handouts – Page 339
E[S | N] = NE[X ]
Var[S | N] = N · Var[X ]
Var[S] = E[Var[S | N]] + Var[E[S | N]]
= E[NVar[X ]] + Var[NE[X ]]
= E[N]Var[X ] + Var[N](E[X ])2
Exercise 1 10
The number of losses N is Poisson with mean 3. Loss amounts are mutually
independent, and also independent of the number of losses, and have mean 5 and
variance 20. What is the expected value of the sum of all the losses?
339
C.2.3 Conditional Moments Exam P Handouts – Page 340
Exercise 1 10
The number of losses N is Poisson with mean 3. Loss amounts are mutually
independent, and also independent of the number of losses, and have mean 5 and
variance 20. What is the expected value of the sum of all the losses?
Exercise 2 11
The number of losses N is Poisson with mean 3. Loss amounts are mutually
independent, and also independent of the number of losses, and have mean 5 and
variance 20. What is the variance of the sum of all the losses?
340
C.2.3 Conditional Moments Exam P Handouts – Page 341
Exercise 2 11
The number of losses N is Poisson with mean 3. Loss amounts are mutually
independent, and also independent of the number of losses, and have mean 5 and
variance 20. What is the variance of the sum of all the losses?
E[N] = 3
Var[N] = E[N] = 3
E[X ] = 5
Var[X ] = 20
Var[S] = E[N]Var[X ] + Var[N](E[X ])2
= 3 · 20 + 3 · 52
= 135
341
C.3.1 Order Statistics Exam P Handouts – Page 342
Order Statistics 1
Maximums
Minimums
Discrete Example
General Formulas
Exercises
Maximum Example 2
Claim amounts for flood damage are independent random variables with common
density function
4 for x > 1
f (x) = x 5
0 otherwise
where x is the amount of a claim in thousands.
Suppose 3 such claims X1 , X2 , X3 will be made. Find the CDF and density of the
largest of the 3 claims.
Let M denote the maximum loss amount. The key idea is that M ≤ x if and only if
each of the 3 claims are at most x.
342
C.3.1 Order Statistics Exam P Handouts – Page 343
4
For one claim, f (x) = for x > 1
x5
P[M ≤ x] = P[all 3 losses ≤ x]
= (P[X1 ≤ x])3
x 3
Z
4
= dt
t5
1
3
1 x
= − 4
t 1
1 3
= 1− 4 x >1
x
and the density is 0 for x < 1 as the loss amounts must all be at least 1 so their
maximum must also be at least 1. (And note FM (1) = 0)
343
C.3.1 Order Statistics Exam P Handouts – Page 344
Minimum Example 5
Claim amounts are independent random variables with common density function
4 for x > 1
f (x) = x 5
0 otherwise
where x is the amount of a claim in thousands.
Suppose 3 such claims will be made. What is the expected value of the smallest of the
three claims?
Let Y denote the minimum loss amount. For minimums, the key idea is Y > x only if
all the individual losses are > x. Note inequalities are reversed from maxes.
We can find E[Y ] in one of two ways:
Z∞ Z∞
E[Y ] = P[Y > y ] dy = y · fY (y ) dy
0 1
4
For one claim, f (x) = for x > 1
x5
P[Y > y ] = P[all 3 losses > y ]
∞ 3
Z
4
= dt
t5
y
!3
1 ∞
= − 4
t y
3
1
= y >1
y4
1
= 12 y >1
y
344
C.3.1 Order Statistics Exam P Handouts – Page 345
1
P[Y > y ] = y >1
y 12
Z 1 Z ∞
1
E[Y ] = 1 dx + dy
0 1 y 12
1 12
=1+ =
11 11
1
FY (y ) = 1 − 12 y > 1
y
12
fY (y ) = 13 y > 1
y
Z ∞ ∞
12 −12 12
E[Y ] = y · 13 dy = =
1 y 11y 11 1 11
Discrete Example 8
If I roll a fair die 5 times, what is the probability that the maximum roll is 4?
This is harder because we could have exactly one 4 and four smaller rolls or two 4s and
three smaller, or ...
But dealing with inequalities is easier.
345
C.3.1 Order Statistics Exam P Handouts – Page 346
Exercise 1 10
Suppose that X1 , X2 , X3 , X4 are iid exponential random variables, each with mean 3.
Find the probability that at least one of them exceeds 5.
346
C.3.1 Order Statistics Exam P Handouts – Page 347
Exercise 1 10
Suppose that X1 , X2 , X3 , X4 are iid exponential random variables, each with mean 3.
Find the probability that at least one of them exceeds 5.
Since we are talking about maxes, it is easier to work with the CDF. Let M denote the
maximum of our Xi . Then
Exercise 2 11
Let N1 , N2 , . . . , N5 be 5 iid Poisson random variables with mean 1.2. Find the
probability that the maximum of these 5 variables is 2.
347
C.3.1 Order Statistics Exam P Handouts – Page 348
Exercise 2 11
Let N1 , N2 , . . . , N5 be 5 iid Poisson random variables with mean 1.2. Find the
probability that the maximum of these 5 variables is 2.
348
C.3.2 General Order Stats Exam P Handouts – Page 349
Medians
Distribution and density of order stats
Exercises
Suppose we have some data, and want to know whether or not the median m of the
sample is ≤ 4.
Note that m ≤ 4 if 2 or 3 of the data points are ≤ 4, but m > 4 if 0 or 1 data point
are ≤ 4.
349
C.3.2 General Order Stats Exam P Handouts – Page 350
Example 3
Claim amounts for wind damage to insured homes are independent random variables
with common density function
3 for x > 1
f (x) = x 4
0 otherwise
3
f (x) = , x > 1, Y = Median
x4
Z y
3 1
P[X ≤ y ] = 4
dx = 1 −
1 x y3
P[Y ≤ y ] = P[at least 2 claims ≤ y ]
= P[exactly 2 claims ≤ y ] + P[all 3 claims ≤ y ]
3 1 2 1 1 3
= 1− 3 + 1− 3
2 y y3 y
2
1 3 1
= 1− 3 3
+1− 3
y y y
2
1 2
= 1− 3 1+ 3
y y
350
C.3.2 General Order Stats Exam P Handouts – Page 351
1 2 2
FY (y ) = 1 − 3 1+ 3
y y
1 3 2 1 2 2 · (−3)
fY (y ) = 2 1 − 3 1+ 3 + 1− 3
y y4 y y y4
6 1 2 −1
= 4 1− 3 1+ 3 −1− 3
y y y y
18 1
= 7 1− 3
y y
Suppose that we have n data points, denoted as X1 , X2 , . . . , Xn , where the Xi are iid
random variables. We can sort the n data points from smallest to largest:
The i-th smallest data point is called the i-th order statistic, and is denoted either as
X(i) or Yi .
351
C.3.2 General Order Stats Exam P Handouts – Page 352
The other order statistics are messier (and are tested less):
n
P Yn ≤ y = FX (y )
P Yn−1 ≤ y = P at least n − 1 are ≤ y
= P exactly n − 1 are ≤ y + P all n are ≤ y
n n−1 n
= FX (y ) 1 − FX (y ) + FX (y )
n−1
P Yn−2 ≤ y = P at least n − 2 are ≤ y
= P exactly n − 2 ≤ y + P at least n − 1 are ≤ y
n n−2 2
= FX (y ) 1 − FX (y ) + P Yn−1 ≤ y
n−2
..
.
352
C.3.2 General Order Stats Exam P Handouts – Page 353
fi (y ) = density of Yi
fi (y )dy = P y ≤ Yi ≤ y + dy ]
For that to happen, we need i − 1 data values to be less than y , one that is between y
and y + dy , and n − i that are greater than y
n n−i i−1
fi (y )dy = i · 1 − FX (y ) · FX (y ) · P[y ≤ X ≤ y + dy ]
n−i
n! n−i
fi (y ) = i · 1 − FX (y ) FX (y )i−1 · fX (y )
i!(n − i)!
n! n−i
= 1 − FX (y ) FX (y )i−1 · fX (y )
(i − 1)!(n − i)!
Exercise 1 10
Suppose that X1 , X2 , X3 , X4 , X5 are iid exponential random variables, each with mean
4. Find the density of the median of those variables.
353
C.3.2 General Order Stats Exam P Handouts – Page 354
Exercise 1 10
Suppose that X1 , X2 , X3 , X4 , X5 are iid exponential random variables, each with mean
4. Find the density of the median of those variables.
Exercise 2 11
Let W1 , W2 , . . . , W4 be 4 iid Poisson random variables with mean 3.2. Find the
probability that the minimum of these 4 variables is 2.
354
C.3.2 General Order Stats Exam P Handouts – Page 355
Exercise 2 11
Let W1 , W2 , . . . , W4 be 4 iid Poisson random variables with mean 3.2. Find the
probability that the minimum of these 4 variables is 2.
355
C.4.1 Multivariate Review Exam P Handouts – Page 356
Multivariate Review 1
Joint Distributions
Marginal Distributions
Conditional Distributions
Uniforms
Moments
Order Stats
Joint Distributions 2
X
P[(X , Y ) ∈ A] = P[(X , Y ) = (x, y )]
(x,y )∈A
X
P[(X , Y ) = (x, y )] = 1
x,y
356
C.4.1 Multivariate Review Exam P Handouts – Page 357
Marginal Distributions 3
Essentially we are breaking the probability up into all the possible cases, with the
second variable counting the cases.
The marginal of X can only depend on x, not y . Likewise, the marginal of Y can only
depend on y , not x.
Conditional Distributions 4
X and Y are independent if 1) the joint distribution factors and 2) the support is a
rectangle.
The conditional distribution of Y given X = x can depend on both x and y .
357
C.4.1 Multivariate Review Exam P Handouts – Page 358
Example 5
(x 2 + 1)(y + 1)
The joint distribution of X and Y is given by P[X = x, Y = y ] = for
73
x and y integers such that 0 ≤ y ≤ |x| ≤ 2, and is 0 otherwise. Find the marginal
distribution of Y .
P[Y = 2] = P[Y = 2, X = 2] + P[Y = 2, X = −2]
1 2
= (2 + 1)(2 + 1) + ((−2)2 + 1)(2 + 1)
73
15 + 15 30
= =
73 73
P[Y = 1] = 2 P[Y = 1, X = 2] + P[Y = 1, X = 1]
2 2
= (2 + 1)(1 + 1) + (12 + 1)(1 + 1)
73
2 28
= (10 + 4) =
73 73
73 − 28 − 30 15
P[Y = 0] = 1 − P[Y = 1] − P[Y = 2] = =
73 73
Example 6
(x 2 + 1)(y + 1)
The joint distribution of X and Y is given by P[X = x, Y = y ] = for
73
x and y integers such that 0 ≤ y ≤ |x| ≤ 2, and is 0 otherwise. Find the conditional
probability that X = 1 given Y = 1.
P[X = 1, Y = 1]
P[X = 1 | Y = 1] =
P[Y = 1]
1 2
73 [(1 + 1)(1 + 1)]
= 28
73
4
=
28
1
=
7
358
C.4.1 Multivariate Review Exam P Handouts – Page 359
Uniforms 7
(X , Y ) are jointly uniform if all possible (x, y ) are equally likely, i.e., the joint
probability function is constant.
If (X , Y ) are jointly uniform, then the conditional distributions are uniform. The
marginals need not be uniform.
If P[(X , Y ) = (x, y )], when positive, only depends on x, then the conditional
distribution of Y is constant and hence uniform. If P[(X , Y ) = (x, y )] only depends on
y , then the conditional distribution of X is uniform.
Moments 8
X
E[g (X , Y )] = g (x, y ) · P[(X , Y ) = (x, y )]
x,y
X
E[X ] = x · P[(X , Y ) = (x, y )]
x,y
X
2
E Y = y 2 · P[(X , Y ) = (x, y )]
x,y
X
E[Y | X = x] = E[Y | X ] = y · P[Y = y | X = x]
h i
E Y k = E[E[Y k | X ]]
Var[Y ] = E[Var[Y | X ]] + Var[E[Y | X ]]
PN
If S = i=1 Xi , where Xi are iid and N is independent,
Var[S] = E[N] · Var[X ] + Var[N] · (E[X ])2
359
C.4.1 Multivariate Review Exam P Handouts – Page 360
Example 9
Covariance 10
Var[X ] = σ 2 = E X 2 − (E[X ])2 = E (X − µX )2
Cov(X , Y ) = E[XY ] − E[X ] · E[Y ] = E[(X − µX )(Y − µY )]
Var[X + Y ] = Var[X ] + 2Cov(X , Y ) + Var[Y ]
Var[aX + bY ] = a2 Var[X ] + 2ab Cov(X , Y ) + b 2 Var[Y ]
Var[X − Y ] = Var[X ] − 2Cov(X , Y ) + Var[Y ]
Cov(X , Y )
Corr(X , Y ) = ρ =
SD(X ) · SD(Y )
360
C.4.1 Multivariate Review Exam P Handouts – Page 361
Example 11
Suppose that X and Y are random variables with Corr(X , Y ) = 0.3, E[X ] = E[Y ] = 1
and SD[X ] = SD[Y ] = 2. What are E[2X − 3Y ] and Var[2X − 3Y ]?
Order Stats 12
361