Chapter 6. Continuous Random Variables and Probability Distributions
Continuous Random Variables and Probability Density Functions
ď‚§ Continuous Random Variables A random variable X is said to be continuous if its set of possible values is an entire interval of numbers â€“ that is , if for some A<B, any number x between A and B is possible
2
Continuous Random Variables and Probability Density Functions
Example If a chemical compound is randomly selected and its PH X is determined, then X is a continuous rv because any PH value between 0 and 14 is possible. If more is know about the compound selected for analysis, then the set of possible values might be a subinterval of [0, 14], such as 5.5 ≤ x ≤ 6.5, but X would still be continuous. 0
5.5
6.5
14
3
Continuous Random Variables and Probability Density Functions
ď‚§ Probability Distribution for Continuous Variables Suppose the variable X of interest is the depth of a lake at a randomly chosen point on the surface. Let M be the maximum depth, so that any number in the interval [0,M] is a possible value of X.
0
4.1(a)
M
Measured by meter
0
M 4.1(b) Measured by centimeter
Discrete Cases
0
M 4.1(c) A limit of a sequence of discrete histogram Continuous Case
4
Continuous Random Variables and Probability Density Functions
Probability Distribution Let X be a continuous rv. Then a probability distribution or probability density function (pdf) of X is f(x) such that for any two numbers a and b with a ≤ b
P ( a X b)
b
a
f ( x ) dx
The probability that X takes on a value in the interval [a,b] is the area under the graph of the density function as follows. f(x ) a
b 5
x
Continuous Random Variables and Probability Density Functions
A legitimate pdf should satisfy 1. f ( x ) ³ 0 for all x 2.
¥
¥
f ( x)dx area under the entire graph of f ( x) 1 f(x ) a
b
6
x
Continuous Random Variables and Probability Density Functions
pmf (Discrete) vs. pdf (Continuous) p(x) 0
f(x) 0
M
P(X=c) = p(c)
M
P(X=c) = f(c) ?
P( X c)
7
c
c
f ( x) dx 0
Continuous Random Variables and Probability Density Functions
Proposition If X is a continuous rv, then for any number c, P(X=c)=0. Furthermore, for any two numbers a and b with a<b,
P(a≤X ≤b) = P(a<X ≤b) = P(a ≤X<b) = P(a <X<b) Impossible event :the event contain no simple element P(A)=0 A is an impossible event ?
8
Continuous Random Variables and Probability Density Functions
Example (Cont’) ì0.15e 0.15( x 0.5) x ³ 0.5 f ( x) í 0 otherwise î
1. f(x) ≥ 0; ¥ 2. to show ¥ f ( x) ³ 0dx 1, we use the result
¥
¥
¥
f ( x )dx 0.15e
0.15( x 5)
0.5
0.15e
0.075
dx 0.15e
0.075
1 (0.15)(0.5) × e 1 0.15
9
¥
0.5
¥
a
e
kx
e 0.15 x dx
1 ka dx e k
Continuous Random Variables and Probability Density Functions
Example (Cont’) f(x)
P( X 5)
0.15
0.5
2
4
5
5
¥
0.5
6
P( X 5) f ( x)dx .15e
0.15( x 5)
5
0.15e
0.075
8
10
dx 0.15e
æ 1 0.15 x ö ×ç e ÷ 0.491 P( X < 5) è 0.15 ø 0.5 10
x 0.075
5
0.5
e 0.15 x dx
Cumulative Distribution Functions and Expected Values
Cumulative Distribution Function The cumulative distribution function F(x) for a continuous rv X is defined for every number x by x
F ( x) P( X x) f ( y )dy ¥
For each x, F(x) is the area under the density curve to the left of x as follows F(x) f(x)
1 F(8)
F(8)
0.5 5
8
10
x
5 11
8
10
x
Cumulative Distribution Functions and Expected Values
Example Let X, the thickness of a certain metal sheet, have a uniform distribution on [A, B]. The density function is shown as follows. f(x)
f(x)
1 BA
1 BA
A
B
x
A x B For x < A, F(x) = 0, since there is no area under the graph of the density function to the left of such an x. For x ≥ B, F(x) = 1, since all the area is accumulated to the left of such an x. 12
Cumulative Distribution Functions and Expected Values
Using F(x) to compute probabilities Let X be a continuous rv with pdf f(x) and cdf F(x). Then for any number a P( X a ) 1 F (a )
and for any two numbers a and b with a<b P(a X b) F (b) F (a) f(x)

= a
b
b 13
a
Cumulative Distribution Functions and Expected Values
Example Suppose the pdf of the magnitude X of a dynamic load on a bridge is given by ì1 3 x, 0 x 2 f ( x) í 8 8 î0, otherwise
For any number x between 0 and 2, x
F ( x)
¥
thus
x
1 3 x 3 f ( y )dy ( x)dy x 2 8 8 8 16 0
ì0, x < 0 x x 1 3 x 3 F ( x) í f ( y )dy ( x)dy x 2 , x Î [0, 2] 8 8 8 16 0 ¥ î1, x 2 14
Cumulative Distribution Functions and Expected Values
Example (Cont’) P(1 X 1.5) F (1.5) F (1) 0.297
P( X 1) 1 F ( X 1) 0.688 f(x)
1
7/8
F(x)
1/8 0
2 15
2
Cumulative Distribution Functions and Expected Values
Obtaining f(x) form F(x) If X is a continuous rv with pdf f(x) and cdf F(x), then at every x at which the derivative F’(x) exists, F’(x)=f(x)
f ( x) F ( x) F ( x) f ( x)
x
F ( x) P( X x) f ( y )dy ¥
x
f ( x) F '( x) ( f ( y )dy ) ' ¥
16
Cumulative Distribution Functions and Expected Values
Example When X has a uniform distribution, F(x) is differentiable except at x=A and x=B, where the graph of F(x) has sharp corners. Since F(x)=0 for x<A and F(x)=1 for x>B, F’(x)=0=f(x) for such x. For A<x<B
d x A 1 F '( x) ( ) f ( x) dx B A B A
17
Cumulative Distribution Functions and Expected Values
Example The distribution of the amount of gravel (in tons) sold by a particular construction supply company in a given week is a continuous rv X with pdf ì3 (1 x 2 ) 0 x 1 f ( x) í 2 otherwise î0
The cdf of sales for any x between 0 and 1 is x
F ( x)
0
3 3 3 3 y 3 x (1 y 2 )dy ( y )  yy 0x ( x ) 2 2 3 2 3
18
4.2 Cumulative Distribution Functions and Expected Values
The median
~, The median of a continuous distribution, denoted by ~ th is the 50 percentile, so satisfies 0.5=F( ), that is, half ~ the area under the density curve is to the left of and ~ half is to the right of Symmetric Distribution
~
~ 19
~
4.2 Cumulative Distribution Functions and Expected Values
Expected/Mean Value The expected/mean value of a continuous rv X with pdf f(x) is ¥
X E ( X ) xf ( x)dx ¥
X E ( X ) å x × p( x) xÎD
Discrete Case
20
4.2 Cumulative Distribution Functions and Expected Values
Example 4.9 (Ex. 4.8 Cont’) The pdf of weekly gravel sales X was ì3 (1 x 2 ) 0 x 1 f ( x) í 2 otherwise î0
So ¥
1
3 3 x2 x 4 x 1 3 2 E ( x) xf ( x) dx x (1 x )dx ( ) x 0 2 2 2 4 8 ¥ 0
21
4.2 Cumulative Distribution Functions and Expected Values
Expected value of a function If X is a continuous rv with pdf f(x) and h(X) is any function of X, then ¥
E [ h( X ) ] h ( X ) h( x ) f ( x ) dx ¥
h ( X ) E (h( X )) å h( x) × p ( x) xÎD
Discrete Case
22
4.2 Cumulative Distribution Functions and Expected Values
Example 4.10 Two species are competing in a region for control of a limited amount of a certain resource. Let X = the proportion of the resource controlled by species 1 and suppose X has pdf ì1 0 x 1 f ( x) í î0 otherwise which is a uniform distribution on [0,1]. Then the species that controls the majority of this resource controls the amount ì1 X if 0 x < 12 h( X ) max( X ,1 X ) í 1 î X if 2 X 1 The expected amount controlled by the species having majority control is then E [ h( X )] max( x, x 1) × f ( x )dx max( x,1 x) × 1dx ¥
1
¥
0
1
1
(1 x) × 1dx 1 x × 1dx 0
2
2
23
3 4
Cumulative Distribution Functions and Expected Values
The Variance The variance of a continuous random variable X with pdf f(x) and mean value μ is ¥
s X V ( X ) ( x ) 2 f ( x)dx E[( X ) 2 ] 2
¥
The standard deviation (SD) of X is
sX V (X )
24
4.2 Cumulative Distribution Functions and Expected Values
Proposition E (aX b) aE ( X ) b V ( X ) E ( X 2 ) [ E ( X )]2 The Same Properties as Discrete Cases
25
4.5 Other Continuous Distributions
The Lognormal Distribution A nonnegative rv X is said to have a lognormal distribution if the rv Y = ln(X) has a normal distribution . The resulting pdf of a lognormal rv when ln(X) is normally distributed with parameters μ and σ is
ì 1 ( ln ( x ) ) 2 ( 2s 2 ) e f ( x; , s ) í 2 sx 0 î
34
x³0 x<0
4.5 Other Continuous Distributions
Mean and Variance E( X ) e
s 2 2
;V ( X ) e
2 s 2
(
s2
× e
)
1
The cdf of Lognormal Distribution F ( x; , s ) P ( X x ) P[ ln ( X ) ln ( x ) ]
ln ( x ) ö æ æ ln ( x ) ö Pç Z ÷ ç ÷ s s è ø è ø 35
4.5 Other Continuous Distributions
The Beta Distribution A random variable X is said to have a beta distribution with parameters α, β, A, and B if the pdf of X is a 1 b 1 ì 1 G(a b ) æ x A ö æ B x ö × , A x B ç ÷ ç ÷ f ( x;a , b , A, B ) í B A G ( a ) ×G ( b ) è B A ø è B A ø 0 otherwise î
The case A = 0, B =1 gives the standard beta distribution. And the mean and variance are B A ) ab ( a 2 A ( B A) × ; s 2 a b ( a b ) ( a b 1) 2
36