Lec5 MTH305
Lec5 MTH305
Chapter 2 Probability
2 / 28
Table of contents
4 Exercises
3 / 28
Discrete vs Continuous Probability Functions
4 Exercises
4 / 28
Discrete vs Continuous Probability Functions
Remark
The PMF of a discrete R.V is a discrete function and it’s not continuous, however a PDF of a
continuous R.V. is a continuous function.
5 / 28
Cumulative Distribution Function
4 Exercises
6 / 28
Cumulative Distribution Function
There are many problems where we may wish to compute the probability that the observed
value of a random variable X will be less than or equal to some real number x.
Definition
The Cumulative distribution function F (x) of a continuous random variable X with PDF
f (x) is: Z x
F (x) = P(X ≤ x) = f (t) − ∞ < x < ∞.
−∞
7 / 28
Cumulative Distribution Function
Example
Let, f (x) = 2x , defined for 0 ≤ x ≤ 1.
1 Find F (x) and graph it.
2 Use F(x) to compute: P(X ≤ 0.1) , P(X ≥ 0.3) , and P(0.1 ≤ X ≤ 0.3).
Solution:
1 We have
Z x Z x Z x
F (x) = P(X ≤ x) = f (t)dt = f (t)dt = 2tdt = x 2 (0 ≤ x ≤ 1).
−∞ 0 0
0
x ≤0
F (x) = x 2 0≤x ≤1
1 x ≥1
8 / 28
Cumulative Distribution Function
Example
Consider the density function
(
k (x+2)
5
0≤x ≤1
f (x) =
0 elsewhere
1 Find k .
2 Compute: P(1/4 < X < 1/2) and P(X > 1/2).
Solution:
Z +∞ Z 1 k (x + 2) k (x+2)2 1
1 We have f (x)dx = 1, then dx = 1 ⇒ 10
=1⇒
−∞ 0 5 0
1
k k
10
(32 − 2
2 ) = 1⇒ 2
= 1 ⇒ k = 2.
0 1/2 2(x + 2)
Z
2 •P(1/4 < X < 1/2) = P(1/4 < X < 1/2) = dx =
1/4 5
2 19
1/2
(x + 2)2 = .
10 80
1/4
Z 1
2(x + 2) 11
•P(X ≥ 1/2) = dx = .
1/2 5 20
9 / 28
Cumulative Function to Find Probability
4 Exercises
10 / 28
Cumulative Function to Find Probability
Properties
Let X be a discrete R.V., then:
P(x = a) = f (a).
P(X ≤ a) = F (a).
P(X < a) = P(X ≤ a − 1) = F (a − 1).
P(X > a) = 1 − P(X ≤ a) = 1 − F (a).
P(X ≥ a) = 1 − P(X < a) = 1 − P(≤ a − 1) = 1 − F (a − 1).
P(a < X ≤ b) = P(X ≤ b) − P(X ≤ a) = F (b) − F (a).
P(a ≤ X ≤ b) = P(X ≤ b) − P(X < a) = F (b) − F (a − 1).
P(a ≤ X < b) = P(X < b) − P(X < a) = F (b − 1) − F (a − 1).
P(a < X < b) = P(X < b) − P(X ≤ a) = F (b − 1) − F (a).
11 / 28
Cumulative Function to Find Probability
Properties
Let X be a continuous R.V., then:
P(X = a) = 0.
P(X ≤ a) = P(X < a) = F (a).
P(X > a) = P(X ≥ a) = 1 − P(X ≤ a) = 1 − F (a).
P(a < X ≤ b) = P(a ≤ X ≤ b) = P(a ≤ X < b) = P(a < X < b) =
F (b) − F (a).
12 / 28
Exercises
4 Exercises
13 / 28
Exercises
Exercise 1.
Classify the following random variables as discrete or continuous:
X: the number of automobile accidents per year in Virginia.
Y : the length of time to play 18 holes of golf.
M: the amount of milk produced yearly by a particular cow.
N: the number of eggs laid each month by a hen.
P: the number of building permits issued each month in a certain city.
Q: the weight of grain produced per acre.
14 / 28
Exercises
Exercise 1.
Classify the following random variables as discrete or continuous:
X: the number of automobile accidents per year in Virginia.
Y : the length of time to play 18 holes of golf.
M: the amount of milk produced yearly by a particular cow.
N: the number of eggs laid each month by a hen.
P: the number of building permits issued each month in a certain city.
Q: the weight of grain produced per acre.
Solution:
X: Discrete
Y : Continuous
M: Continuous
N: Discrete
P: Discrete
Q: Continuous
14 / 28
Exercises
Exercise 2.
An overseas shipment of 5 foreign automobiles contains 2 that have slight paint
blemishes. If an agency receives 3 of these automobiles at random, list the elements of
the sample space S, using the letters B and N for blemished and non-blemished,
respectively; then to each sample point assign a value x of the random variable X
representing the number of automobiles with paint blemishes purchased by the agency.
15 / 28
Exercises
Exercise 2.
An overseas shipment of 5 foreign automobiles contains 2 that have slight paint
blemishes. If an agency receives 3 of these automobiles at random, list the elements of
the sample space S, using the letters B and N for blemished and non-blemished,
respectively; then to each sample point assign a value x of the random variable X
representing the number of automobiles with paint blemishes purchased by the agency.
Solution:
The sample space
So
RX = {0, 1, 2}.
15 / 28
Exercises
Exercise 3.
Let W be a random variable giving the number of heads minus the number of tails in
three tosses of a coin. List the elements of the sample space S for the three tosses of
the coin and to each sample point assign a value w of W .
16 / 28
Exercises
Exercise 3.
Let W be a random variable giving the number of heads minus the number of tails in
three tosses of a coin. List the elements of the sample space S for the three tosses of
the coin and to each sample point assign a value w of W .
Solution:
The sample space
So
RW = {0 − 3, 1 − 2, 2 − 1, 3 − 0} = {−3, −1, 1, 3}.
16 / 28
Exercises
Exercise 4.
The total number of hours, measured in units of 100 hours, that a family runs a vacuum
cleaner over a period of one year is a continuous random variable X that has the density
function
x
0<x <1
f (x) = 2 − x 1 ≤ x < 2 .
0 elsewhere
Find the probability that over a period of one year, a family runs their vacuum cleaner (a)
less than 120 hours; (b) between 50 and 100 hours.
17 / 28
Exercises
Exercise 4.
The total number of hours, measured in units of 100 hours, that a family runs a vacuum
cleaner over a period of one year is a continuous random variable X that has the density
function
x
0<x <1
f (x) = 2 − x 1 ≤ x < 2 .
0 elsewhere
Find the probability that over a period of one year, a family runs their vacuum cleaner (a)
less than 120 hours; (b) between 50 and 100 hours.
Solution:
Z 1.2
(a) 120 hours taking 100 hours as a measured unit, gives 1.2, so P(X < 1.2) = f (x)dx =
−∞
1 1.2 2 2
1−0 (2 − 1.2) − (2 − 1) 0
Z Z
xdx + 2 − xdx =
− = 0.68.
0 1 2 2
(b) Between 50 and 100 hours, this means
12 − (0.5)2
Z 1 Z 1
P(0.5 < X < 1) = f (x)dx = xdx = = 0.375.
0.5 0.5 2
17 / 28
Exercises
Exercise 5.
A shipment of 7 television sets contains 2 defective sets. A hotel makes a random
purchase of 3 of the sets. If X is the number of defective sets purchased by the hotel,
find the probability distribution of X .
18 / 28
Exercises
Exercise 5.
A shipment of 7 television sets contains 2 defective sets. A hotel makes a random
purchase of 3 of the sets. If X is the number of defective sets purchased by the hotel,
find the probability distribution of X .
Solution: Here there is a selection, without repetition, of 3 sets from 7 sets in which 2
are defective. Then
RX = {0, 1, 2}.
So X here is a discrete R.V.
5C
3 10
f (0) = P(X = 0) = 7C = 35 .
3
2C 5C
1 2 = 20
f (1) = P(X = 1) = 7C 35 .
3
2C 5C
2 1 = 5
f (2) = P(X = 2) = 7C 35 .
3
x 0 1 2
Thus the probability distribution of X is: .
f (x) 10/35 20/35 5/35
18 / 28
Exercises
Find P(T = 5), P(T > 3), P(1.4 < T < 6), and P(T ≤ 5|T ≥ 2).
19 / 28
Exercises
Solution:
P(T = 5) = f (5) = F (5) − F (3) = 3/4 − 1/2 = 1/4.
P(1.4 < T < 6) = P(T < 6) − P(T ≤ 1.4) = F (5) − F (1.4) = 3/4 − 1/4 = 1/2.
P(2≤T ≤5)
P(T ≤ 5|T ≥ 2) = P(T ≥2)
20 / 28
Exercises
Exercise 7. (Important)
The waiting time, in hours, between successive speeders spotted by a radar unit is a
continuous random variable with cumulative distribution function:
(
0 x <0
F (x) =
1 − e −8x x ≥0
Find the probability of waiting less than 12 minutes between successive speeders
(a) using the cumulative distribution function of X .
(b) using the probability density function of X .
21 / 28
Exercises
Exercise 7. (Important)
The waiting time, in hours, between successive speeders spotted by a radar unit is a
continuous random variable with cumulative distribution function:
(
0 x <0
F (x) =
1 − e −8x x ≥0
Find the probability of waiting less than 12 minutes between successive speeders
(a) using the cumulative distribution function of X .
(b) using the probability density function of X .
Solution:
(a) 12 minutes, this means 12/60 = 0.2 hours. So
−8∗0.2
P(X < 0.2) = P(X ≤ 0.2) = F (0.2) ( =1−e = 0.7981.
′ 0 x <0
(b) Note that f (x) = F (x) so f (x) = So
8e −8x x ≥0
Z 0.2
−8x −8x 0.2 −8∗0.2
P(X < 0.2) = 8e dx = −e = −e − (−1) = 0.7981.
0 0
21 / 28
Exercises
Exercise 8.
Consider the density function:
( √
k x 0<x <1
f (x) =
0 elsewhere
1 Evaluate k .
2 Find F (x) and use it to evaluate P(0.3 < X < 0.6).
22 / 28
Exercises
Exercise 8.
Consider the density function:
( √
k x 0<x <1
f (x) =
0 elsewhere
1 Evaluate k .
2 Find F (x) and use it to evaluate P(0.3 < X < 0.6).
Solution:
+∞ 1 √
Z Z
1
2 3/2 2k
1 We have f (x)dx = 1, then k xdx = 1 ⇒ 3 kx =1 ⇒ 3 (1 − 0) = 1
−∞ 0 0
2k 3
⇒ 3 = 1⇒ k = 2.
x
x 3√ 3 t 3/2
Z
3/2
2 For all 0 < x < 1, F (x) = P(X ≤ x) = tdt = =x , so
0 2 2 3/2
0
0
x <0
F (x) = x 3/2 0<x <1
1 x > 1.
22 / 28
Exercises
Exercise 9.
An important factor in solid missile fuel is the particle size distribution. Significant
problems occur if the particle sizes are too large. From production data in the past, it has
been determined that the particle size (in micrometers) distribution is characterized by
(
3x −4 x >1
f (x) =
0 elsewhere
23 / 28
Exercises
Exercise 9.
An important factor in solid missile fuel is the particle size distribution. Significant
problems occur if the particle sizes are too large. From production data in the past, it has
been determined that the particle size (in micrometers) distribution is characterized by
(
3x −4 x >1
f (x) =
0 elsewhere
23 / 28
Exercises
Solution:
Z x
2 For all x < 1, F (x) = P(X ≤ x) = 0dx = 0.
−∞
For all x ≥ 1,
x
Z x 3 −3
F (x) = P(X ≤ x) = 3t −4 dt = t = −(x −3 − 1) = 1 − x −3 . so
1 −3
1
(
0 x <1
F (x) =
1 − x −3 x ≥ 1.
24 / 28
Exercises
Exercise 10.
Measurements of scientific systems are always subject to variation, some more than
others. There are many structures for measurement error, and statisticians spend a great
deal of time modeling these errors. Suppose the measurement error X of a certain
physical quantity is decided by the density function
(
k (3 − x 2 ) −1 ≤ x ≤ 1
f (x) =
0 elsewhere
1 Evaluate k that renders f (x) a valid density function.
2 Find the probability that a random measurement error is less than 1/2.
3 For this particular measurement, it is undesirable if the error (magnitude of the error (i.e., |x|))
exceeds 0.8. What is the probability that this occurs?
25 / 28
Exercises
Exercise 10.
Measurements of scientific systems are always subject to variation, some more than
others. There are many structures for measurement error, and statisticians spend a great
deal of time modeling these errors. Suppose the measurement error X of a certain
physical quantity is decided by the density function
(
k (3 − x 2 ) −1 ≤ x ≤ 1
f (x) =
0 elsewhere
1 Evaluate k that renders f (x) a valid density function.
2 Find the probability that a random measurement error is less than 1/2.
3 For this particular measurement, it is undesirable if the error (magnitude of the error (i.e., |x|))
exceeds 0.8. What is the probability that this occurs?
Solution:
Z +∞ Z 1
2 1
1 3
1 We have f (x)dx = 1, then k (3 − x )dx = 1 ⇒ k (3x − 3x ) =1 ⇒
−∞ −1 −1
h i
k (3 − 13 ) − (−3 + 13 ) = 1 ⇒ 16k3 = 1 ⇒ k = 16 .
3
25 / 28
Exercises
Solution:
1/2
Z 1/2 3 3 1 99
2 P(X < 1/2) = (3 − t 2 )dt = (3t − t 3 ) =
−1 16 16 3 128
−1
3 P(|X | > 0.8) = P(X > 0.8) + P(X < −0.8) =
Z −0.8 Z 1
3 3
(3 − t 2 )dt + (3 − t 2 )dt = 0.164.
−1 16 0.8 16
26 / 28
Exercises
Exercise 11.
The cumulative distribution function of a continuous R.V X is given by:
0
x < −5
F (x) = k (x + 5)2 −5 ≤ x < 7
1 x ≥ 7.
1
1 Show that k = 144 .
2 Determine the probability density function of x.
3 Find P(X > 4) in two methods.
4 What is the value of a so that P(X > a) = 23 .
27 / 28
Exercises
Exercise 11.
The cumulative distribution function of a continuous R.V X is given by:
0
x < −5
F (x) = k (x + 5)2 −5 ≤ x < 7
1 x ≥ 7.
1
1 Show that k = 144 .
2 Determine the probability density function of x.
3 Find P(X > 4) in two methods.
4 What is the value of a so that P(X > a) = 23 .
Solution:
1 We have F (7) = 1 and F (7) = k (7 + 5)2 = k 144 so 144k = 1 ⇒ k = 1
144 .
2 f (x) = F ′ (x) so (
1
(x + 5) −5 ≤ x < 7
f (x) = 72
0 elsewhere.
27 / 28
Exercises
1 2
3 First Method: P(X > 4) = 1 − P(X ≤ 4) = 1 − F (4) = 1 − 144 9 = 0.4375 .
Z 7 7
1 1 t2 99
Second Method: P(X > 4) = (t + 5)dt = (5t + ) = .
4 72 72 2 128
4
2
4 P(X > a) = 1 − P(X < a) = 1 − F (a) = 3
2 1 1 1
⇒ F (a) = 1 − = ⇒ (a + 5)2 = ⇒ (a + 5)2 = 48
3 3 144 3
the solutions are:
28 / 28