Download STA 256: Statistics and Probability I

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Randomness wikipedia , lookup

Transcript
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
STA 256: Statistics and Probability I
Al Nosedal.
University of Toronto.
Fall 2014
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
1
Introductory Ideas
2
Conditional Probability and Independence
3
Random Variables and their distributions
4
Moments of a Random Variable
5
Multivariate Distributions
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
My momma always said: ”Life was like a box of chocolates. You
never know what you’re gonna get.”
Forrest Gump.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Experiment, outcome, sample space, and sample point
When you toss a coin. It comes up heads or tails. Those are the
only possibilities we allow. Tossing the coin is called an
experiment. The results, namely H (heads) and T (tails) are
called outcomes. There are only two outcomes here and none
other. This set of outcomes namely, {H, T} is called a sample
space. Each of the outcomes H and T is called a sample point.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Sample space
Now suppose that you toss a coin twice in succession. Then there
are four possible outcomes, HH, HT, TH, TT. These are the
sample points in the sample space {HH, HT, TH, TT}.
We will denote the sample space by S.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Event
An event is a set of sample points. In the example of tossing a
coin twice in succession, the event, ”the first toss results in heads”,
is the set {HH, HT}.
Let A and B be events. By A ⊂ B (read, ” A is a subset of B ”)
we mean that every point that is in A is also in B. If A ⊂ B and
B ⊂ A, then A and B have to consist of the same points. In that
case we write A = B.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Union of events
If A and B are events, then, ”A or B”, is also an event denoted by
A ∪ B. For example, let A be: ”the first toss results in heads”, and
B be: ”the second toss results in tails”, is the set {HH, HT, TH,
TT}. Thus A ∪ B consists of all points that are either in A or in B.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
A∪B
●
●
●
●
●
●
●
●
●
●
●
●
A
●
●
B
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Intersection of events
The event ”A and B”, is denoted by A ∩ B. For example, if A and
B are the events defined above, then A ∩ B is the event: ”the first
toss results in heads and the second toss results in tails”, which is
the set {HT}. Thus A ∩ B consists of all points that belong to
both A and B.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
A∩B
●
●
●
●
●
●
●
●
●
●
●
●
A
●
●
B
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Empty set
The empty set, denoted by ∅, contains no points. It is the
impossible event. For instance, if A is the event that the first toss
results in heads and C is the event that the first toss results in
tails, then A ∩ C is the event that ”the first toss results in heads
and the first toss results in tails”. It is the empty set.
If A ∩ C = ∅ we say that the events A and C are mutually
exclusive. That means there are no sample points that are
common to A and C. The events A and C in the last paragraph
are mutually exclusive.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Complement
The event that ”A does not occur” is called the complement of A
and is denoted by Ac . It consists of all points that are not in A. If
A is the event that the first toss results in heads, then Ac is the
event that the first toss does not result in heads. It is the set:
{TH, TT}.
Note that A ∪ Ac = S and A ∩ Ac = ∅.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Ac
●
●
●
●
●
●
●
●
●
●
●
●
A
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A survey is made of a population to find out how many of them
own a home, how many own a car and how many are married. Let
H, C and M stand respectively for the events, owning a home,
owning a car and being married. What do the following symbols
represent?
1. H ∩ Mc .
2. (H ∪ M)c .
3. Hc ∩ Mc .
4. (H ∪ M) ∩ C.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A person who is 40 years old now will die before reaching age 120.
The person could die at any time during the 80 years. So, if the
outcome (sample point) is time of death, the sample space is the
interval (0, 80). Determine the intervals that correspond to the
following events:
1. The person lives past the age of 65 and dies before turning 90.
2. The person survives to age 70.
3. The person lives past the age of 65 but dies before turning 90
or the person lives beyond the age of 85.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let us denote the time of death (in years from now) by T .
1. This event corresponds to 25 < T < 50 or the interval (25, 50).
2. This corresponds to T > 30 or the interval (30, 80).
3. This corresponds to 25 < T < 50 or T > 45, that is
(25, 50) ∪ (45, 80) = (25, 80).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The lifetime of a computer is less than 5 years. The lifetime of a
printer is less than 8 years. Each outcome is a pair of numbers
corresponding to the moments of breakdown of these machines.
What is the sample space? Determine the set that corresponds to
each of the following events.
1. The printer survives 5 years.
2. The computer outlives the printer.
3. The printer outlives the computer, but breaks down within a
year after the computer breaks down.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
See Figures 1, 2, and 3. If x stands for the time that the computer
breaks down and y for the time that the printer breaks down, then
each sample point is described by an ordered pair of numbers
(x, y ). x can be any number between 0 and 5 and y can be any
number between 0 and 8. So the sample space consists of all
points (x, y ) inside the rectangle 0 < x < 5, 0 < y < 8.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (cont.)
1. The event that the printer survives 5 years corresponds to
y > 5. This is the shaded region in the first figure.
2. The event that the computer outlives the printer corresponds to
the set of all points x > y , that is, all the points below the line
x = y . It is the shaded region shown in the second figure.
3. The printer outlives the computer means y > x. It breaks down
within a year after the computer breaks down means that
y < x + 1. So the event is represented by the region that lies
between the lines x = y and y = x + 1, which is shown in the last
figure.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
0
2
y
4
6
8
Figure 1 (y > 5)
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
2
4
6
8
x
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
0
2
y
4
6
8
Figure 2 (x > y )
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
2
4
6
8
x
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
0
2
y
4
6
8
Figure 3
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
2
4
6
8
x
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
An auto insurance company classifies each policyholder as i) young
or old; ii) male or female; and iii) married or single.
of these policyholders, 30% are young, 46% are male, and 70% are
married. The policyholders can also be classified as 13.2% young
males, 30.1% married males, and 14% young married persons.
Finally, 6% of the policyholders are young married males. What
proportion of the company’s policyholders are young, female, and
single?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
You can solve this with an elementary argument. Imagine that
there are 10000 people. (You may use any number you want.
10000 just turns out to be convenient for this calculation). We are
given that out of these 10, 000 people 30% or 3000 are young. Of
these, 1320 are young males. So the number of young females is
3000 − 1320 = 1680. We are also given that there are 1400 young
married people and 600 are young, married males. So the number
of young married females is 1400 − 600 = 800. Since the total
number of young females is 1680, the number of single young
females is 1680 − 800 = 880. The proportion is 880/10000.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
By now it must be clear that the population we considered in this
problem can be thought of as a sample space, the set of people
with a certain characteristic corresponds to an event and we assign
a proportion to each event.
The proportion that we assign to each event in a sample space is
called the probability of that event. For example if 70% of a
population own a car, we say that if we choose a person at random
form that population, the probability that that person owns a car is
0.70. We now give a formal definition of probability.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Definition
Let S be the sample space. For each event A there is a number
P(A), called the probability of the event A, with the following
properties:
1. 0 ≤ P(A) ≤ 1.
2. P(S) = 1 and
3. If A1 , A2 , ... are mutually exclusive, then
P(A1 ∪ A2 ∪ ...) = P(A1 ) + P(A2 ) + ...
There can be infinitely many A0i s.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
For the data in the last Example, calculate the probability that a
randomly chosen person is young or male or married.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let us denote ”young” by A, ”male” by B and ”married” by C.
Then P(A) = 0.3, P(B) = 0.46, P(C ) = 0.7, P(A ∩ B) = 0.132,
P(B ∩ C ) = 0.301, P(C ∩ A) = 0.14 and P(A ∩ B ∩ C ) = 0.06.
The proportion that is young or male or married is
P(A∪B ∪C ) = 0.3+0.46+0.7−0.132−0.301−0.14+0.06 = 0.947.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Verify the following:
1. (A ∩ B)c = Ac ∪ B c .
2. (A ∪ B)c = Ac ∩ B c .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (1)
1. A ∩ B consists of all points that are common to both A and B.
A point is in (A ∩ B)c means it is not in both A and B. That
means it is at least not in one of the sets, A, B. That is so if and
only if it is in Ac or in B c . Therefore
(A ∩ B)c = Ac ∪ B c
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (2)
2. Applying result 1 to Ac and B c
(Ac ∩ B c )c = (Ac )c ∪ (B c )c = A ∪ B
Taking complements on both sides of last equation
Ac ∩ B c = (A ∪ B)c .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Over a given day,
The probability that the price of Stock A will go up 0.3.
The probability that the price of Stock B will not go up is 0.6.
The probability that the price neither stock will go up is 0.5.
Calculate the probability that the prices of both stocks will go up.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let A denote the event that the price of stock A goes up and B
that the price of stock B goes up. P(A) = 0.3,
P(B) = 1 − P(B c ) = 1 − 0.6 = 0.4;
P(A ∪ B) = 1 − P(Ac ∩ B c ) = 1 − 0.5 = 0.5. Since
P(A ∪ B) = P(A) + P(B) − P(A ∩ B), 0.5 = 0.3 + 0.4 − P(A ∩ B)
and P(A ∪ B) = 0.2.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
The probability that a visit to a primary care physician’s (PCP)
office results in neither lab work nor referral to a specialist is 35%.
Of those coming to a PCP’s office, 30% are referred to specialists
and 40% require lab work. Determine the probability that a visit to
a PCP’s office results in both lab work and referral to a specialist.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let L stand for lab work and S for referral to a specialist. We are
given that P(Lc ∩ S c ) = 0.35, P(S) = 0.3 and P(L) = 0.4. We are
asked to find P(L ∪ S).
First note that Lc ∩ S c = (L ∪ S)c and therefore
P(L ∪ S) = P ((Lc ∪ S c )c ) = 1 − P(Lc ∩ S c ) = 1 − 0.35 = 0.65.
Second, use the fact that P(L ∪ S) = P(L) + P(S) − P(L ∩ S)
which gives 0.65 = 0.4 + 0.3 − P(L ∩ S) and P(L ∩ S) = 0.05.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
You are given P(A ∪ B) = 0.7 and P(A ∪ Bc ) = 0.9. Determine
P(A).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) and
P(A ∪ B c ) = P(A) + P(B c ) − P(A ∩ B c ). Adding the two
equations and noting that P(A ∩ B) + P(A ∩ B c ) = P(A), and
that P(B) + P(B c ) = 1, we get
0.7 + 0.9 = 2P(A) + 1 − P(A) = P(A) + 1
and therefore P(A) = 0.6.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Among a large group of patients recovering from shoulder injuries,
it is found that 22% visit both a physical therapist an a
chiropractor, whereas 12% visit neither of these. The probability
that a patient visits a chiropractor exceeds by 0.14 the probability
that a patient visits a physical therapist. Determine the probability
that a randomly chosen member of this group visits a physical
therapist.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let T stand for visit to a physical therapist and C for visit to a
chiropractor. We are given that P(T ∩ C ) = 0.22,
P ((T ∪ C )c ) = 0.12 and P(C ) = 0.14 + P(T ). We need P(T ).
Since P ((T ∪ C )c ) = 0.12, P(T ∪ C ) = 1 − 0.12 = 0.88. Recall
that P(T ∪ C ) = P(T ) + P(C ) − P(T ∩ C ). Hence
0.88 = P(T ) + (P(T ) + 0.14) − 0.22
0.88 = 2P(T ) − 0.08
P(T ) =
Al Nosedal. University of Toronto.
0.96
= 0.48
2
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
A survey of a group’s viewing habits over the last year revealed the
following information:
28% watched gymnastics
29% watched baseball
19% watched soccer
14% watched gymnastics and baseball
12% watched baseball and soccer
10% watched gymnastics and soccer
8% watched all three sports
Calculate the percentage of the group that watched none of the
three sports during the last year.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Since G c ∩ B c ∩ S c = (G ∪ B ∪ S)c ,
P(G c ∩ B c ∩ S c ) = 1 − P(G ∪ B ∪ S)
= 1 − P(G ) − P(B) − P(S) + P(G ∩ B) + P(B ∩ S) + P(G ∩ S) −
P(G ∩ B ∩ S)
= 1 − 0.28 − 0.29 − 0.19 + 0.14 + 0.12 + 0.10 − 0.08 = 0.52
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Conditional Probability
This is one of the most important concepts in Probability. To
illustrate it, let us look at an example.
A blood test indicates the presence of a particular disease 95% of
the time when the disease is actually present. The same test
indicates the presence of the disease 0.5% of the time when the
disease is not present. One percent of the population actually has
the disease. Calculate the probability that a person has the disease
given that the test indicates the presence of the disease.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Definition
Let A and B be events. If P(A) 6= 0, we define the conditional
probability of the event B given A as
P(B|A) =
Al Nosedal. University of Toronto.
P(B ∩ A)
P(A)
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
You are given the following table for a loss:
Amount of Loss
0
1
2
3
4
Probability
0.4
0.3
0.1
0.1
0.1
Given that the loss amount is positive, calculate the probability
that it is more than 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let A be the event that the loss amount is positive, and B the
event that the loss amount exceeds 1. Then A ∩ B is clearly equal
to B because the loss will necessarily be positive if it exceeds 1
(i.e., B ∈ A).
The probability that the claim amount is positive (event A) is
0.3 + 0.1 + 0.1 + 0.1 = 0.6 and the probability that the claim
amount is greater than 1 (event B) is 0.1 + 0.1 + 0.1 = 0.3.
The conditional probability is
P(B|A) =
P(B)
0.3
P(A ∩ B)
=
=
= 0.5
P(A)
P(A)
0.6
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
An insurance office receives claims that are of three types, Life,
Medical and Automobile. On the average 10% of the claims are
Life claims, 40% are Medical claims and the rest are Automobile
claims. A randomly chosen claim is not a Medical claim. Given
that, what is the conditional probability that it is a Life claim?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let A be the event that the claim is a Life claim and B the event
that it is not a Medical claim. P(A) = 0.1 and
P(B) = 1 − 0.4 = 0.6. Then the event A ∩ B is that it is a Life
claim and not a Medical claim. Since a Life claim is not a Medical
claim, A ∩ B is the same as the event that the claim is a life claim.
Therefore
P(A|B) =
P(A)
0.1
1
P(A ∩ B)
=
=
=
P(B)
P(B)
0.6
6
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Independence
Two events A and B are called independent if one has no effect
on the other. That means that whether A is given or not is
irrelevant to P(B), i. e., P(B|A) = P(B). It follows from the
definition of conditional independence that
P(A ∩ B) = P(A)P(B)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
In a certain population, 60% own a car, 30% own a house and
20% own a house and a car. Determine whether or not the events
that a person owns a car and that a person owns a house are
independent.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let A be the event that the person owns a car and B the event
that the person owns a house. P(A) = 0.6, P(B) = 0.3 and
P(A ∩ B) = 0.2 6= 0.18 = P(A)P(B). Hence the two events are
not independent.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A dental insurance covers three procedures: orthodontics, fillings
and extractions. During the lifetime of the policy, the probability
that the policyholder needs:
orthodontic work is 1/2
orthodontic work or a filling is 2/3
orthodontic work or an extraction is 3/4
a filling and an extraction 1/8.
The event that the policyholder needs orthodontic work is
independent of the need for either a filling or an extraction.
Calculate the probability that the policyholder will need a filling or
an extraction during the lifetime of the policy.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let O, F , and E denote the events of orthodontics, filling and
extraction respectively. Then P(O) = 1/2, P(O ∪ F ) = 2/3,
P(O ∪ E ) = 3/4 and P(F ∩ E ) = 1/8. We need P(F ∪ E ). Recall
that
P(F ∪ E ) = P(F ) + P(E ) − P(F ∩ E ) = P(F ) + P(E ) − 1/8
So we need to find P(F ) and P(E ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (cont.)
P(O ∪ F ) = P(O) + P(F ) − P(O ∩ F ) = P(O) + P(F ) − P(O)P(F )
(because of independence)
P(O ∪ F ) = 1/2 + P(F ) − (1/2)P(F ) = 1/2 + (1/2)P(F ) = 2/3
Hence
P(F ) = 1/3
P(O ∪ E ) = P(O) + P(E ) − P(O)P(E ) (because of independence)
P(O ∪ E ) = 1/2 + (1/2)P(E ) = 3/4.
Hence
P(E ) = 1/2, and
P(F ∪ E ) = (1/3) + (1/2) − (1/8) = 17/24.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Workplace accidents are categorized as minor, moderate and
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. Two accidents occur
independently in one month. Calculate the probability that neither
accident is severe and at most one is moderate.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let us denote by L1 , M1 and S1 respectively the events that the
first accident is minor (light), moderate and severe. Similarly for
the second accident denote with 2 as a subscript. Since neither
should be S and at most one should be M, the only possibilities
are L1 ∩ L2 or L1 ∩ M2 or M1 ∩ L2 . Note that these possibilities are
mutually exclusive. Since the two accidents are independent, the
required probability is
P(L1 )P(L2 ) + P(L1 )P(M2 ) + P(M1 )P(L2 )
= (0.5)(0.5) + (0.5)(0.4) + (0.4)(0.5) = 0.65
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Suppose that 80 percent of used car buyers are good credit risks.
Suppose, further, that the probability is 0.7 that an individual who
is a good credit risk has a credit card, but that this probability is
only 0.4 for a bad credit risk. Calculate the probability
a. a randomly selected car buyer has a credit card.
b. a randomly selected car buyer who has a credit card is a good
risk.
c. a randomly selected car buyer who does not have a credit card
is a good risk.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
a. A = selecting a good credit risk.
B = selecting an individual with a credit card.
P(B) = P(A)P(B|A) + P(Ac )P(B|Ac )
P(B) = (0.8)(0.7) + (0.2)(0.4) = 0.64
P(A)P(B|A)
=
b. P(A|B) = P(A∩B)
= (0.8)(0.7)
0.64
P(B) =
P(B)
c. P(A|B c ) =
P(A∩B c )
P(B c )
=
P(A)P(B c |A)
P(B c )
Al Nosedal. University of Toronto.
=
(0.8)(0.3)
0.36
7
8
=
2
3
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A local bank reviewed its credit card policy with the intention of
recalling some of its credit cards. In the past approximately 5% of
cardholders defaulted, leaving the bank unable to collect the
outstanding balance. Hence, management established a prior
probability of 0.05 that any particular cardholder will default. The
bank also found that the probability of missing a monthly payment
is 0.20% for customers who do not default. Of course, the
probability of missing a monthly payment for those who default is
1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example (cont.)
a. Given that a customer missed one or more monthly payments,
compute the posterior probability that the customer will default.
b. The bank would like to recall its card if the probability that a
customer will default is greater than 0.20. Should the bank recall
its card if the customer misses a monthly payment? Why or why
not?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
D = Default, D c = customer doesn’t default, M = missed
payment.
P(D∩M)
a. P(D|M) = P(D∩M)
P(M) = P(D∩M)+P(D c ∩M) .
P(D) = 0.05 P(D c ) = 0.95 P(M|D c ) = 0.20 P(M|D) = 1
(0.05)(1)
P(D|M) = (0.05)(1)+(0.95)(0.20)
= 0.2083
b. Yes, the bank should recall its card if the customer misses a
monthly payment.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Law of Total Probability
Suppose that A1 , A2 , ..., Ak are
Mutually exclusive events and
A1 ∪ A2 ∪ ... ∪ Ak = S, the whole sample space.
Let B be an event. Then
P(B) = P(B ∩ A1 ) + P(B ∩ A2 ) + ... + P(B ∩ Ak ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Law of Total Probability (cont.)
There is another way that we can write this. Since
P(B ∩ Ai ) = P(B|Ai )P(Ai ),
P(B) = P(B|A1 )P(A1 ) + P(B|A2 )P(A2 ) + ... + P(B|Ak )P(Ak ).
The above result is known as the Law of Total Probability.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Bayes’ Theorem
P(A1 |B) =
P(A1 )P(B|A1 )
P(A1 )P(B|A1 ) + P(A2 )P(B|A2 )
P(A2 |B) =
P(A2 )P(B|A2 )
P(A1 )P(B|A1 ) + P(A2 )P(B|A2 )
where A1 ∪ A2 = S and A1 ∩ A2 = ∅.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Bayes’ Theorem
Quite generally, suppose that A1 , A2 , ..., Ak are mutually exclusive
events
and their union is the whole sample space, i. e.,
Pk
j=1 P(Aj ) = 1, and B is an event with P(B) > 0. Then
P(Ai |B) =
Ai ∩ B
P(B|Ai )P(Ai )
.
= Pk
P(B)
j=1 P(B|Aj )P(Aj )
This is also known as Bayes’ formula.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
An insurance company classifies drivers as High Risk, Standard and
Preferred. 10% of the drivers in a population are High Risk, 60%
are Standard and the rest are preferred. The probability of accident
during a period is 0.3 for a High Risk driver, 0.2 for a Standard
driver and 0.1 for a preferred driver.
1. Given that a person chosen at random had an accident during
this period, find the probability that the person is Standard.
2. Given that a person chosen at random has not had an accident
during this period, find the probability that the person is High Risk.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let H, S, P and A stand for High-Risk, Standard, Preferred and
Accident and W stand for H, S or P.
X
Pr (W ) Pr (A|W ) Pr (A ∩ W ) = Pr (A|W )Pr (W )
H
0.10
0.30
0.03
S
0.60
0.20
0.12
P
0.30
0.10
0.03
Total
1
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (1)
1. From Bayes’ Formula, taking the figures from the table,
Pr (S|A) =
Pr (A|S)Pr (S)
Pr (A|S)Pr (S) + Pr (A|H)Pr (H) + Pr (A|P)Pr (P)
Pr (S|A) =
Al Nosedal. University of Toronto.
0.12
2
=
0.18
3
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (2)
2. For the second part, note that Pr (Ac |W ) = 1 − Pr (A|W ). This
is because if a fraction of p amongst W get into an accident, then
the fraction 1 − p of W does not get into an accident. You can
draw another table or observe that
Pr (H|Ac ) =
(1 − 0.3)(0.1)
0.07
7
Pr (Ac |H)Pr (H)
=
=
= .
c
Pr (A )
1 − 0.18
0.82
82
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Ten percent of a company’s life insurance policyholders are
smokers. The rest are nonsmokers. For each nonsmoker, the
probability of dying during the year is 0.01. For each smoker, the
probability of dying during the year is 0.05. Given that a
policyholder has died, what is the probability that the policyholder
was a smoker?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let S = smoker, N = Nonsmoker, D = Dying, and Ω = sample
space.
Note that S ∪ N = Ω and S ∩ N = ∅. We also have that
P(S) = 0.10, P(N) = 0.90, P(D|N) = 0.01, and P(D|S) = 0.05.
P(S|D) =
P(D|S)P(S)
P(S ∩ D
=
P(D)
P(D|S)P(S) + P(D|N)P(N)
P(S|D) =
(0.05)(0.10)
5
=
(0.05)(0.10) + (0.01)(0.90)
14
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An actuary studying the insurance preferences of automobile
owners makes the following conclusions:
An automobile owner is twice as likely to purchase collision
coverage as disability coverage.
The event that an automobile owner purchases collision
coverage is independent of the event that he or she purchases
disability coverage.
The probability that an automobile owner purchases both
collision and disability coverages is 0.15.
What is the probability that an automobile owner purchases
neither collision nor disability coverage?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let C stand for purchase of collision coverage and D for
purchasing disability coverage. Then we are given that
P(C ) = 2P(D), C and D are independent and
P(C ∩ D) = P(C )P(D) = 0.15 (because of independence). This
2
2
implies that
√ 2P (D) = 0.15, i. e.√ P (D) = 0.075 (or c
P(D) = 0.075) and P(C ) = 2 0.075. We need P(C ∩ D c ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (cont.)
P(C c ∩ D c ) = P((C ∪ D)c ) = 1 − P(C ∪ D)
= 1 − P(C ) − P(D) + P(C ∩ D)
√
√
= 1 − 2 0.075 − 0.075 + 0.15 = 0.3284162
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
The probability that a randomly chosen male has a circulation
problem is 0.25. Males who have a circulation problem are twice as
likely to be smokers as those who do not have a circulation
problem. What is the conditional probability that a male has a
circulation problem, given that he is a smoker?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let C stand for circulation problem and S for smoker. We are
given that P(C ) = 0.25, and that P(S|C ) = 2P(S|C c ). We need
to find P(C |S).
P(C |S) =
P(C |S) =
P(S|C )P(C )
P(S|C )P(C ) + P(S|C c )P(C c )
P(S|C )(0.25)
= 0.4.
P(S|C )(0.25) + (1/2)P(S|C )(0.75)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An actuary studied the likelihood that different types of drivers
would be involved in at least one collision during any one-year
period. The results of the study are presented below.
Type of
driver
Teen
Young adult
Midlife
Senior
Total
Percentage of
all drivers
8%
16%
45%
31%
100%
Probability of at
least one collision
0.15
0.08
0.04
0.05
Given that a driver has been involved in at least one collision in the
past year, what is the probability that the driver is a young adult
driver?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Y = Young adult and C = collision. We have that
P(C |Y )P(Y ) = (0.16)(0.08), P(C |T )P(T ) = 0.08)(0.15),
P(C |M)P(M) = (0.45)(0.04) and P(C |S)P(S) = (0.31)(0.05).
P(Y |C ) =
(0.16)(0.08)
(0.16)(0.08) + (0.08)(0.15) + (0.45)(0.04) + (0.31)(0.05)
P(Y |C ) = 0.21955
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Upon arrival at a hospital’s emergency room, patients are
categorized according to their condition as critical, serious, or
stable. In the past year:
10% of the emergency room patients were critical;
30% of the emergency room patients were serious;
the rest of the emergency room patients were stable;
40% of the critical patients died;
10% of the serious patients died;
1% of the stable patients died;
Given that a patient survived, what is the probability that the
patient was categorized as serious upon arrival? (0.2922)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Random variables
Imagine the following simple situation. A loss is covered by an
insurance policy. The probability that a claim is made on this
policy is 0.45 and the probability that a claim is not made is 0.55.
There are two points in the sample space, namely a claim is made
and a claim is not made. We have assigned a probability of 0.45
with the first outcome and a probability of 0.55 with the second.
You can readily see that this situation is mathematically identical
to the following one and many others like it. You have a biased
coin. If you toss this coin the chances of heads is 0.45. There are
two outcomes. You have assigned a probability of 0.45 to heads
and 0.55 to tails.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Random variables (cont.)
It is rather clumsy to have to write out in words what the outcome
is. Instead we can unify all such situations with exactly two
outcomes by assigning the number 0 for one of the outcomes and
the number 1 for the other. We can use a symbol X and say that
X = 0 will correspond to the outcome that a claim is not made
(toss results in tails) and X = 1 will correspond to the outcome
that a claim is made (toss results in heads). Then we write
P(X = 1) = 0.45
P(X = 0) = 0.55
The entity X is called a random variable. A random variable
associates a unique number with every outcome.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
(1)
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
If a die is thrown and the number on the face up is observed, then
the outcomes are the integers 1, 2, 3, 4, 5 and 6. Then we can
define a random variable, X, such that its value is the outcome. If
we assign the same probability for each outcome, then
P(X = k) = 1/6;
Al Nosedal. University of Toronto.
k = 1, 2, 3, 4, 5, 6
STA 256: Statistics and Probability I
(2)
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Probability Function
Observe that in each of the cases that lead to equations 1 and 2,
we defined a random variable and a probability for each value that
the random variable assumes. That is, we have defined a function
that associates with each value of X a unique number, that is a
probability. Such a function is called the Probability Function of
the random variable. You can also see that in each case the sum of
all the probabilities equals 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A random loss, X, has the following probability function:
x
0
100
200
400
1000
P(X = x)
0.2
0.3
0.3
0.1
0.1
(You can verify that the probabilities add up to 1.)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example (cont.)
1. Calculate the probability that loss is at least 85.
2. Given that the loss exceeds 85, calculate the conditional
probability that it is at most 400.
3. Given that the loss is at most 400, calculate the conditional
probability that it is at most 100.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 1.
1. Since there are no losses between 85 and 100.
P(X ≥ 85) = P(X = 100) + P(X = 200) + P(X = 400)
+P(X = 1000) = 0.3 + 0.3 + 0.1 + 0.1 = 0.8.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 2.
2. P(X ≤ 400|X > 85) =
P(85<X ≤400)
P(X >85)
=
P(100≤X ≤400)
P(X ≥100)
=
0.3+0.3+0.1
1−0.2
Al Nosedal. University of Toronto.
=
7
8
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 3.
3. P(X ≤ 100|X ≤ 400) =
=
P(X ≤100)
P(X ≤400)
0.2+0.3
1−0.1
=
Al Nosedal. University of Toronto.
5
9
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Using the previous example, find an expression for the function
F(x) = P(X ≤ x).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
If x < 0, then F (x) = P(X ≤ x) = 0 because X does not assume
negative values.
If 0 ≤ x < 100, then there is exactly one loss to the amount of 0 in
the interval (−∞, x]. Therefore,
F (x) = P(X ≤ x) = P(X = 0) = 0.2.
If 100 ≤ x < 200, then there are exactly two losses in the interval
(−∞, x], one in the amount of 0 and the other 100. Therefore,
F (x) = P(X ≤ x) = P(X = 0) + P(X = 100) = 0.5.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (cont.)
Similarly, if 200 ≤ x < 400, then
F (x) = P(X ≤ x) = P(X = 0)+P(X = 100)+P(X = 200) = 0.8.
If 400 ≤ x < 1000, then F (x) = P(X ≤ x) = P(X = 0) + P(X =
100) + P(X = 200) + P(X = 400) = 0.9.
If 1000 ≤ x < ∞, then all the losses are in the interval (−∞, x]
and so the sum of their probabilities has to be 1.
F (x) = P(X ≤ x) = P(X = 0) + P(X = 100) + P(X =
200) + P(X = 400) + P(X = 1000) = 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution (cont.)

0
−∞ < x < 0




0.2
0 ≤ x < 100



0.5 100 ≤ x < 200
F (x) =
0.8 200 ≤ x < 400





0.9 400 ≤ x < 1000


1.0 1000 ≤ x < ∞
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Cumulative Distribution Function (CDF)
The function
F(x) = P(X ≤ x)
is called the Cumulative Distribution Function (CDF) of the
random variable X.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Continuous Random Variable
A random variable X is called a continuous random variable if
there is a nonnegative function f(x) such that
Z x
F(x) = P(X ≤ x) =
f(y)dy
−∞
More generally, for any set of real numbers A,
Z
P(X is in A) =
f(x)dx
A
In that case f is called the Probability Density Function (PDF)
or the Density Function of X.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The PDF of the random variable, X is f(x) = cx2 for 0 < x < 1
and 0 elsewhere (c is constant).
1. Calculate c.
2. Find the CDF.
3. Calculate P(0.25 < X < 0.5|X > 0.25).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 1
1. Since the PDF should integrate to 1,
Z
1
cx 2 dx =
0
c
=1
3
Hence, c = 3.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 2
2.

x <0
 0
x3 0 ≤ x < 1
F (x) =
f (y )dy =

−∞
1
x ≥1
Z
x
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution 3
3.
P(0.25 < X < 0.5|x > 0.25) =
F (0.5) − F (0.25)
P(0.25 < X < 0.5)
=
P(X > 0.25)
1 − F (0.25)
P(0.25 < X < 0.5|x > 0.25) =
Al Nosedal. University of Toronto.
(0.5)3 − (0.25)3
1
=
1 − (0.25)3
9
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Let T denote the future lifetime (in years) of a newborn child.
Suppose that the PDF of T is given by f(t) = 0 for t ≤ 0 and
f(t) = a exp−ct , t > 0, where a and c are constants.
1. Determine a in terms of c.
2. Find the CDF of T.
3. Given that the newborn survives to age y, determine the
conditional probability that the person will live z more years.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let us determine a. We do that by using the fact that the PDF
should integrate to 1. This requirement also implies that c > 0.
Otherwise the integral will not exist.
Z ∞
a
a exp−cx dx = = 1.
c
0
Therefore a = c.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
It follows that
Z
F (t) = P(T ≤ t) = c
t
exp−cu du = 1 − exp−ct
0
and
P(T > t) = 1 − F (t) = exp−ct .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
The event that the newborn has survived to age y is the same as
T > y and the event that the person will survive z more years is
the same as T > y + z.
P(T > y + z|T > y ) =
1 − F (y + z)
P(T > y + z)
=
P(T > y )
1 − F (y )
P(T > y + z|T > y ) =
exp−c(y +z)
= exp−cz .
exp−cy
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Mixed distributions
Example. A loss X has the PDF f(x) = exp−x , x > 0. An
insurance will pay the entire loss up to a maximum of 1.
Determine the distribution of the payment.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let us denote by Y the payment. Then Y = X if X ≤ 1 and
Y = 1 if X > 1. Therefore
P(X ≤ y ) 0 < y ≤ 1
P(Y ≤ y ) =
1
y > 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Note that since the maximum that the insurance will pay is 1, it is
certain that the payment is less than or equal to 1. Hence
P(Y ≤ y ) = 1 if y > 1. Since
Z y
P(X ≤ y ) =
exp−x dx = 1 − exp−y ,
0
we get the CDF of Y to be
1 − exp−y
F (y ) =
1
Al Nosedal. University of Toronto.
0<y ≤1
y > 1.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Notice that
lim F (y ) = lim (1 − exp−y ) = 1 − exp−1
y →1−
y →1−
lim F (y ) = 1.
y →1+
Thus the CDF is discontinuous at 1. The jump in the value of F at
1 is 1 − (1 − exp−1 ) = exp−1 . This is due to the fact that there is
a ”point mass” at 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Since the maximum payment is 1, Y = 1 if X > 1 and
Z ∞
P(Y = 1) = P(X > 1) =
exp−x dx = exp−1 .
1
Thus the jump in the value of F at 1 precisely equals P(Y = 1).
The distribution of Y is called mixed. It has a continuous part and
a discrete part.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
We can write the PDF as a continuous part (by differentiating the
CDF) and a discrete part as a point mass at 1.
0
f (y ) = F (y ) = exp−y , 0 < y < 1; P(Y = 1) = exp−1 .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Let the CDF of X be:
F (x) =











0
x2
4
3+x
16
1
2
1
x < 0,
0≤x <1
1≤x <2
2≤x <5
x ≥ 5.
Find P(X = 1), P(X = 2), P(X = 4) and P(X = 5).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Check the limits:
limy →1− F (x) = 12 /4 = 1/4
limy →1+ F (x) = (3 + 1)/16 = 1/4
limy →2− F (x) = (3 + 2)/16 = 5/16
limy →2+ F (x) = 1/2
limy →4− F (x) = limy →4− F (x) = 1/2
limy →5− F (x) = 1/2
limy →5+ F (x) = 1
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
There are discontinuities only at the points 2 and 5, with
respective jumps 3/16 and 1/2. Therefore
P(X = 1) = 0; P(X = 2) = 3/16; P(X = 4) = 0; P(X = 5) = 1/2.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Percentiles and mode
If X is a continuous random variable and 0 < p < 1, then the
100p-th percentile of the distribution of X is the number xp such
that P(X ≤ xp ) = p.
The 50-th percentile is called the median.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
If the PDF of X is f(x) = c exp−cx , x > 0, find the 100p-th
percentile.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
We need xp such that
Z
xp
P(X ≤ xp ) = F (xp ) =
c exp−cx dx = 1 − exp−cxp = p
0
or
xp = −(1/c)ln(1 − p).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Functions of a random variable
Let X be a random variable with a given distribution and let
Y = u(X) be another random variable defined by the given
function u. How does one find the distribution of Y?
The general way of doing this is by noting that
FY (y) = P(Y ≤ y) = P(u(X) ≤ y) = P(A),
where A is the set of all points x such that u(x) ≤ y. The last can
be, in principle, found from the distribution of X.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The PDF of X is f(x) = exp−x , x > 0. Let Y =
PDF of Y.
Al Nosedal. University of Toronto.
√
X. Find the
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
√
FY (y ) = P(Y ≤ y ) = P( X ≤ y ) = P(X ≤ y 2 )
R y2
2
= 0 exp−x dx = 1 − exp−y .
0
2
2
fY (y ) = FY (y ) = [1 − exp−y ]0 = 2y exp−y .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
f(x) = 1/4, −2 < x < 2. If Y = X2 , find the PDF of Y.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
P(Y ≤ y ) = P(X 2 ≤ y ). Now you have to be careful. Note that
Y ≥ 0 since it is a square. As X takes values from −2 to 2, Y will
√
take values between 0 and 4. X 2 ≤ y implies that |X | ≤ y or
√
√
− y ≤ X ≤ y.
Therefore
R √y
√
√
√
FY (y ) = P(− y < X < y ) = −√y (1/4)dx = (1/2) y ,
0 < y < 4.
Differentiating, we get
fY (y ) = (1/4)y −1/2 ; 0 < y < 4.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
This year’s loss has a PDF f(x) = 0.5 exp−0.5x , x > 0. Because of
inflation, next year the loss will increase by 10%. Find the PDF of
the next year’s loss.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
If X is the loss this year and Y the loss next year then
Y = u(X ) = 1.1X . Then
y
FY (y ) = P(Y ≤ y ) = P(1.1X ≤ y ) = P(X ≤ 1.1
)
R y /1.1
−0.5x
−0.5y
/1.1
= 0.5 0
exp
dx = 1 − exp
.
Therefore the PDF is
0.5
0.5
−0.5y /1.1 0
fY (y ) = [1 − exp
] =
exp−( 1.1 )y , y > 0
1.1
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
A random loss, X, has the PDF f (x) = exp−x , x > 0. an
insurance will pay the excess of a deductible 1. That means if the
loss is less than or equal to 1, the insurance will pay nothing. If the
loss exceeds 1, the insurance will pay the excess of X over 1. That
is, if Y is the payment, then
0
if X ≤ 1
Y =
X − 1 if X > 1.
Find the Probability Function of Y.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Note that there is a point mass at 0. For there will be no payment
if X ≤ 1.
1
Z
P(Y = 0) = P(X ≤ 1) =
exp−x dx = 1 − exp−1 .
0
Then for y > 0,
FY (y ) = P(Y ≤ y ) = P(X − 1 ≤ y ) = P(X ≤ y + 1)
Z
=
y +1
exp−x dx = 1 − exp−y −1 .
0
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Thus the PDF of Y is written as
0
fY (y ) = FY (y ) = exp−y −1 , y > 0,
P(Y = 0) = 1 − exp−1 .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
2
A random loss, X, has the PDF f (x) = x9 , 0 < x < 3 and 0
otherwise. An insurance will pay the entire loss up to a maximum
of 2. Find the Probability Function of the payment.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
If Y is the payment, then Y is the smallest of X and 2. That is
X 0≤X ≤2
Y =
2
X > 2.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Again note that there is a point
R 3 mass at 2.
P(Y = 2) = P(X > 2) = 19 2 x 2 dx = 19
27 .
If y < 2, then Y = X and
Ry
y3
FY (y ) = P(Y ≤ y ) = 0 x 2 dx = 27
.
Differentiating we get
2
fY (y ) = y9 , 0 < y < 2
19
P(Y = 2) = 27
.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
The PDF of a loss is f (x) = exp−x , x > 0. An insurance will pay
the entire loss up to a maximum of 2. Determine the PDF of the
payment.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
Let Y be the payment. Then
R y Y = X if X ≤ 2. So if y < 2, then
P(Y ≤ y ) = P(X ≤ y ) = 0 exp−x dx = 1 − exp−y . If y ≥ 2, then
P(Y ≤ y ) = 1 since the maximum value that Y can assume is 2.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
FY (y ) =
1 − exp−y
1
0≤y <2
y ≥ 2.
fY (y ) = exp−y , 0 < y < 2,
R∞
P(Y = 2) = P(X > 2) = 2 exp−x dx = exp−2
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
The PDF of X is f (x) = c exp−c(x−1) if x > 1 and 0 otherwise. If
Y = 1/X , find the PDF of Y .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
When x = 1, y = 1 and as x → ∞, y → 0. Therefore for
0 < y < 1,
R∞
P(Y ≤ y ) = P( X1 ≤ y ) = P(X ≥ y1 ) = c 1/y exp−c(x−1) dx =
exp−c(1/y −1) .
Therefore the pdf is
0
fY (y ) = [exp−c(1/y −1) ] =
Al Nosedal. University of Toronto.
c
y2
exp−c(1/y −1) , 0 < y < 1.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An insurance policy reimburses dental expense, X, up to a
maximum benefit of 250. The probability density function for X is
f (x) = c exp−0.004x , x ≥ 0 and 0 if x < 0. Calculate the median
benefit for this policy.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
The CDF of X is
Z x
c F (x) = c
(1 − exp−0.004x ).
exp−0.004t dt =
0.004
0
Since F (∞) = 1, c = 0.004 and F (x) = 1 − exp−0.004x . If
payment is Y , then FY (y ) = 1 − exp−0.004y if y < 250 and 1 if
y ≥ 250. If the median m is less than 250, then it is given by
1 − exp−0.004m = 1/2, orm = 250ln(2) ≈ 173
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
The lifetime of a machine part has a continuous distribution on the
interval (0, 40) with probability density function f (x) proportional
1
to (10+x)
2 . Calculate the probability that the lifetime of the
machine part is less than 6.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Solution
First find the constant.
R 40
c 0 (10 + x)−2 dx = c
1
10
−
1
50
= 1.
This gives c = 12.5. Hence
R6
F (6) = 12.5 0 (10 + x)−2 dx = (12.5)
Al Nosedal. University of Toronto.
1
10
−
1
16
= 0.46875.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Definition
Let X be a random variable with Probability Function f (x) and
u(X ) a function of X . We define the Expected value or
Expectation of u(X ) as
E [u(X )] =
X
u(x)f (x)
if X is discrete,
x=xi
Z
∞
E [u(X )] =
u(x)f (x)dx
if X is continuous,
−∞
Z
E [u(X )] =
u(x)f (x)dx +
A
X
u(x)f (x)
x=xi
if the distribution is mixed, where A is the set of points where X is
continuous and xi ’s the points where X is discrete.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Let the probability function of X be:
f (−1) = 1/4; f (0) = 1/4; f (1) = 1/4; f (2) = 1/8; f (3) = 1/8.
Calculate E (X ) and E (exptX ), where t is a constant.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Let the PDF of X be f (x) = c exp−cx (x > 0, c a positive
constant). Calculate E (X ) and E (exptX ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The CDF of X is

 0
x/3
F (x) =

1
if x < 0
if 0 ≤ x < 2
x ≥ 2.
Calculate E (X ) and E (X 2 ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Moments, mean and variance of a random variable
The n-th moment of a random variable X is E (X n ).
The first moment, E (X ), is called the mean of the expected
value of X .
The n-th central moment of X is defined as E ({X − E (X )}n ).
The second central moment of X is called the variance of X and
is denoted by Var (X ).
Var (X ) = E ({X − E (X )}2 ).
Note that, since the variance is the expected value of a
square, it cannot be negative.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Standard deviation and coefficient of variation
We define the standard deviation (SD) and the coefficient of
variation (CV) as
SD(X ) =
CV (X ) =
p
Var (X )
SD(X )
, E (X ) 6= 0.
E (X )
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The Probability Function of X is P(X = −c) = P(X = c) = 1/4,
c > 2; P(X = 2) = 1/2. Calculate the coefficient of variation of
X.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Linearity of the expected value
If a and b are constants, then
E [au(X ) + bv (X )] = aE [u(X )] + bE [v (X )].
In particular,
E [aX + b] = aE [X ] + b.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
An alternative expression for the variance
Var (X ) = E ({X − E (X )}2 ) = E [X 2 − 2XE (X ) + {E (X )}2 ]
= E (X 2 ) − 2E (X )E (X ) + {E (X )}2
= E (X 2 ) − {E (X )}2 .
The standard notation is µ for the mean, σ 2 for the variance and σ
for the standard deviation.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
This year company will have fixed expenses of 100. The rest of the
1
, 0 < x < 300.
expenses is a random variable with PDF f (x) = 300
Next year the fixed expenses will increase by 20% whereas the rest
of the expenses will increase by 10%. Calculate the following:
1. The expected value of the total expenses this year,
2. The variance of the total expenses this year,
3. The variance of the total expenses next year.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
The Moment Generating Function
The Moment Generating Function or MGF for short, of a
random variable X is defined by
M(t) = E [expXt ]
The motivation for this will be made clear shortly. As we
mentioned for the PDF and CDF, if we want to emphasize that
this is the MGF of X , we will write MX (t).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Find the MGFs of the following random variables:
1. P(X = 0) = q; P(X = 1) = 1 − q.
2. P(X = n) = pq n , where n = 0, 1, 2, ... and p = 1 − q.
1
for a < x < b and 0 otherwise.
3. f (x) = b−a
4. f (x) = c exp−cx , x > 0.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The MGF of a random variable X is
M(t) =
expt
1
+
.
2
2−t
Calculate Var (X ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
Suppose that X is a continuous random variable that assumes only
nonnegative values. That means the PDF f (x) is 0 for x < 0. Let
us think of X as a loss. Suppose an insurance company will pay
the entire loss up to a maximum of m. If we denote the payment
by Y , then
X
if X ≤ m
Y =
m if X > m.
In other words Y = min(X , m), meaning Y is the smaller of X and
m. One sometimes
denotes min(X , m) by X ∧ m. Show that
Rm
E (Y ) = 0 [1 − F (x)]dx.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An insurance company’s monthly claims are modeled by a
continuous, positive random variable X , whose probability density
function is proportional to (1 + x)−4 , where 0 < x < ∞.
Determine the company’s expected monthly claims. (1/2)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
A probability distribution of the claim sizes for an auto insurance
policy is given in the table below:
Claim size
20
30
40
50
60
70
80
Probability
0.15
0.10
0.05
0.20
0.10
0.10
0.30
What percentage of the claims are within one standard deviation
of the mean claim size? (45%)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An actuary determines that the claim size for a certain class of
accidents is a random variable, X , with moment generating
function MX (t) = (1 − 2500t)−4 . Determine the standard
deviation of the claim size for this class of accidents. (5000).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
A manufacturer’s annual losses follow a distribution with density
function f (x) = (2.5)(0.6)2.5 x −3.5 , x > 0.6 and 0 otherwise.
To cover its losses, the manufacturer purchases an insurance policy
with an annual deductible of 2. What is the mean of the
manufacturer’s annual losses not paid by the insurance policy?
(0.934)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Problem
An insurance company will pay the entire loss insured up to a
maximum of 20. The CDF of the loss is:
F (x) = 1 −
10
10 + x
3
.
Calculate the expected value of the payment. (40/9)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Joint distribution of discrete variables
There are situations where one might be interested in more that
one random variable. For example, an automobile insurance policy
may cover collision and liability. The loss on collision and the loss
on liability are random variables.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Let us consider two discrete random variables, say X and Y .
These ideas can be readily generalized for more than two random
variables. We can assign probabilities P(X = xi , Y = yj ) to all
possible values xi and yj that X and Y can assume. Since these
are probabilities, they have to have the following properties:
1. 0P≤P
p(xi , yj ) ≤ 1.
2.
1.
i
j p(xi , yj ) = P
P
3. P[(X , Y ) ∈ D] = (xi ,yj )∈D P(X = xi , Y = yj ) =
P
P
p(xi , yj )
(xi ,yj )∈D
where D is a discrete set of points in the plane.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Joint Probability Function
The function p(xi , yj ) is called the Joint Probability Function of
the random variables X and Y .
We can also define a Joint Cumulative Distribution Function by
F (x, y ) = P(X ≤ x, Y ≤ y )
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Marginal Probability Functions
Suppose for each fixed xi we sum the joint PF over all the possible
values of Y . Then we get the PF of X . That is
P(X = xi ) =
X
P(X = xi , Y = yj )
j
Similarly
P(Y = yj ) =
X
P(X = xi , Y = yj ).
i
These functions P(X = xi ) and P(Y = yj ) are called the Marginal
Probability Functions of X and Y respectively. The term
”marginal” refers to the fact they are the entries in the margins of
the table as illustrated by the following example.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The joint PF of X and Y is given by:
p(1,1) = 0.1
p(2,1) = 0.04
p(3,1) = 0.05
p(1,2) = 0.2
p(2,2) = 0.06
p(3,2) = 0.1
p(1,3) = 0.1
p(2,3) = 0.1
p(3,3) = 0.25
Calculate the marginal PFs of X and Y .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Joint density of continuous random variables
Once again we will consider two random variables X and Y but
which are now continuous. Analogous to the definition of
probability for a single random variable, we can define a probability
density function for these variables. So if we denote the density
function (PDF) by f (x, y ), then
Z Z
P((X , Y ) ∈ D) =
f (x, y )dA
D
and
Z
∞
Z
∞
f (x, y )dx dy = 1
−∞
−∞
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Joint Probability Density Function
The function f (x, y ) is called the Joint Probability Density
Function of the pair of random variables (X , Y ).
P(X ≤ x, Y ≤ y ) = F (x, y ) is called the joint CDF of the pair of
random variables and
Z x Z y
F (x, y ) =
f (s, t)dt ds
−∞
−∞
It follows that
∂2
F (x, y ) = f (x, y )
∂x∂y
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Marginal densities
The marginal densities fX and fY are defined in a manner similar
to the marginal PFs in the discrete case.
Z ∞
fX (x) =
f (x, y )dy
−∞
Z
∞
fY (y ) =
f (x, y )dx
−∞
These are PDFs.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
If f (x, y ) = c exp−x−2y , x > 0, y > 0 and 0 otherwise, calculate
1. c.
2. The marginal densities of X and Y .
3. P(1 < X < 2).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
For the random variables in our last example, calculate P(X < Y ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
f (x, y ) = 1/4 if 0 < x < 2 and 0 < y < 2.
What is P(X + Y < 1)?
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The joint PDF of X and Y is f (x, y ) = cx, 0 < y < x < 2 and 0
elsewhere. Find
1. c.
2. The marginal densities of X and Y .
3. P(X < 2Y ).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Conditional distributions
Let us first consider the discrete case. Let
p(x, y ) = P(X = x, Y = y ) be the joint PF of the random
variables, X and Y . Recall that the conditional probability of the
occurrence of event A given that B has occurred is
P(A|B) =
P(A ∩ B)
P(B)
If A is the event that X = x and B is the event that Y = y then
P(A) = P(X = x) = pX (x), the marginal PF of X ,
P(B) = pY (y ), the marginal PF of Y and P(A ∩ B) = p(x, y ), the
joint PF of X and Y .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Conditional distributions (discrete case)
We can then define a conditional probability function for the
probability that X = x given Y = y by
pX |Y (x|y ) = P(X = x|Y = y ) =
P(X = x, Y = y )
p(x, y )
=
P(Y = y )
pY (y )
Similarly
pY |X (y |x) = P(Y = y |X = x) =
Al Nosedal. University of Toronto.
p(x, y )
P(X = x, Y = y )
=
P(X = x)
pX (x)
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Conditional densities (continuous case)
In the continuous case we extend the same concept and define
conditional densities or conditional PDFs by
fX |Y (x|y ) =
f (x, y )
fY (y )
fY |X (y |x) =
f (x, y )
fX (x)
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The joint PF of X and Y is given by:
p(1,1) = 0.1
p(2,1) = 0.04
p(3,1) = 0.05
p(1,2) = 0.2
p(2,2) = 0.06
p(3,2) = 0.1
p(1,3) = 0.1
p(2,3) = 0.1
p(3,3) = 0.25
Find the conditional PF pX |Y (x|1).
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
If f (x, y ) = 2 exp−x−2y , x > 0, y > 0 and 0 otherwise. Find the
conditional densities, fX |Y (x|y ) and fY | X (y |x) .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
The joint PDF of X and Y is f (x, y ) = 83 x, 0 < y < x < 2 and 0
elsewhere. Calculate the conditional PDFs.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Independent random variables
In one of our examples,
f (x, y ) = 2 exp−x−2y , fX (x) = exp−x , fY (y ) = 2 exp−2y ,
and so
f (x, y ) = fX (x)fY (y ).
If the joint PF is the product of the marginal PFs we say that the
random variables are independent.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Definition
The random variables X1 , X2 , ..., Xn are said to be mutually
independent if and only if
p(x1 , x2 , ..., xn ) = pX1 (x1 )pX2 (x2 )...pXn (xn )
in the discrete case and
f (x1 , x2 , ..., xn ) = fX1 (x1 )fX2 (x2 )...fXn (xn )
in the continuous case.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Bivariate case
If X and Y are independent, then the conditional density of X
given Y = y is
fX |Y (x|y ) =
f (x, y )
fX (x)fY (y )
=
= fX (x).
fY (y )
fY (y )
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
If the joint PDF of X and Y is
1
f (x, y ) = , 0 < x < 4, 0 < y < 2, and 0 elsewhere.
8
Determine whether X and Y are independent.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Functions of Random Variables
If X and Y are random variables, then Z = g (X , Y ) is also a
random variable. For example X and Y may be random losses and
an insurance may pay the amount X + Y . In that case
g (X , Y ) = X + Y . We will often be interested in the distribution
of Z .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
Let X and Y be random variables with the joint density function
f (x, y ) = exp−(x+y ) with 0 < x < ∞ and 0 < y < ∞.
An insurance policy is written to cover the loss X + Y . Find the
probability that the loss is less than 1.
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I
Introductory Ideas
Conditional Probability and Independence
Random Variables and their distributions
Moments of a Random Variable
Multivariate Distributions
Example
For the random variables X and Y of the previous example, let
Z = max(X , Y ) and W = min(X , Y ). That is, Z is the larger of
X and Y and W is the smaller of X and Y . Find the PDFs of Z
and W .
Al Nosedal. University of Toronto.
STA 256: Statistics and Probability I