Continuous Random Variables and Probability Distributions
Continuous Random Variables and Probability Distributions
Continuous Random Variables and Probability Distributions
2. f ( x)dx 1
b
f ( x)
0 for 0
2 x 1
P( X 5) 2e dx e 0.368
0.5
Class Problem
• Suppose that f(x)= e-(x-4) for x>4
• Determine the following probabilities
– P(1<X)
– P(2X<5)
– Determine such that P(X<x) =0.9
Solution
• Part a
P(1 X ) e( x 4 )dx e( x 4 )
4 1 because f(x)=0 for x<4
4
• Part b
5
P(2 X 5) e( x 4 )dx e( x 4 ) 54 1 e1 0.6321
4
• Part c
x
P( X x ) e( x 4 )dx e( x 4 ) 4x 1 e( x 4 ) 0.90
4
x
F ( x) P( X x) f (u )du
for x
F(x) and f(x)
dF ( x )
f ( x)
dx
Example
• Find the cumulative distribution function of the
following pdf
2e 2 x for x 0
f ( x)
0 for 0
• Solution
x
2e dt 1 - e for x 0
2t - 2x
F ( x) 0
0 for x 0
• Variance
– V(X)= 2
( x ) f ( x) dx
Example
• If a random variable has
2e for x 0
2 x
f ( x)
0 for x 0
2 x
E[ x ] xf ( x ) dx x.2e dx 0.5
0
V [Y ] ( x ) f ( x ) dx
2
( x 1 / 2) 2e dx
2 2 x
1/ 4
Uniform Distribution
• Simplest continuous distribution
• Probability Density
1
f ( x)
ba
• Mean & Standard Deviation
ab b af(x)
and
2 12
• Proof
b
x 0.5 X 2
E( X ) dx b
( a b) / 2
ba
a
a
b a x
ab 2 ab 3
(x ( ) (x )
(b a ) 2
b
V (X ) 2 dx 2 b
ba 3(b a )
a
a
12
Example
• Suppose X has a continuous uniform distribution
over the interval [1.5, 5.5]
– Determine the mean, variance, and standard deviation
of X
– What is P(X<2.5)?
• Solution
E(X) = (5.5+1.5)/2 = 3.5,
(5.5 1.5) 2
V (X ) 3/ 4
12
x 3 4 0.866
2.5
P ( X 2.5) 0.25dx
1.5
2.5
0.25x 1.5 0.25
Class Problem
• The thickness of a flange on a aircraft component
is uniformly distributed between 0.95 and 1.05
millimeters
– Determine the cumulative distribution function of flange
thickness
– Determine the proportion of flanges that exceeds 1.02
millimeters
– What thickness is exceeded by 90% of the flanges?
Solution
a) The distribution of X is f(x) = 10 for 0.95 < x < 1.05
0,
Now
x 0.95
F( x) 10 x 9.5, 0.95 x 105
.
1, . x
105
b) The probability
P( X 102
. ) 1 P( X 102
. ) 1 F(102
. ) 0.3
x
( x )2
1
f ( x) e 2 2
2
• Normal random variable with parameters - < <
and >1
• Mean and variance
– E[X]= , V[X]= 2
• N(, 2 ) used to denote the distribution
Useful Information
• Total area under the curve is 1.0
• Two tails of the curve extend indefinitely
• Useful results
– P(-<X<+)=0.6827
– P(-2<X<+2)=0.9545
– P(-3<X<+3)=0.9973
Calculating the Probabilities
• Normal distributions differ by mean &
standard deviation
f(X)
35 Z 7 5
• P(3 < X < 7) P
= 4 = P(0.5 < Z
4
< 0.5)=P(Z < 0.5) P(Z < 0.5)= 0.38292
P 2 5 Z 9 5
• P(2 < X < 9) = 4 4
=P(1.75 < Z < 1) = [P(Z < 1) P(Z <
1.75)] = 0.80128
Normal Approximation of
Binomial Distribution
• Difficult to calculate probabilities when n is
large
• Used to approximate binomial probabilities for
cases in which n is large
• Gives approximate probability only
Approximation
• If X is a binomial random variable
z X np np 1 p
• is approximately a standard normal random
variable
• Good for np>5 and n(1-p)>5
• Accuracy of approximation
– Calculate the interval:
3 np 3 np1 p
– If Interval lies in range 0 to n, normal
approximation can be used
Normal Approximation of
Poisson Distribution
• If X is a Poisson random variable with E(X)= and
V(X)=
z X
• Approximated a standard normal random
variable
• Good for >5
Exponential Distribution
• Poisson distribution defined a random variable to
be the number events during a given time interval
or in a specified regions
• Time or distance between the events is another
random variable that is often of interest
• Probability density function
f ( x) e x
• Mean and variance
E[ X ] 1 , 2 V [ X ] 1
Example
• Suppose that the log-ons to a computer network
follow a Poisson process with an average of 3
counts per minute
a) What is the mean time between counts?
b) What is the standard deviation of the time
between counts?
c) Determine x such that the probability that at least
one count occurs before time x minutes is 0.95
Solution
a) E(X) = 1/ =1/3 = 0.333 minutes
b) V(X) = 1/2 = 1/32 = 0.111, = 0.33
c) Value of x
x
3t
P( X x) 3e dt
0
x
3t
e 1 e 3 x 0.95
0
• Thus, x = 0.9986
Class Problem
• The time between the arrival of electronic
messages at your computer is exponentially
distributed with a mean of two hours
– (a) What is the probability that you do not
receive a message during a two-hour period?
– (b) What is the expected time between your fifth
and sixth messages?
Solution
• Let X denote the time until a message is
received. Then, X is an exponential random
variable and 1 / E( X) 1 / 2
a) P(X > 2) =
x/ 2
21 e dx e x / 2 e 1 0.3679
2 2
b) E(X) = 2 hours.
Erlang Distribution
• Describes the length until the first count is
obtained in a Poisson process
• Generalization of the exponential distribution is
the length until r counts occur in a Poisson
process.
• Random variable that equals the interval length
until r counts occur in a Poisson process
• PDF
r x r 1e x
f ( x) , for x 0 and r 1,2,3, ...
(r 1)!
• Mean and Variance
– E(X)=r/ and V(X)= r/2
Example
• Errors caused by contamination on optical disks
occur at the rate of one error every bits. Assume the
errors follow a Poisson distribution.
a) What is the mean number of bits until five errors
occur?
b) What is the standard deviation of the number of bits
until five errors occur?
c) The error-correcting code might be ineffective if
there are three or more errors within 105 bits. What
is the probability of this event?
Solution
a) X denote the number of bits until five errors occur
b) Then, X has an Erlang distribution with r = 5 and =10-5
error per bit
r
– E(X) = 5 10
5
r
5 1010 5 10 10 223607
– V(X) = 2 X
0!
10 1
1!
11 1
2!
12
0.0803
Gamma Function
• Generalization of factorial function leads
• Definition of gamma function
( r ) x e dx,
r 1 x
for r > 0
0
• Integral (r) is finite
• Using integration by parts it can be shown
– (r)=(r-1) (r-1)
– if r is a positive integer
– (r)=(r-1)!
• Used in development of the gamma distribution
Gamma Distribution
• X with the following PDF
r 1 x
x e
r
• f ( x) for x>0
( r )
• Gamma random variable with parameters >0 and r>0
• If r is an integer, X has an Erlang distribution
• Erlang is a special case of the gamma distribution
• Mean and Variance
– E(X)=r/ and V(X)= r/2