Ch 4A Continuous Random Variables

Download Report

Transcript Ch 4A Continuous Random Variables

Chapter 4
Continuous Random Variables
and their Probability
Distributions
Another one of life’s great adventures
is about to begin.
Chapter 4A
The Road Ahead
today
+ special bonus – the triangular distribution!
Continuous Random Variables
Experiments and tests can result in values that are spread over a
continuum.
Even if our measurement device has discrete values, it is often
impractical to use a discrete distribution because the number of
allowed values is so large.
We gain modeling flexibility by expanding the distributions
available to us.
 Measured values can be represented as R.V.’s
 Range of values is an interval of real numbers
 An ‘infinite’ number of outcomes are possible
 A Probability Density Function (pdf), f(x), is used to describe
the probability distribution of a continuous R.V., X.
Continuous Random Variables Examples






T = a continuous random variable, time to failure
X = a continuous random variable, the distance in miles
between cable defects
Z = a continuous random variable, the monthly consumption of
power in watts
T = a continuous random variable, the repair time of a failed
machine
Y = a continuous random variable, the time between arrivals of
customers at City National Bank
X = a continuous random variable, the procurement lead-time
for a critical part
4-2 Probability Distributions and
Probability Density Functions
Definition
Probability Density Function
area = 1
Fig 4.2 – Probability is determined from area under f(x).
4-2 Probability Distributions and
Probability Density Functions
Figure 4-3 Histogram approximates a probability
density function.
Continuous Random Variables
Special Message Box:
If X is a continuous R.V., P(X = x) = 0 (very important idea)
There are an infinite number of points on the X-axis
under the curve, the probability that the R.V., X, takes on
any particular value, P(X = x), is zero.
Our First Example
Example 4-2
4-2 Probability Distributions and
Probability Density Functions
Figure 4-5 Probability density function for Example 4-2.
4-2 Probability Distributions and
Probability Density Functions
Example 4-2 (continued)
Our Very next Example
Given the PDF:
x
f ( x)  e , x  0

x 
e
0 e dx  1
x
0
 1 
 lim e     1
x
 1 
x
More of Our Very next Example
x
f
(
x
)

e
, x0
Given the PDF:

1.
P(X > 1)
2.
P(1 < X < 2.5)
3.
P(X = 3)
x 
e
1
e
dx


e
 .3679
1
1 1
2.5
x
 x 2.5
e
2.5
1
e
dx



e

e
 .2858
1
1 1
x
3
x
e
 dx  0
3
4.
P(X < 4)
4
x 4
e
4
0
e
dx



e

e
 .9817
0
1 0
x
4-3 Cumulative Distribution Functions
Definition
4-3 Cumulative Distribution Functions
Example 4-4
4-3 Cumulative Distribution Functions
Figure 4-7 Cumulative distribution function for Example 4-4.
Given the CDF, find the PDF
x
dF ( x)
f ( x) 
or F ( x)   f (u )du

dx
I can do
this.
F ( x)  1  e  x , x  0
dF ( x)
f ( x) 

dx
d 1  e  x 
dx
e
x
Cumulative Distribution Functions
f ( x)  0.05, 0  x  20
0,

F ( x)  0.05 x,
1,

x<0


0  x  20 

20  x

The relation of these shapes ought
to become intuitive to you.
Figures 4-4 and 4-6 the PDF and CDF
Problem 4-11
Suppose F(x) = .2x for 0 < x < 5, and F(x) = 1 for x > 5. F(x) =
0 otherwise.
Determine the following:
a.
P(X < 2.8) = F(2.8) = (.2)(2.8) = .56
b. P(X > 1.5)
c.
= 1 - F(1.5) = 1 - (.2)(1.5) = .7
P(X < -2) = F(-2) = 0
d. P(X > 6) = 1 – F(6) = 1 – 1 = 0
A CDF Problem
Determine the CDF for f(x) =1.5x2, for –1 < x < 1
F ( x)  P( X  x)  
x

f (u )du
1.5 3 x
=  1.5u du 
u
 0.5 x 3  0.5
1
1
3
x
2
0,

F ( x)  0.5 x 3  0.5,
1,

x  1
-1  x  1
1 x
PDF & CDF
F(x) – CDF -> .5x3 + .5
f(x) – PDF –> 1.5x2
1.6
F(X)
1.4
1.2
1.2
1.0
1.0
0.8
0.8
f(x)
0.6
F(X)
0.6
0.4
0.4
0.2
0.2
4
6
8
0.
0.
0.
1
2
0.
0
.2
-0
.4
-0
.6
-0
-0
-1
1
0.
8
0.
6
0.
4
0.
2
0
-0
.2
-0
.4
-0
.6
-0
.8
-1
.8
0.0
0.0
4-4 Mean and Variance of a
Continuous Random Variable
Definition
A Complete Example


Let X = a continuous random variable, the time to complete a
complex task in hours.
The CDF is given by the following where b, the distribution
parameter, is in hours:
2
 x
F ( x)  1  1   ; 0  x  b
 b
then
dF ( x)
 x  1  2  x  2 2 x
f ( x) 
 2 1     1     2
dx
 b  b  b  b  b b
Let’s Graph the PDF and CDF
b = 10
f(x)
F(x)
0.25
1.2
0.2
1
0.8
0.15
0.6
0.1
0.4
0.05
0.2
0
0
0
2
4
6
x
8
10
12
0
2
4
6
x
8
10
12
Let’s find some probabilities
b  10
2
5

Pr{ X  5}  F (5)  1  1    .75
 10 
2

5
2 


Pr{2  X  5}  F (5)  F (2)  1  1    1  1   
 10    10  
 .75  .36  .39
2
2
7

Pr{ X  7}  1  F (7)  1  1  1    .09
 10 
More of a complete example
3 b
x 2x
 2 2x 
E[ X ]   x   2  dx   2
b b 
b 3b
0 
b
2
0
2
1
b b  b
3
3
b
2x
x
2 2 1 2 1 2
 2 2x 
E[ X ]   x   2  dx 
 2  b  b  b
3b 2b 0 3
2
6
b b 
0
b
2
3
4
2
2
1 2 1 
1 2
Var[ X ]    E[ X ]  E[ X ]  b   b   b
6
 3  18
2
2
1 2

b  .2357b
18
2
The Median
Define the median such that
Pr{X  median} = .5 or F(median) = .5
2
 x
F ( x)  1  1    .5
 b
2
 x
 x
1    .5 or 1    .5
 b
 b
x
  .5  1
b
x  median  b


For b = 10
median = 2.9289
.5  1  b  .7071b  .29289b
4-4 Mean and Variance of a
Continuous Random Variable
Expected Value of a Function of a Continuous
Random Variable
Note for continuous RV:
E[a + bX] = a + b E[X]
Var[a + bX] = b2 Var[X]
More of the Example

The cost for completing the task in the previous example is $50
times the square root of the task time. What is the expected cost
of completing the task if b = 10 hours.


 2 2x 


E 50 x    50 x   2  dx
 10 10 
0
10
10
 2x

 2x
2x 
2x
 50  
 2  dx  50 

2
10
10
1.5
10
2.5
10
  0

0
 
10
.5
1.5
1.5
 2 10 1.5 2 10 2.5 
 50 

 $84.33
2
 1.5 10  2.5 10 
2.5
Observe:
$50   50
10
 $91.29
3
Problem 4-29
The thickness of a conductive coating in micrometers has a density
function of 600x-2 for 100m < x < 120 m
(a) Find the mean and variance
(b) If the coating cost $.50 per m of thickness on each part, what
is the average cost of the coating per part?
120
120
600 x
E[ X ]   2 dx   600 ln x  100  109.39293
x
100
120
2
120
600
x
2
E[ X ]  
dx   600 x  100  12, 000
2
x
100
V [ X ]  12, 000  109.39293  33.186
2
(b) E[cost] = .50 (109.34)
= 54.70
Begin the Bonus Round
He is really going
to do it - discuss
the triangular
distribution!
The Right Triangular Distribution
A continuous random variable is said to have a right
triangular distribution if its density function is given
by:
f ( x)  k x; 0  x  b
Find the value of k that makes f(x) a PDF:
b
 kx dx  1
0
f(x)
kx
2
x
b
2 b
0
kb 2

1
2
2
2x
k  2 ; f ( x)  2 0  x  b
b
b
More Right Triangular Distribution
Now find the CDF and the mean of a right triangular
distribution.
2x
f ( x)  2 0  x  b
b
2 x
x
2y
y
F ( x)   2 dy  2
b
b
0
b
2
x2
 2
b
0
3 b
2x
2x
E[ X ]   2 dx  2
b
3b
0
0
2b3 2
 2  b
3b
3
More Right Triangular Distribution
Now find the median of a right triangular distribution.
2x
f ( x)  2 0  x  b
b
x2
F ( x)  2  .5
b
x  .5b 2  .7071b
The Left Triangular Distribution
a
2/a
2
a
f (t )  a  t ;
2
Big bonus
t
Please
professor. Can
we students
work this one?
2
0t 
a
35
The General Triangular Distribution

Often used as a “rough” model in the absence of data.



a – optimistic value
b – pessimistic value
c – most likely value (mode)
 2 x  a
if a  x  c

  b  a  c  a 
 2  b  x 
f ( x)  
if c  x  b
  b  a  b  c 
0
otherwise


Bigger bonus
f(x)
a
c
b
a<c<b
The General Triangular Distribution
It says here that the
overachieving student will
explore these distributions in
detail by finding the CDF, mean,
and median.
An overachieving
student
Today’s discussion on continuous
random variables has concluded
Say it isn’t
so.