Sei sulla pagina 1di 36

Chapter Four

Continuous Random Variables and Probability Distributions


4.1 Continuous Random Variables and Probability Density Functions
For a discrete random variable X, one can assign a probability to each value that X can take (i.e.,
through the probability mass function). Random variables such as heights, weights, lifetimes, and
measurement error can all assume an infinite number of values. As a result, we need a different
mechanism for understanding the probability distribution.
For a continuous random variable, any real number x is possible between A and B (for A < B).
The number of values is theoretically infinite, but one wont have such precision in practice. Representing such a random variable using a continuous model is still appropriate. Note that a continuous
random variable can still have specific endpoints to its range (e.g., x > 0, 0 < x < 1 or x > 1), but
the number of values possible is still infinite.
As discussed earlier, we can use histograms to represent the relative frequency of a random
variable X. Suppose X is the depth of a lake at a randomly chosen point on the surface. X has a
range from 0 to M , where M is the maximum depth of the lake. The relative frequency histogram
can represent the probability distribution for X. The finer the discretization of the X axis (i.e., the
precision of the measurement), the smaller the subintervals for the histogram as seen below.

Infinitely small subintervals lead to the continuous probability distribution being represented
as a smooth curve. As with the relative frequency histograms, the probability associated with the
values of X between any two values a and b is the area under the smooth curve between a and b. For
functions consisting of straight line segments, geometry and simple relationships for known areas
(shapes) can be used. For more complex functions, we may be able to subdivide the area under
the curve into smaller rectangles and sum their areas. However, calculus and integration techniques
solve this for us.
If X is a continuous random variable, the probability distribution or the probability density
function (pdf ) of X is a function f (x) such that for any two numbers a and b with a b:
Z b
P (a X b) =
f (x) dx.
a

This probability is the area under the curve f (x) between the points a and b.
For f (x) to be a legitimate density function, the following two conditions must hold:
f (x) 0 for all x, and
1

f (x) dx = 1.

With discrete random variables, we only had a finite set of values for X, each with probability
mass at x and the sum of possible p (x) values equal to 1 (the equivalent of the two conditions
above).
Since integration is fundamental to the understanding of continuous random variables, some
integration review is suggested. Some basic indefinite integrals you should know are:
Z
dx = x + C
Z
Z
c dx = c dx
Z
Z
Z
(f + g + ) dx = f dx + g dx +
Z
xr+1
xr dx =
+C
r+1
Z
exp (x) dx = exp (x) + C
Of course, the same rules apply when the integrals are definite rather than indefinite. Hence,
suppose that you want the area under the parabola y = x2 for x [0, 1]. Then:
3 1
Z 1
x
1
1
2
x dx =
= 0= .
3 0 3
3
0
Maple will be used extensively, particularly for more complicated functions. The equivalent differentiation rules for the antiderivatives (integrals) given above should also be known. For example:
d
= 2 exp (2x) .
dx
Corresponding derivative rules for the above integration rules are:
exp (2x)

d
dx
d
cx
dx
d
[f + g + ]
dx
r d
x
dx
d
exp (x)
dx
x

=1
=c
=f

d
d
+g
+
dx
dx

= rxr1
= exp (x)

The Uniform Distribution A simple but commonly occurring continuous distribution is the
uniform distribution on the interval [A, B]. If a continuous random variable X follows a uniform
distribution, the pdf of X is:
)
(
1
AxB
.
f (x; A, B) =
BA
0
otherwise
2

To verify that this is a valid pdf, note that f (x) 0 for all x [A, B] and that:
Z

f (x) dx =

B
1
x
B
A
BA
dx =
=

=
= 1.
BA
BA A BA BA
BA

Example (Devore, Page 143, Exercise 1) Let X denote the amount of time for which a book on
two-hour reserve at a college library is checked out by a randomly selected student and suppose
that X has density function:

0.5x 0 x 2
f (x) =
.
0
otherwise
Calculate the following probabilities: P (X 1), P (0.5 X 1.5), and P (1.5 < X).
Solution The desired probabilities are:
Z

P (X 1) =

1
0.5x dx = 0.25x2 0 = 0.2500

Z0 1.5
P (0.5 X 1.5) =
Z0.52
P (1.5 < X) =
1.5

1.5
0.5x dx = 0.25x2 0.5 = 0.5000

2
0.5x dx = 0.25x2 1.5 = 0.4375.


Example (Devore, Page 144, Exercise 5) A college professor never finishes his lecture before the
bell rings to end the period and always finishes his lecture within one minute after the bell
4

rings. Let X = the timethat elapses between


the bell and the end of the lecture and suppose
2
kx 0 x 1
the pdf of X is f (x) =
.
0 otherwise
a. Find the value of k.
Solution For f (x) to be a valid pdf, we must have
Z

f (x) dx =

kx3
kx dx = 1
3

f (x) dx = 1. Hence:

k
1
=1k
0 = = 1 k = 3.
3
3

b. What is the probability that the lecture ends within 21 minute of the bell ringing?

R 1/2
3
1/2
Solution P X 12 = 0 3x2 dx = [x3 ]0 = 12 = 18 .
c. What is the probability that the lecture continues beyond the bell for between 15 and 30
seconds?

R 1/2
3 3
1/2
7
Solution P 14 X 12 = 1/4 3x2 dx = [x3 ]1/4 = 12 41 = 64
.
d. What is the probability that the lecture continues for at least 40 seconds beyond the bell?
R1

3 19
1
.
Solution P X 23 = 2/3 3x2 dx = [x3 ]2/3 = (1)3 23 = 27

Ra
The area under a single point is zero, a f (x) dx = 0. Although in practice a single real
number may seem to be a likely value for x, a continuous model for X assumes zero probability
5

for any single value. This implies that for a continuous random variable X which has 1 within its
range of possible values, P (X 1) P (X < 1). Similarly, P (1 X 2) P (1 < X < 2). Of
course, for an integer valued discrete random variable X, this is not true.
4.2 Cumulative Distribution Functions and Expected Values
The Cumulative Distribution Function The cumulative distribution function (cdf ), F (x),
for a continuous random variable X is defined for every real number x by:
Z x
F (x) = P (X x) =
f (y) dy.

Hence, f (x) is the pdf but, notationally, y is used to avoid confusion because the upper limit of
integration is x. The cdf F (x) is the area under the density curve for x, f (x), which is to the left
of x.
Example (Devore, Page 145, Example 4.5) Suppose X has a uniform distribution on [A, B]. To
1
compute the cdf of X, we integrate f (x) = BA
over the range of X up to x:
Z x
Z x
Z x
1
1
1
1
xA
F (x) =
dy =
dy =
dy =
[y]xA =
,
BA A
BA
BA
B A
A B A
for A x B. More precisely, the cdf is defined to be:

x<A
0
xA
AxB
F (x) =
.
BA

1
xB
Example (Devore, Page 143, Exercise 3) Suppose the distance X between a point target and a
shot aimed at the point in a coin-operated target game is a continuous random variable with
pdf:
3

2
(1

x
)
1

1
4
f (x) =
.
0
otherwise
Note that you should be able to sketch the graph of this pdf. It is a parabola opening
downward with a y-intercept of 34 . For 1 < x < 1, the cdf of X is then:

x
Z x
Z x

3
3
t3
2
F (x) =
f (t) dt =
1 t dt =
t
4
3 1

1 4

3
3
3
x
1
3
x
2
=
x
1
=
x
+
4
3
3
4
3
3

1 3
1
= +
x x3 .
2 4
3
Hence, the cdf of X is:

F (x) =

1
2

0
x
<
1

+ 34 x 13 x3 1 x 1 .

1
x>1
6

Using F (x) to Compute Probabilities Let X be a continuous random variable with pdf f (x)
and cdf F (x). Then for any two numbers a and b with a < b:
P (a X b) = F (b) F (a) .
The following figure illustrates this proposition; the desired probability is the shaded area under the
density curve between a and b and equals the difference between the two shaded cumulative areas.

Example (Devore, Page 146, Example 4.6) Suppose the pdf of the magnitude X of a dynamic load
on a bridge (in newtons) is given by:

1 3
+ 8x 0 x 2
8
f (x) =
.
0
otherwise
Find the cdf of X and use it to find P (1 X 1.5).
Solution For 0 x 2, the cdf is:
Z x
Z
F (x) =
f (y) dy =

Hence, the cdf is:

F (x) =

0
x
8

3 2
x
16

1 3
+ y
8 8

dy =

x
3
+ x2 .
8 16

x<0
0x2 .

x>2

Therefore:

1.5
3
1
3
19
2
2
P (1 X 1.5) = F (1.5) F (1) =
+
(1.5)
+
(1) =
= 0.2969.
8
16
8 16
64
Obtaining f (x) from F (x) If X is a continuous random variable with pdf f (x) and cdf F (x),
then at every x at which the derivative F 0 (x) exists:
F 0 (x) =

d
F (x) = f (x) .
dx


Percentiles of a Continuous Distribution Let p be a number between 0 and 1. The (100p)th
percentile of the distribution of a continuous random variable X, denoted by (p), is defined by:
Z

(p)

p = F ( (p)) =

f (y) dy.

Therefore, (100p) % of the area under f (x) lies to the left of (p) and 100 (1 p) % lies to the right.

Example (Devore, Page 143, Exercise 1) Let X denote the amount of time for which a book on
two-hour reserve at a college library is checked out by a randomly selected student and suppose
that X has density function:
x

0x2
2
f (x) =
.
0 otherwise
Find the 75th percentile.
Solution The cdf is:

F (x) =
0

2 x
y
x2
y
=
dy =
2
4 0
4

for 0 < x < 2. The 75th percentile, (0.75), is found as follows:

(0.75)2
0.75 = F ( (0.75)) =
3 = (0.75)2 (0.75) = 3.
4

But since X is a measure


of
time,

3 is not a possible value. Therefore, the 75th

percentile is (0.75) = 3.
The median of a continuous distribution, denoted by
, is the 50th 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
.
Expected Values for Continuous Random Variables The expected or mean value of a continuous random variable X with pdf f (x) is:
Z
X = E (X) =
x f (x) dx.

If X is a continuous random variable with pdf f (x) and h (X) is any function of X, then:
Z
E [h (X)] = h(X) =
h (x) f (x) dx.

The Variance of a Continuous Random Variable The variance of a continuous random


variable X is:
Z

2
X = V (X) =
(x )2 f (x) dx = E (X )2

and the standard deviation of X is:


X =

V (X).

It is usually more convenient to compute V (X) as:



V (X) = E X 2 [E (X)]2 ,
but keep in mind that the variance is a measure of spread about the mean. The variance of X is
also called the second moment of X. The mean is the first moment.
Example (Devore, Page 153, Exercise 22) The weekly demand for propane gas (in 1000s of gallons)
from a particular facility is a random variable X with pdf:

2 1 x12 1 x 2
f (x) =
.
0
otherwise
a. Compute the cdf of X.
Solution For 1 x 2:
Z x
Z
F (x) =
f (y) dy = 2

so:

1
1 2
y

1
dy = 2 y +
y

x
1

1
=2 x+
4,
x

0
x<1
2 x + x1 4 1 x 2 .
F (x) =

1
x>2

b. Obtain an expression for the (100p)th percentile. What is the value of


?
Solution Let xp be the (100p)th percentile. Then:

1
p = 2 xp +
4
xp
2x2p (4 + p) xp + 2 = 0

p
1
2
4 + p p + 8p ,
xp =
4
but since 0 < p < 1 and 1 xp 2:
xp =

p
1
4 + p + p2 + 8p .
4

To find
, set p = 0.5 to obtain:

q
1
2

=
4 + 0.5 + (0.5) + 8 (0.5) = 1.6404.
4
10

c. Compute E (X) and V (X).


Solution Using the definitions:

2
Z 2
1
1
x
E (X) =
2x 1 2 dx = 2
x
ln x = 1.6137
dx = 2
x
x
2
1
1
1

3
2
Z 2
Z 2
2

1
x
E X =
x = 2.6667
2x2 1 2 dx = 2
x2 1 dx = 2
x
3
1
1
1

V (X) = E X 2 [E (X)]2 = 2.6667 (1.6137)2 = 0.0627.
Z

d. If 1.5 thousand gallons is in stock at the beginning of the week and no new supply is due
in during the week, how much of the 1.5 thousand gallons is expected to be left at the
end of the week?
Solution The amount left is equal to max (1.5 X, 0). Therefore:
Z 2
E (Amount Left) =
max (1.5 x, 0) f (x) dx
1

Z 1.5
1
=2
(1.5 x) 1 2 dx = 0.0609.
x
1

11


Example (Devore, Page 152, Exercise 15) Suppose the pdf of weekly gravel sales X (in tons) is:

2 (1 x) 0 x 1
f (x) =
.
0
otherwise
a. Obtain the cdf of X.

12

Solution For 0 x 1:
Z x
Z
F (x) =
f (y) dy =

Thus:

x
0

y2
2 (1 y) dy = 2 y
2

0
F (x) =
2 x

x2
2

x<0

x
0

x2
=2 x
2

0x1 .

x>1

b. What is P X 12 ?

1
( 12 )
1
1
Solution P X 2 = F 2 = 2 2 2
= 34 = 0.75.

c. Using part (a), what is P 14 < X 12 ? What is P 41 X 12 ?



7
Solution P 14 < X 12 = P 14 X 12 = F 21 F 14 = 43 16
=

5
16

= 0.3125.

d. What is the 75th percentile of the sales distribution?


Solution We must solve F ( (0.75)) = 0.75 for (0.75):

!
(0.75)2
(0.75)2
3
0.75 = 2 (0.75)
(0.75)
=
2
2
8

1 3
3
(0.75)2 2 (0.75) + = 0 (0.75)
,
.
4
2 4
Therefore, (0.75) = 12 .
e. What is the median
of the sales distribution?

2
2 2
+ 12 = 0
=
Solution 0.5 = F (
) = 2
2

2 2
2

= 0.2929.

f. Compute E (X) and X .


Solution From the definitions:
Z
E (X) =

1
x2 x3
1
2x (1 x) dx = 2
= = 0.3333

2
3 0 3
0
1
3
Z 1
2
1
x
x4
2

= = 0.1667
E X =
2x (1 x) dx = 2
3
4 0 6
0
2
1
1
1 1
1
V (X) =
= =
= 0.0556
6
3
6 9
18
r

p
1
2
X = V (X) =
=
= 0.2357.
18
6
1

4.3 The Normal Distribution


The normal distribution is the most common and important distribution in statistics and applications. Many random variables (e.g., heights, weights, reaction times) follow a normal distribution.
13

Even when the underlying distribution is discrete, the normal distribution is often a very good
approximation. Sums and averages of non-normal variables will usually be approximately normally
distributed.
A continuous random variable X is said to have a normal distribution with parameters and
if the pdf of X is:
"
#
1
(x )2
f (x; , ) = exp
2 2
2
for < x < . The statement that X is normally distributed with parameters and 2 is often
abbreviated as X N (, 2 ). The parameters and define the normal family. Showing that the
pdf integrates to 1 is not simple by hand or even with Maple due to the fact that no closed form
solution exists for the integral.
If X N (, 2 ), then the mean and variance are:
E (X) =
V (X) = 2 .
Since the normal density curve is symmetric, the center of the single peak of the bell-shaped
curve represents both the median and the mean. The spread of the distribution as given by is
reflected in the shape of the bell and the amount of area in the tails. The smaller the value of ,
the higher the peak and greater the area around . The area under the normal density curve will
be approximately 0.68 within one standard deviation of the mean and P (|X | 2) 0.95.
The Standard Normal Distribution Rather than compute probabilities by numerically evaluating:
"
#
Z b
1
(x )2
exp
P (a X b) =
dx,
2 2
a 2
we standardize to the random variable:
Z=

X
.

The standard normal random variable Z reflects how many standard deviations we are from the
mean. In other words, X = + Z.
The standard normal random variable Z has parameters = 0 and = 1 and has pdf:
2
1
z
f (z; 0, 1) = exp
2
2
for < z < . Notationally, we write Z N (0, 1).
The cdf of Z, denoted by (z), is:
Z z
(z) = P (Z z) =
f (y; 0, 1) dy.

14

For any random variable X N (, 2 ), we standardize to Z via Z =


probability as:

a
b
P (a X b) = P
Z

and compute any

according to standard normal tables such as Table A.3 in Devore (pp. 704-705).
More formally, any probability involving X can be expressed as a probability involving a standard
normal random variable Z. Hence:

X
X
=
.
P (X x) = P Z

So, assuming a handy method of integration such as Maple is not available, we can always convert
any probability statement involving X into one in terms of Z. These should already be familiar
calculations from other courses.
Example If X N (0.5, 1), compute P (0.28 < X < 1.75).

Solution P (0.28 < X < 1.75) = P 0.280.5


< Z < 1.750.5
= P (0.38 < Z < 1.25) = (1.25)
1
1
(0.38) = 0.8944 0.3520 = 0.5424.

15

16

Percentiles of an Arbitrary Normal Distribution In statistical inference, percentiles of the


standard normal distribution which have area to the right are denoted by z , the 100 (1 )th
percentile of the standard normal distribution. The (100)th percentile is z . These critical
values given in the table below are seen quite often in applications and hypothesis testing.
The (100p)th percentile of a normal distribution with mean and standard deviation can
be obtain by finding the (100p)th percentile of the standard normal distribution and reversing the
standardization. Hence, if X has a normal distribution with mean and standard deviation , the
(100p)th percentile for X is given by:
[(100p) th percentile for N (, )] = + [(100p) th percentile for Z] .
Example (Devore, Page 165, Exercise 39) The distribution of resistance for resistors of a certain
type is known to be normal. 10% of all resistors have a resistance exceeding 10.256 ohms
and 5% have resistance smaller than 9.671 ohms. What are the mean value and standard
deviation of the resistance distribution?
Solution We are given that P (X > 10.256) = 0.10 and P (X < 9.671) = 0.05. Hence:

P Z > 10.256
= 0.10 and P Z < 9.671
= 0.05.

From the standard normal tables, we see that P (Z > 1.28) = 0.10 and P (Z < 1.65) =
0.05. Therefore we have two equations in two unknown variables:
10.256
= 1.28 + 1.28 = 10.256

9.671
= 1.65 1.65 = 9.671.

Subtracting the bottom equation from the top equation gives:


+ 1.28 ( 1.65) = 10.256 9.671
1.28 + 1.65 = 10.256 9.671
2.93 = 0.585
= 0.1997.
Substitution gives = 10. Hence the distribution of the resistance is normal with mean
10 ohms and standard deviation 0.1997 ohms.
Example (Devore, Page 165, Exercise 35a) If a normal distribution has = 25 and = 5, what
is the 91st percentile of the distribution?
Solution For the standard normal random variable Z N (0, 1), z0.09 = 1.34. Hence:
(0.91) = 25 + (1.34) (5) = 31.7.
Example (Devore, Page 165, Exercise 35c) The width of a line etched on an integrated circuit chip
is normally distributed with mean 3.000 m and standard deviation 0.150. What width value
separates the widest 10% of all such lines from the other 90%?
Solution Let X = width of a line etched on an integrated circuit chip. Then X N (3.000, 0.150).
The widest 10% corresponds to the 90th percentile and z0.10 = 1.28. Hence:
(0.90) = 3.000 + (1.28) (0.150) = 3.192.
17

The Normal Approximation to the Binomial Distribution The normal distribution is often used as an approximation to the distribution of values in a discrete population. The point mass
P (X = x) from the discrete distribution is replaced with the interval probability P x 21 X x + 12 .
Devore notes in Example 4.19 that IQ scores are usually assumed to be normally distributed
although the score is an integer. The histogram of scores has rectangles which are centered at
integers. In using the normal approximation, the area under the normal density curve between
124.5 and 125.5 would approximate the point mass P (X = 125). The correction of 0.5 is called the
continuity correction.
The binomial distribution is often approximated by the normal distribution. This approximation
is considered reasonable if np 5 and n (1 p) 5. If these two conditions hold, then X
BIN(n, p) is approximately normal with mean = np and variance 2 = np (1 p).
More formally, if X BIN(n, p)with np 5 and n (1 p) 5:
!

x + 0.5 np
,
P (X x) p
np (1 p)
where is the standard normal cdf.
The following two figures illustrate this approximation. The figure on the left is a histogram
of 5000 samples from a BIN(20, 0.1) distribution and the figure on the left is a histogram of 5000
samples from a BIN(20, 0.5) distribution. Note that the first figure has np = 2 < 5, and the
distribution is still rather skewed. However, the figure on the right satisfies the necessary conditions
and appears to be approximately normal.

The 0.5 is a continuity correction which ensures that all of the probability to the left of the
original x is included. If we are interested in the binomial probability P (a X b), then:

!
!

a 0.5 np
b + 0.5 np
p
.
P (a X b) p
np (1 p)
np (1 p)
18


Example (Devore, Page 166, Exercise 49) Suppose only 40% of all drivers in a certain state
regularly wear a seatbelt. A random sample of 500 drivers is selected. What is the probability
that:
a. Between 180 and 230 (inclusive) of the drivers in the sample regularly wear their seatbelt?
Solution Let X = the number of drivers in the sample who regularly wear their seatbelt.
Then X BIN(500, 0.40). Since np = 200 and n (1 p) = 300 (both much larger than
5), the normal approximation should be very good here, i.e., X N
(200, 120). Therefore:

230.5 200
179.5 200

P (180 X 230)

120
120
= (2.78) (1.87) = 0.9973 0.0307 = 0.9666.
b. Fewer than 175 of those in the sample regularly wear a seatbelt?

Solution P (X < 175) 174.5200


= (2.33) = 0.0099.
120
4.4 and 4.5 The Gamma Family and Other Continuous Distributions
Many situations exist where the normal family of distributions is not applicable. Other models for
continuous variables are used in many practical situations. One such application is in reliability or
survival analysis. Survival times or times to failure are typically not normally distributed. Although
specification of a distribution is not always necessary, it is often done effectively.
19

The Lognormal Distribution The lognormal distribution may be specified for a random variable
whose natural logarithm is normally distributed. A continuous random variable X is said to have a
lognormal distribution if Y = ln (X) has a normal distribution. Since Y N (, ), X = exp (Y )
is also specified in terms of and . The pdf of X is:

!
2

[ln
(x)

exp
x0
2
f (x; , ) =
.
2
x 2

0
x<0
Note that X must be non-negative and that:

2
E (X) = exp +
2

V (X) = exp 2 + 2 exp 2 1 .


Also note that E (X) 6= exp () and V (X) 6= exp ( 2 ). In other words, we cannot simply transform
the parameters via exponentiation. The following figure illustrates the graphs of several lognormal
density functions.

Because ln (X) has a normal distribution, the cdf of X can be expressed in terms of the cdf
(z) of a standard normal random variable Z. For x 0:
F (x; , ) = P (X x) = P [ln (X) ln (x)]

ln (x)
ln (x)
=P Z
=
.

Example (Devore, Page 178, Example 4.27) Let X = the hourly median power (in decibels)
of received radio signals transmitted between two cities. The authors of a journal article
argue that the lognormal distribution provides a reasonable probability model for X. If the
parameter values are = 3.5 and = 1.2.
a. What are E (X) and V (X)?
Solution Using the proposition above:

!
(1.2)2
E (X) = exp 3.5 +
= 68.0335
2

V (X) = exp 2 (3.5) + (1.2)2 exp 1.22 1 = 14907.1677.


20

b. What is the probability that received power is between 50 and 250 dB?
Solution Using the standard normal cdf:
P (50 X 250) = F (250; 3.5, 1.2) F (50; 3.5, 1.2)

ln (250) 3.5
ln (50) 3.5
=

1.2
1.2
= (1.68) (0.34) = 0.9535 0.6331 = 0.3204.
c. What is the probability that X does not exceed its mean?
Solution Using the standard normal cdf:

ln (68.0) 3.5
= (0.60) = 0.7257.
P (X 68.0) =
1.2
If the distribution were symmetric, this probability would equal 0.5; it is much larger
because of the positive skew (long upper tail) of the distribution, which pulls outward
past the median.
Example (Devore, Page 181, Exercise 73) A theoretical justification based on a certain material failure mechanism underlies the assumption that ductile strength X of a material has a
lognormal distribution. Suppose the parameters are = 5 and = 0.1.
a. Compute E (X) and V (X).
Solution Using the proposition above:

!
(0.1)2
E (X) = exp 5 +
= 149.1571
2

V (X) = exp 2 (5) + (0.1)2 exp 0.12 1 = 223.5945.


b. Compute P (X > 120) and P (110 X 130).
Solution Using the standard normal cdf:

ln (120) 5
P (X > 120) = P Z >
= 1 (2.12) = 0.9830
0.1

ln (110) 5
ln (130) 5
P (110 X 130) = P
Z
0.1
0.1
= (1.32) (3.00) = 0.0921.
c. What is the value of median ductile strength?
Solution
= exp (5) = 148.4132.
d. If ten different samples of an alloy steel of this type were subjected to a strength test, how
many would you expect to have strength at least 120?
Solution Let Y = the number out of 10 which have strength at least 120. Then:
E (Y ) = 10P (X > 120) = 10 (0.9830) = 9.8300.
21

e. If the smallest 5% of strength values were unacceptable, what would the minimum acceptable strength be?
Solution We want the 5th percentile. Hence:

ln ( (0.05)) 5
0.05 =
ln ( (0.05)) = exp [5 + (0.1) (1.645)] = 125.9015.
0.1

22

23

The Weibull Distribution The Weibull distribution is a very flexible distributional family which
is very applicable in reliability and survival analysis. Its flexibility allows it to be a reasonable model
for a variety of random variables with skewed probability distributions.
A random variable X is said to follow a Weibull distribution with parameters and ( > 0, > 0)
if the pdf of X is:


x
1

x
exp
x0

f (x; , ) =
.

0
x<0
A variety of shapes are possible. As the figures below show, changing the scale parameter for
a fixed stretches the pdf.

Integrating to obtain E (X) and E (X 2 ) yields:

1
E (X) = 1

(

2 )
2
1
V (X) = 2 1
1+
,

where () is the gamma function:


Z

() =

x1 exp (x) dx.

The most important properties of the gamma function are:


For any > 1, () = ( 1) ( 1),
For any positive integer n, (n) = (n 1)!, and
24

1
2

One of the most useful features of the Weibull distribution is the simple form of the cdf:

1 exp
x0
F (x; , ) =
.

0
x<0
Note that X may be shifted such that the minimum value is not 0 as defined in the pdf. If this
minimum value is unknown, but positive, the pdf of X will just have x replacing x in the
cdf.
Example (Devore, Page 180, Exercise 67) The authors of a paper state that the Weibull distribution is widely used in statistical problems relating to aging of solid insulating materials
subjected to aging and stress. They propose the use of the distribution as a model for time
(in hours) to failure of solid insulating specimens subjected to AC voltage. The values of
the parameters depend on the voltage and temperature; suppose that = 2.5 and = 200
(values suggested by data in the paper).
a. What is the probability that a specimens lifetime is at most 200? Less than 200? More
than 300?
Solution Let X = a specimens time to failure. Then the desired probabilities are:
"
2.5 #
200
P (X 200) = 1 exp
= 1 exp (1) = 0.6321
200
P (X < 200) = P (X 200) = 0.6321

"
2.5 #
300
= 0.0636.
P (X > 300) = 1 P (X 300) = exp
200
b. What is the probability that a specimens lifetime is between 100 and 200?
h i
h i
2.5
2.5
Solution P (100 X 200) = exp 100

exp
200
= 0.4701.
200
200
c. What value is such that exactly 50% of all specimens have lifetimes exceeding that value?
Solution We want the median. The equation F (
) = 0.5 reduces to:
"
2.5 #

0.5 = exp
.
200
Therefore
= 172.7223.

25

26

The Beta Distribution We often need to model the distribution of a proportion (i.e., 0 < X <
1), where X is a continuous random variable. The beta distribution is often used in this framework.
X is said to have a beta distribution with parameters , , A, and B if the pdf of X is:

1
1
1
( + ) x A
Bx

AxB
f (x; , , A, B) =
.
BA
B A () () B A

0
otherwise
The case A = 0 and B = 1 gives the standard beta distribution.
The mean and variance for a beta distribution are:

+
2
(B A)
V (X) =
.
( + )2 ( + + 1)
E (X) = A + (B A)

The Family of Gamma Distributions Another widely used distributional model for skewed
data is the gamma family of distributions.
A continuous random variable X is said to have a gamma distribution if the pdf of X is:

1
x

x1 exp
x0

,
f (x; , ) =
()

0
otherwise
where > 0, > 0, and () is gamma function defined above. The standard gamma distribution
has = 1.
1
x1 exp (x). The pdf is strictly
For the standard gamma distribution, the pdf is f (x; ) = ()
decreasing for any 1 and has a skewed shape (with a definite maximum) for any > 0. The
figures below illustrate some gamma density functions and standard gamma density functions.

The mean and variance for a gamma distribution are:


E (X) =
V (X) = 2 .

27

The proof for E (X) = is:


Z

xx
exp
x f (x) dx =
dx =
()

0

Z x exp x

=
dx = (1) = .
+1
( + 1)
0
|
{z
}

E (X) =

exp
x x

()

dx

GAMMA(+1,) pdf

The parameter is the shape parameter. For 1, the pdf is strictly decreasing. The
parameter is a scale parameter. It stretches ( > 1) or compresses ( < 1) the pdf for a constant
. Therefore, the gamma pdf can be very flexible for representing many skewed distributions.
The cdf of the standard gamma distribution ( = 1) is given by the incomplete gamma function:
Z x 1
y
exp (y)
F (x; ) =
dy,
()
0
for x > 0. Table A.4 in Devore (p. 706) gives values for the incomplete gamma function for various
values of x and .
The incomplete gamma function can also be used for a general . Let X GAMMA(, ).
Then:

x
P (X x) = F
; ,

where F is the incomplete gamma function.


Example (Devore, Page 173, Exercise 57) Suppose that when a transistor of a certain type is
subjected to an accelerated life test, the lifetime X (in weeks) has a gamma distribution with
mean 24 weeks and standard deviation 12 weeks.
a. What is the probability that a transistor will last between 12 and 24 weeks?
Solution We are given that = 24 and 2 = 122 = 144. Therefore:
2
144
=
=6

24
24
24
=
=
= 4.

6
=

Hence:

24
12
P (12 X 24) = F
; 4 F
;4
6
6
= F (4; 4) F (2; 4) = 0.567 0.143 = 0.424.
b. What is the probability that a transistor will last at most 24 weeks? Is the median of the
lifetime distribution less than 24? Why or why not?

28

Solution The desired probability is:


P (X 24) = F (4; 4) = 0.567,
so while the mean is 24, the median is less than 24. This is a result of the positive skew
of the gamma distribution.
c. What is the 99th percentile of the lifetime distribution?

Solution We need c such that 0.99 = P (X c) = F 6c ; 4 . From Table A.4, we see that
c
= 10. Hence c = 60.
6
d. Suppose the test will actually be terminated after t weeks. What value of t is such that
only one-half of 1% of all transistors would still be operating at termination?
Solution The desired value of t is the 99.5th percentile, so:

t
t
0.995 = F
; 4 = 11 t = 66.
6
6

29

30

The Exponential Distribution A special case of the gamma distribution is the exponential
distribution. Taking = 1 and = 1 gives the exponential pdf:

exp (x) x 0
f (x; ) =
,
0
x<0
for > 0.
The expected value and variance of an exponential random variable X are:

1
1
E (X) = = (1)
=

2
1
1
V (X) = 2 = (1)
= 2.

The cdf of an exponential random variable X is:

1 exp (x) x 0
F (x; ) =
.
0
x<0
The exponential distribution is also a special case of the Weibull distribution with = 1 and = 1 .
The exponential distribution is frequently used as the model for distribution of inter-arrival times
or the times between successive events.
We have already discussed the Poisson distribution as a possible model for the number of events
occurring in a time interval of length t. If the occurrence of such events is distributed as Poisson
with parameter t then the distribution of the elapsed time between successive events is distributed
as exponential with parameter = .
Another application of the exponential distribution is to model the distribution of component
lifetime. This application is the memoryless property:
P (X t2 | X t1 ) = P (X t) = exp (t) ,
for t2 = t1 + t. Although we havent discussed conditional probability in much detail, this property
says that the probability of failure for an additional t units of times is the same as the probability
of surviving any t units of time, irrespective of the fact the we know it didnt fail after t1 units.
Example (Devore, Page 173, Exercise 59) The time X (in seconds) that it takes a librarian to
locate an entry in a file of records on checked-out books has an exponential distribution with
expected time 20 seconds. Calculate the following probabilities: P (X 30), P (X 20), and
P (20 X 30).
Solution The value of is =

1
E(X)

1
.
20

The desired probabilities are then:

30
P (X 30) = 1 exp
= 0.7769
20

20
P (X 20) = 1 1 exp
= exp (1) = 0.3679
20

30
20
P (20 X 30) = 1 exp
1 exp
= 0.1447.
20
20

Note that this non-symmetric distribution, the probability of an observed X being greater
than the mean is not 0.5.
31


The Chi-Squared Distribution The chi-squared distribution is another member of the gamma
family with = 2 and = 2. A random variable X has a chi-squared distribution with degrees

32

of freedom, denoted X 2 , if it has pdf:

x
1

(/2)1
x
exp 2 x 0
f (x; ) =
,
2/2 2

0
x<0
for = 1, 2, 3, ... .
If X 2 , then:
E (X) =
V (X) = 2.
The chi-squared distribution is widely used in statistical inference. In fact, if X N (0, 1),
then X 2 21 . The most commonly used procedure in inference which involves the chi-squared
distribution is the Pearson statistic:
k
X
(Oi Ei )2
,
E
i
i=1
used to see whether categorical data consisting of elements y1 , y2 , ..., yk in k cells fits pre-specified
probabilities of falling in these cells. Under fairly general conditions, this statistic will (in the long
run for many samples) follow a distribution which is 2k1 .

33

34

4.6 Probability Plots


Given a sample of size n (x1 , x2 , ..., xn ), how do we decide whether or not a particular distribution
is appropriate for modelling? Assuming we have a continuous random variable, a probability plot
is a mechanism for comparing the distribution of the observed data with a reference distribution
in order to determine if the family of the reference distribution is a reasonable model for the data.
The method makes use of sample quantiles. The pth quantile is the (100p)th percentile. Recall that
the (100p)th percentile is the number (p) such that F ( (p)) = p.
We order the data set from smallest to largest to obtain the sample order statistics, x(1) , x(2) , ..., x(n) ,
where x(i) is the ith smallest observation. Due to the possibility of n being even and
h hence ithe
position of a percentile is actually between two observations we define x(i) to be the 100(i0.5)
th
n
sample percentile.
A probability plot uses the order pair:

100 (i 0.5)
th Reference Percentile, ith Smallest Sample Observation .
n
In other
words,
h
i were looking to see how close the ith smallest sample observation matches up with
100(i0.5)
the
th percentile of the reference distribution. A straight line is a good match.
n
Example (Devore, Page 183, Example 4.29) The value of a certain physical constant is known
to an experimenter. The experimenter makes n = 10 independent measurements of this
value using a particular measurement device and records the resulting measurement errors.
These observations appear in the following table (ordered with the corresponding reference
percentiles).
Is is plausible that the random variable measurement error has a standard normal distribution?
The needed standard normal percentiles are also displayed in the table. Thus, the points in the
probability plot are (1.645, 1.91) , (1.037, 1.25) , ..., and (1.645, 1.56). The figure below shows
the resulting plot. Although the points deviate a bit from the 45 line, the predominant impression
is that this line fits the points very well. The plot suggests that the standard normal distribution
is a reasonable probability model for measurement error.

35

Families other than the normal family can also be compared to a standard distribution. For two
parameter families with location and scale parameters 1 and 2 , this corresponds to 1 = 0 and
2 = 1. Hence the percentiles of the standard reference distribution corresponding to 100(i0.5)
for
n
i = 1, 2, ..., n are plotted against the sorted data set as with the normal distribution. Again, plots
close to a straight line indicate good fit.
Another distribution which is useful when looking at probability or quantile-quantile (QQ) plots
may be the extreme value distribution with parameters 1 and 2 . The cdf of the extreme value
distribution is:

x 1
F (x; 1 , 2 ) = 1 exp exp
.
2
When considering a Weibull distribution for X, we know that for X WEIB(, ), ln (X) has an
extreme value distribution with 1 = ln () and 2 = . The incomplete gamma function makes
expression involving the quantiles of the Weibull distribution difficult, so this result is beneficial.
Since an exponential distribution is a special case of the Weibull distribution, it can also be checked
via this method.

36

Potrebbero piacerti anche