Professional Documents
Culture Documents
Chapter 3 Without Audio
Chapter 3 Without Audio
Chapter 3
1
Course Outline
Text Book:
Probability & Statistics for Engineers & Scientists, 9/E:
Ronald E. Walpole: Raymond H. Myers
2
Random variable (RV)
A RV is a function that associates a real number with each element in the sample space.
In an experiment a number is often
attached to each outcome. X: S R
Sample space Real
S numbers
s X(s) R
A random variable X is a function defined on S, which takes values on the real axis
Notation: In this book capital letter--e.g., X is used for random variable
and small letter x is used for specific value of random variable X.
Mapping of outcomes to RV
Exp: 3.1 Sample Space x (Number of
X= Two balls are drawn in succession without Red Balls
replacement from an urn containing 4 red balls and 3 RR 2
black balls. The possible outcomes and the values x of
the random variable X , where X is the number of red RB 1
balls, are BR 1
BB 0 3
If a sample space contains a finite number of possibilities or an unending sequence
with as many elements as there are whole numbers, it is called a discrete sample
space
4
A random variable is called a discrete random variable if its
set of possible outcomes is countable.
6
X= Two balls are drawn in succession without replacement from an urn containing 4 red balls
and 3 black balls. The possible outcomes and the values x of the random variable X , where X
is the number of red balls, are
Mapping of outcomes to RV
Sample Space x (Number of Red Balls) Probability Distribution function or
RR 2 Probability Mass Function
RB 1 x 0 1 2
BR 1 P(X=x) 1/4 2/4 1/4
BB 0
3. P X x f x 7
Let three coins are tossed in succession. Following is the mapping of outcomes to
RV (Number of heads) and its related probability mass function.
8
The cumulative distribution function F (x) of a discrete random
variable X with probability distribution f(x) is
F x P X x x 0 1 2 3
P(X=x) 1/8 3/8 3/8 1/8
f t , for x
tx
F 0 f 0 P X 0 1/ 8
F 1 f 0 f 1 P X 1 1/ 8 3 / 8 4 / 8
F 2 f 0 f 1 f 2 P X 2 1/ 8 3 / 8 3 / 8 7 / 8
F 3 f 0 f 1 f 2 f 3 P X 3 1/ 8 3 / 8 3 / 8 1/ 8 1
Cumulative distribution function CDF is always a non-decreasing function
0 x0 We can get probability mass function from
1/ 8 0 x 1
CDF using difference equation
F x 4 / 8 1 x 2 f(2)=F(2)-F(1)=7/8-4/8=3/8
7 / 8 2 x 3
1 x3 9
y=[0 0 0 1/8 4/8 7/8 1 1 1 1 1 1 1];
x=-3:1:9
stairs(x,y,'LineWidth', 2 ) 1.2
a = axis 1
ylabel('F(x)') 0.6
F(x)
0.4
0.2
-0.2
-4 -2 0 2 4 6 8 10
x
10
Example: given the distribution for shown, find the
cumulative distribution function (Rolling of a dice)
p(x)
1/6
1 2 3 4 5 6 x
x 1 2 3 4 5 6
1 1 1 1 1 1
P(X = x ) 6 6 6 6 6 6
This slides and next few slides are taken from Internet 11
P(x)
CDF 1.0
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
Therefore for
x 1 2 3 4 5 6
1 1 1 1 1 1
P(X = x ) 6 6 6 6 6 6
12
Example 2
The probability distribution for the r.v. is shown
in the table. Construct the cumulative
distribution table.
0 1 2 3 4 5 6
0.03 0.04 0.06 0.12 0.4 0.15 0.2
It is not always
possible to write a
formula
And so on. This gives us the cumulative distribution table
0 1 2 3 4 5 6
0.03 0.07 0.13 0.25 0.65 0.8 1
13
Example 3
Given the cumulative distribution function for the
discrete r.v. , find
(a)
1 2 3 4 5
(b) =P(X<=) 0.2 0.32 0.67 0.9 1
P(X=) 0.2 0.12 0.35 0.23 0.1
Solution
(a) From the table
Now
(b)
14
Practice Problem
15
Answer (a)
12 .25
1.0 16
Answer (b)
4 (3-4)/2=-.5
17
Answer (c)
c. f(x)= (x2+x+1)/25 for x=0,1,2,3
x f(x)
0 1/25
1 3/25
Doesn’t sum to 1. Thus,
2 7/25 it’s not a probability
function.
3 13/25
24/25 18
Practice Problem:
• The number of times that a person wakes up in the night is a random
variable represented by x. The probability distribution for x is:
x 1 2 3 4 5
P(x) .1 .1 .4 .3 .1
1. f x 0 , for all x R
2. f x 1
b
3. P a X b f x
a
21
Probability Density Function
22
Probability Density Function
Suppose that the error in the reaction temperature, in ◦C, for a controlled laboratory
experiment is a continuous random variable X having the probability density function
23
Probability Density Function
Suppose that the error in the reaction temperature, in ◦C, for a controlled laboratory
experiment is a continuous random variable X having the probability density function
x2
1 x 2
f x 3
(a) Verify that f(x) is a density function. 0
elsewhere
(b) Find P(0 < X ≤ 1). f x dx
1 2
f x dx f x dx f x dx
1 2
1 x2 2
0dx dx 0dx
1 3 2
2
2 x
dx
1 3
24
CDF: Example:
f ( x) 1.5 6( x 50.0) 2 for 49.5 x 50.5
f ( x) 0, elsewhere
CDF
x
F ( x) P ( X x) (1.5 6( y 50.0) 2 ) dy
49.5
3 x
1.5 y 2( y 50.0)
49.5
P( X 49.7) 0.104
26
Example: 3.13 The Department of Energy (DOE) puts projects out on bid
and generally estimates what a reasonable bid should be. Call the estimate
b. The DOE has determined that the density function of the winning (low)
bid is
Find F(y) and use it to determine the probability that the winning bid is less
than the DOE’s preliminary estimate b.
27
The Department of Energy (DOE) puts projects out on bid and generally
estimates what a reasonable bid should be. Call the estimate b. The DOE
has determined that the density function of the winning (low) bid is
Find F(y) and use it to determine the probability that the winning bid is less
than the DOE’s preliminary estimate b.
28
Problem 3.6: The shelf life, in days, for bottles of a certain prescribed medicine is a
random variable having the density function
29
Problem 3.7: 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
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.
1 2
f x x
0
dx 2 x dx
1
1 1 2
2 1
x 2
x
2 f x x
0 0
dx 2 x dx
1
2x 1
2 0 2 1 f x x 0 x 1 is same as 0 x 1
f x f 0 x for 0 x 1 f 1
30
Problem 3.12: An investment firm offers its customers municipal bonds that
mature after varying numbers of years. Given that the cumulative distribution
function of T, the number of years to maturity for a randomly selected bond, is
31
Problem 3.21: Consider the density function
32
Problem 3.29: 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
33
Practice Problems
3.1,3.5,3.6,3.7,3.9,3.12,3.21,3.30,3.33
34
Jointly Distributed Random Variables
– Discrete P ( X x, Y y ) f x, y 0
satisfying f x, y 1
x y
f ( x, y ) 0 satisfying f ( x, y)dxdy 1
– Continuous x y
x y
– Continuous F ( x, y )
w
z
f ( w, z )dzdw
35
Marginal Probability Distributions
Given the joint probability distribution f(x, y) of the discrete random variables X and Y
The probability distribution g(x) of X alone is obtained by summing f(x, y) over the
values of Y .
Similarly, the probability distribution h(y) of Y alone is obtained by summing f(x, y)
over the values of X.
We define g(x) and h(y) to be the marginal distributions of X and Y , respectively.
When X and Y are continuous random variables, summations are replaced by
integrals.
We can now make the following general definition.
37
Two ballpoint pens are selected at random from a box that contains 3 blue pens, 2
red pens, and 3 green pens. If X is the number of blue pens selected and Y is the
number of red pens selected. Following is the joint distribution of X and Y
x
f(x,y)
0 1 2
h y f x, y
x
x x
f(x,y) h(y) f(x,y)
0 1 2 0 1 2
0 3/28 9/28 3/28 15/28 0 3/28 9/28 3/28
y 1 6/28 6/28 0 12/28 y 1 6/28 6/28 0
2 1/28 0 0 1/28 2 1/28 0 0
g(x) 10/28 15/28 3/28
h(y) = Probability Distribution of red pens g(x) = Probability Distribution of red pens
Sum over values of X Sum over values of y
h(y) g(x)
Y 0 1 2 X 0 1 2
P(Y=y) 15/28 12/28 1/28 P(X=x) 10/28 15/28 3/28
39
Mathematically
g x f x, y
y
41
Find the conditional distribution of X, given that Y = 1, and use it to determine P(X = 0 | Y = 1).
We need to find f(x|y), where y = 1. First, we find that
x
f(x,y) h(y)
0 1 2
2 0 3/28 9/28 3/28 15/28
h 1 f x,1 y 1 6/28 6/28 0 12/28
x 0
6 / 28 6 / 28 0 12 / 28 2 1/28 0 0 1/28
Now
f x,1 f x,1
f x |1 P X x | Y 1 , for x 0,1, 2
h 1 12 / 28
Therefore
f 0,1 6 / 28
f 0 |1 P X 0 | Y 1 1/ 2
h 1 12 / 28
f 1,1 6 / 28
f 1|1 P X 1| Y 1 1/ 2
h 1 12 / 28
f 2,1 0
f 2 |1 P X 2 | Y 1 0
h 1 12 / 28 42
A privately owned business operates both a drive-in
facility and a walk-in facility. On a randomly selected day,
let X and Y , respectively, be the proportions of the time
that the drive-in and the walk-in facilities are in use, and (a) Verify that this is a valid distribution.
suppose that the joint density function of these random (b) Find P[(X, Y ) ∈ A], where
variables is A = {(x, y) | 0 < x < 1/2 , 1/4 < y < 1/2}.
43
Joint Probability Distribution
44
Example 3.19: The joint density for the random variables (X, Y ), where X is the unit temperature
change and Y is the proportion of spectrum shift that a certain atomic particle produces, is
(a) Find the marginal densities g(x), h(y), and the conditional density f(y|x).
(b) Find the probability that the spectrum shifts more than half of the total observations, given that
the temperature is increased by 0.25 unit.
45
46
Statistical Independence
Let X and Y be two random variables, discrete or continuous, with joint probability
distribution f(x, y) and marginal distributions g(x) and h(y), respectively.
The random variables X and Y are said to be statistically independent if and only if
x
f(x,y)
0 1 2
0 3/28 9/28 3/28
y 1 6/28 6/28 0
therefore X and Y are not statistically 2 1/28 0 0
47
independent.
Suppose that the shelf life, in years, of a certain perishable food product packaged in
cardboard containers is a random variable whose probability density function is given
by e x x0
f x
0 elsewhere
Let X1, X2, and X3 represent the shelf lives for three of these containers selected
independently and find P (X1 < 2, 1 < X2 < 3, X3 > 2).
Since the containers were selected independently, we can assume that the random
variables X1, X2, and X3 are statistically independent, having the joint probability
density
48
Practice Problems
Problem 3.37: Determine the values of c so that the following functions
represent joint probability distributions of the random variables X and Y :
a f x, y cxy , for x 1, 2, 3; y 1, 2, 3;
b f x, y
c | x y |, for x 2, 0, 2; y 2, 3.
Ans : a )1/ 36 b)1/ 15
Problem 3.41: A candy company distributes boxes of chocolates with a mixture of creams,
toffees, and cordials. Suppose that the weight of each box is 1 kilogram, but the individual
weights of the creams, toffees, and cordials vary from box to box. For a randomly selected box,
letXandY represent the weights of the creams
and the toffees, respectively, and suppose that the joint density function of these variables is
24 xy 0 x 1, 0 y 1, x y 1,
f x, y
0 elsewhere
(a) Find the probability that in a given box the cordials account for more than 1/2 of the weight.
(b) Find the marginal density for the weight of the creams.
(c) Find the probability that the weight of the toffees in a box is less than 1/8 of a kilogram if it is
known that creams constitute 3/4 of the weight
50
More Practice Problems
3.41,3.42,3.43,3.44,3.45,3.46,3.47,3.56,3.57,3.60
51
Q1) You need to search for a discrete distribution from internet.
Determine its CDF. From CDF determine its pmf. Plot its pmf and CDF.
Your discrete distribution should not match with anyone in the class. You
can not use any distribution from the text book.
52