A probability density function f (x) can be used to describe the
probability distribution of a continuous random variable X.
Continuous Random Variables and Probability
Distributions
If an interval is likely to contain a value for X, its probability is large
and it corresponds to large values for f (x).
6-1 CONTINUOUS RANDOM VARIABLES
A continuous random variable is a random variable where the
data can take infinitely many values. For example, a random
variable measuring the time taken for something to be done is
continuous since there are an infinite number of possible times
that can be taken.
The probability that X is between a and b is determined as the
integral of f (x) from a to b. See Figure 6-2.
Definition
For a continuous random variable X, a probability density function is a
function such that
6-2 PROBABILITY DISTRIBUTIONS AND PROBABILITY
DENSITY FUNCTIONS (pdf)
Density functions are commonly used in engineering to describe
physical systems. For example:
A probability density function provides a simple description of the
probabilities associated with a random variable. As long as f(x) is
Figure 6-1 Density function of a loading on long, thin beam
nonnegative and f ( x ) d x = 1 , 0 P (a < X < b ) 1
so that the probabilities are properly restricted.
A probability density function is zero for x values that cannot occur and
it is assumed to be zero wherever it is not specifically defined.
In other word, f (x) is used to calculate an area that represents the
probability that X assumes a value in [a, b].
Figure 6-1 Probability determined from the area under f (x)
1
x
6-2. Suppose that for f ( x ) = e
for x > 0
Since the X is a continuous random variable, the following is true.
(a) Determine x such that P (X > x) = 0.10
(b) Determine x such that P ( X x ) = 0.10
Solution
(a )
Example
6-1. Suppose that for f ( x ) = e
probabilities:
(a) P ( 1 < X )
(c) P ( X = 3 )
P( X > x) =
d x = ( e x ) |x = 0 .1 0
x
x
ln e = ln 0.10
x = ln 0.10
x = 2.3
for 0 < x. Determine the following
(b) P ( 1 < X < 2.5 )
(d) P ( X < 4 )
w h ere ln (0 .1 0) = 2 .3
(e) P ( 3 X )
Solution
(a )
P (1 < X ) = e 1
6-3 The probability density function of the length of a hinge for
fastening a door is f (x) =1.25 for 74.6 < x < 75.4 mm. Determine
the following:
Solution
6-3 CUMULATIVE DISTRIBUTION FUNCTIONS
Definition
Try this
6-4 Suppose that f(x) = 1.5x2 for 1 < x < 1. Determine the following
probabilities:
Graph of F(x)
Solution
1
( a ) P ( X > 0) =
0
1
( b ) P ( X > 0) =
1.5 x 3
3
3
1.5 x dx =
= 0.5(1 ) 0.5(0 ) = 0.5
3
0.5
1.5 x 3
= 0.5(13 ) 0.5(0.5 3 ) = __________
1.5 x dx =
0.5
(i)
0.5
(c ) P ( 0.5 < X < 0.5) =
The probability density function of a continuous random variable can be
determined from the cumulative distribution function by differentiating.
Recall that the fundamental theorem of calculus states that
3 0.5
1.5 x
1.5 x 2 dx =
3 0.5
0.5
(ii)
Cumulative distribution function
= 0.5(0.53 ) 0.5( 0.53 ) = __________
Example 6-5
5
Suppose the cumulative distribution function of the random variable X is
Find (a) P(X < 1.5)
(b) P(X > 0.5)
Find pdf = f(x)
Solution
Solution
MEAN AND VARIANCE OF A CONTINUOUS RANDOM
VARIABLE
The mean and variance of a continuous random variable are defined
similarly to a discrete random variable. Integration replaces summation in
the definitions.
P(X< 1.8) = F(1.8)= 0.25(1.8) + 0.5 =_____________
P(X > 1.5) = 1P(X< 1.5) = 1 F(1.5)
= 1 [0.25(1.5)+0.5]
=_____________
Definition
P(1 < X < 1 ) = P (X<1) P(X<1) = F(1) F(1)
=[0.25(1)+0.5] [0.25(1)+0.5] = __________
Try this
6-6 Determine the probability density function of the following
cumulative distribution functions.
0 .5 x 2 ,
F ( x) =
2
2 x 0 .5 x 1,
1,
x<0
0 x<1
1 x<2
x2
Mean :
Determine the probability density function.
7
E(X) =
8
V(X)=
E(X2) =
6-8
Variance: V(X) =
= E(X2) [E(X)]2
10
=
=
6-9 It is given pdf :
2
0 < x <1
x
3
1
f ( x) =
2< x <4
3
otherw ise
0
Determine the mean and variance of X.
2 5
for 2< x 5
10.42 + 5.33 = 3.5
And
E(X2) =
=
2 5
2 5
Solution
Mean = E(X) =
10
'
'
Suppose f (x) = 0.125x for 0 < x < 4. Determine the mean and
variance of X.
Solution
Example 6-7
Given probability density function, f (x)=
Determine the mean and variance of X.
Solution
a) Mean = E(X) =
(
(
'
And
E(X2) =
(52.08 +5.07 )=12.7
Therefore, V(X) = E(X2) [E(X)]2 = 6.39 2.222 = 1.46
X ~ N(,2).
6-4 NORMAL DISTRIBUTION
Therefore V(X) = E(X2) [E(X)]2 = 12.7 3.52 = 0.45
Try using formula below to obtain variance
9
10
The most widely used model for the distribution of a random variable is
a normal distribution. [Normal (Gauss) Distribution]
The bell-shaped curve also known as normal curve is widely used to
approximately many phenomena.
Some useful results concerning a normal distribution are summarized
below. For any normal random variable
Normal probability density functions for selected values of the
parameters mean and variance 2
Definition
The random variable with normal distribution is characterized by with its
mean and variance 2. The pdf is given by:
Also, from the symmetry of f (x), P(X > ) = P(X < ) = 0.5. Because
f(x) is positive for all x, this model assigns some probability to each
interval of the real line. However, the probability density function
decreases as x moves farther from . Consequently, the probability that a
measurement falls far from is small, and at some distance from the
probability of an interval can be approximated as zero.
The area under a normal probability density function beyond 3 from
the mean is quite small. This fact is convenient for quick, rough sketches
of a normal probability density function. The sketches help us determine
probabilities. Because more than 0.9973 of the probability of a normal
distribution is within the interval ( 3, +3), 6 is often referred to as
the width of a normal distribution. Advanced integration methods can be
used to show that the area under the normal probability density function
from < x < is 1.
11
12
Standard Normal Distribution
6-10 Find
(1) P(Z > 1.26) = 1 P(Z 1.26) = 1 0.896165= 0.103835
Z ~ N(0,1).
The standard normal distribution is a normal probability distribution that
has a mean of 0 and a standard deviation of 1.
Definition
We can find the areas under the standard normal curve by referring to
Standard Normal Tables which give cumulative probabilities (z).
(2)
P(Z < 0.86) = 0.194894
(3)
P(Z > 1.37) = P(Z < 1.37) = 0.914657
Standard Normal Curve Areas, (z) =P(Z z)
OR
P(Z > 1.37) = 1 P(Z < 1.37) = 1 0.085343= 0.914657
(4)
P(1.25 < Z < 0.37)
Standard normal probability density function
Example to calculate probabilities for a standard normal random variable.
13
14
Transform normal variable X to standard normal variable z
All the observations of any normal variable X can be transformed to a
new set of observations of standard normal variable Z with mean 0 and
variance 1.
P(1.25 < Z < 0.37) = P (Z < 0.37)
Z =
P (Z < 1.25)
~ N ( 0 ,1)
= 0.644309 0.105650
Converting Nonstandard Normal Distribution
= 0.538659
If X has a normal distribution with mean u and standard deviation , then
X
Z=
has a standard normal distribution. Thus
Exercises
Question 1
Find
1) P(Z < 1.47)=
2) P(Z > 1.47)=
(1)
P( X a ) = P Z
(2)
P ( X b) = 1 P Z <
(3)
3) P(Z < 1.47)=
4) P(Z > 1.47)=
b
a
P ( a X b) = P
Z
b
a
= P Z
P Z
b
a
= PZ <
PZ <
5) P(1.35 < Z < 1.47) =
6-11 Given X ~ N(10,4). Find
(a) P(X <13)
(b) P( X > 13)
(c) P( 12.5 < X < 15)
6) P(1.47 < Z < 1.59) =
7) P(2.32< Z < 1.41 ) =
15
16
Solution
Given X ~ N(10,4) means = 10 and = 4 = 2
(a)
6-13 The masses of articles produced in a particular workshop are
normally distributed with mean and standard deviation . 5% of
the articles have a mass greater than 85g and 10% have a mass less
than 25g. Find
(i) and .
(ii) P(X > 60)
(iii) a, given that P( a < X < 74.65) = 0.75
13 10
)
2
= P( Z < 1.5)
P( X < 13) = P( Z <
= 0.933193
(b)
Hint
13 10
)
2
= P ( Z > 1.5)
= 1 0.933193
P( X > 13) = P ( Z >
i) P(Z >
P(Z <
12.5 10
15 10
< Z <
)
2
2
= P(1.25 < Z < 2.5)
= P(Z < 2.5) P(Z < 1.25)
= 0.99379 0.89435
= 0.09944
P( 12.5 < X < 15) =
) = 1 P( Z <
85
) = 0.05
and
= 0.06681
(c)
85
25
) = 0.10
Solve for and to obtain = 51.24 and =20.48 20.5 (on the board)
P(
6-12 Cooking sauces are sold in jars containing a stated weight of 500 g
of sauce. The jars are filled by a machine. The actual weight of
sauce in each jar is normally distributed with mean 505 g and
standard deviation 10 g. Find the probability of a jar containing
less than the stated weight.
0.30854
17
18
60 51.24
(ii ) P ( X > 60) = P Z >
= P ( Z > 0.43)
20.5
= 1 P ( Z 0.43)
6-14 The lengths of certain items follow a normal distribution with mean
cm and standard deviation 6 cm. It is known that 4.78% of the
items have a length greater than 82 cm. Find
(i) the value of the mean .
Ans: =71.98
= 1 0.666402 =0.333598
(ii) P( 45 < X < 62)
(iii). P(a < X< 74.65) = 0.75, convert X to Z, and obtain a =27.42
(iii )
Ans: 0.0485
P (a < X < 74.65) = 0.75
74.65 51.24
a 51.24
P
<Z<
= 0.75
20.5
20.5
a 51.24
P
< Z < 1.14 = 0.75
20.5
Exercise
The random variable X has a normal distribution with mean 20 and
standard deviation 4.
(i) Find P(X > 25).
a 51.24
P ( Z < 1.14 ) P Z <
= 0.75
20.5
a 51.24
0. 872857 P Z <
= 0.75
20.5
a 51.24
P Z <
= 0.872857 0.75 = 0.122857
20.5
(ii) Find the value of d such that P (20 < X < d) = 0.4641
Since P ( Z < 1 .1 6 ) = 0 .1 2 3 0 2 4 0 .1 2 2 8 5 7
a 5 1 .2 4
PZ <
= P ( Z < 1 .1 6 )
2 0 .5
a 5 1 .2 4
= 1 .1 6
2 0 .5
a = ( 1 .1 6 )( 2 0 .5 ) + 5 0 .2 4 = 2 6 .4 6
19
20
6-5 NORMAL APPROXIMATION TO THE BINOMIAL AND
POISSON DISTRIBUTIONS
Probabilities involving X can be approximated by using a standard normal
distribution. The approximation is good when n is large relative to p.
Normal Approximation to the Binomial Distribution
For which binomial model with an extremely large value for n, , it is
difficult to calculate probabilities by using the binomial distribution,
Therefore, the normal distribution can be used to approximate binomial a
probability for cases in which n is large. Fig. 6-7 shows that the area of
bars for binomial distribution can be approximated by areas under the
normal density function.
6-15 Suppose that X is a binomial random variable with n=100 and p=0.1
(a) Compute the exact probability that X is less than 4.
(b) Approximate the probability that X is less than 4 and compare
to the result in part (a).
Solution
Given n = 100 and p = 0.1
Therefore E(X) = np = (100)(0.1) = 10
V(X) = np(1p) = (100)(0.1)(0.9) = 9
= 9 = 3
(a)
Compute the exact probability that X is less than 4.
P( X < 4) = ( 100C0 ) (0.1)0 (0.9)100 + ( 100C1 ) (0.1)1 (0.9)99
+ ( 100C2 ) (0.1)2 (0.9)98 + ( 100C3 ) (0.1)3 (0.9)97
= 0.00002656 + 0.0002951 + 0.001623 + 0.005891
= 0.007840
Fig 6-7: Normal approximation to the binomial distribution.
(b)
Definition: Normal Approximation to the Binomial Distribution
Approximate the probability that X is less than 4 and compare to
the result in part (a).
4 10
P( X < 4) = P Z <
= P ( Z < 2 )
= 1 P ( Z 2)
= 1 0.977250
= 0.02275
21
22
There are big different between 0.02275 compare to 0.00784.
The approximation needs to have continuity correction.
cc
3.5 10
P( X < 4) = P( X 3.5) = P Z
= P ( Z 2.17 ) = 0.015
6-6
CONTINUITY CORRECTIONS
APPROXIMATION
TO
IMPROVE
A way to remember the approximation is to write the probability in
terms of and then add or subtract the 0.5 correction factor to make
the probability greater.
THE
From Fig. 6-19 it can be seen that a probability such as P(3 X 7) is
better approximated by the area under the normal curve from 2.5 to 7.5.
This observation provides a method to improve the approximation of
binomial probabilities. Because a continuous normal distribution is used
to approximate a discrete binomial distribution, the modification is
referred to as a continuity correction.
6-16 Consider the number of transmission of bits are 50 and the
probability of an error is p = 0.1. The exact probability that 2 or less
errors occur is
Based on the normal approximation
Definition
Even for a sample as small as 50 bits, the normal approximation is
reasonable. However, the probability P( X 2) is better approximated as
and this result is closer to the exact probability of 0.112 than the previous
result of 0.08.
As another example, P(X > 8) = P(X 9) and this is better approximated
as
23
24
P ( X 9) = P ( X 8.5)
Solution
Given n = 200 and p = 0.4,
Therefore E(X) = np = (200)(0.4) = 80
V(X) = np(1p) = (200)(0.4)(0.6) = 48
= 48 = 6.9282
9 0.5 5
PZ
2.12
= P ( Z 1.65)
= 1 P ( Z 1.65)
(a)
= 1 0.950529
= 0.049471 = 0.05
Approximate the probability that X is less than or equal to 70.
cc
70.5 80
P( X 70) = P( X 70.5) = P Z
48
= P ( Z 1.37 )
= 0.085343
We can even approximate P(X = 5) = P( 5 X 5) as
cc
P (5 X 5) = P (5 0.5 X 5 + 0.5)
(b)
4 .5 5
5.5 5
= P(
Z
)
2 .1 2
2 .1 2
= P ( 0.2 4 Z 0.2 4 )
= P ( Z 0.24) P ( Z 0.24)
cc
P(70 < X < 85) = P(____ X ___)
h 80
g 80
= P
Z
48
48
= P ( q Z r )
= 0.594835 0.405165
= 0.18967
Note that
P ( X = 5) =
50
Approximate the probability that X is greater than 70 and less than
85.
= P ( Z r ) P ( Z q )
C 5 ( 0 .1) 5 ( 0 .9 ) 4 5 = 0 .1 8 4 9
6-17 Suppose that X is a binomial random variable with n = 200 and
p = 0.4
(a) Approximate the probability that X is less than or equal to 70.
(b) Approximate the probability that X is greater than 70 and less
than 85.
25
=
=
26
6-18 A supplier ships a lot of 1000 electrical connectors. A sample of 25
is selected at random, without replacement. Assume the lot contains
100 defective connectors.
(a) Using a binomial, what is the probability that there are no
defective connectors in the sample?
(b) Use the normal approximation to answer the result in part (a).
Is the approximation satisfactory?
Normal Approximation to the Poisson Distribution
The normal distribution can also be used to approximate
probabilities of a Poisson random variable when > 5
Definition: Normal Approximation to the Poisson Distribution.
Solution
Given n = 25 and p =
Let X denotes the number of defective electrical connectors
Then E(X) = np = (25) (
)= 2.5
V(X) = (25) (0.1)(0.9) = 2.25
(a)
(b)
n(1 p) = (25)(0.9) = 22.5
P( X = 0) = ( 25C0 )(0.1)0 (0.9) 25 = 0.0718
.
cc
P ( X = 0) = P ( 0.5 X 0.5)
0.5 2.5
0.5 2.5
= P
Z
2.25
2.25
= P ( 2 Z 1.33 )
= P ( Z 1.33 ) P ( Z 2 )
6-19 Suppose that the number of asbestos particles in a sample of 1
squared centimeter of dust is a Poisson random variable with a mean of
1000. What is the probability that in a sample of 10 squared centimeters
of dust contains more than 10,000 particles?
Solution
Given that 1 squared centimeter of dust is a Poisson random variable
with a mean of 1000.
Let X denotes the number of particles in 10 cm2 of dust. Then, X is a
Poisson random variable with =10(1000) =10,000 .
Also, E(X) = =10,000 = V(X)
= 0.091759 0.018309
= 0.07345
Normal approximation is closer to the binomial: however, it is still not
satisfactory since np =2.5 is not > 5
10, 000.5 10, 000
P ( X > 10, 000) P Z >
10, 000
= 1 0.503989 = 0.496011
27
28
6-7 EXPONENTIAL DISTRIBUTION
Exercise: Past year FE question
Continuity correction.
Suppose that X is binomial with n = 50 and p = 0.1. Because X is a discrete
random variable, P(2 X 5) = P(1.5 X 5.5). Therefore, the normal
approximation to P(2 X 5) can be improved by applying the
approximation to P(1.5 X 5.5).
Compare the following answer,
(a) Approximate P(2 X 5) by computing the z-values
corresponding to 1.5 and 5.5.
(b) Approximate P(2 X 5) by computing the z-values
corresponding to 2 and 5.
Definition
The random variable X that equals the distance between successive counts
of a Poisson process with mean > 0 is an exponential random variable
with parameter . The probability density function of X is
And
Solution
(a)
E(X) = np = 50(0.1) = 5 and V(X)= 50(0.1)(0.9) = 4.5
It is important to use consistent units in the calculation of probabilities,
means, and variances involving exponential random variables.
6-20 Suppose X has an exponential distribution with = 2. Determine
the following:
(b)
(e) Find the value of a such that P(X< x) = 0.05
Solution
The exact probability is 0.582
29
30
6-21 Suppose X has an exponential distribution with mean equal to 10.
Determine the following:
Solution
If E(X) = 10, then =
1 e 0.1 x = 0.95
1 0.95 = e
0.1 x
0.05 = e 0.1 x
ln 0.05 = ln e
0.1 x
1
1
=
= 0.1
E ( X ) 10
ln 0.05 = 0.1x (ln e )
0.1x = ln 0.05
x=
2.9957
= 29.96
0.1
31