Unit 4 - Continuous Random Variables
Unit 4 - Continuous Random Variables
Examples
Normal distribution
Gamma distribution
4
Remarks
If X is continuous, then:
b
P(a X b) P (a X b) P (a X b) f ( x )dx.
a
a
P( X a) P( X a) f ( x )dx
P( X a ) P ( X a ) f ( x )dx.
a
5
Example 1
Let X be a continuous r.v. with pdf
2 x 0 x 1
2.0
f ( x) 1.5
0 otherwise
f(x)
1.0
0.3
P (0 X 0.3) 2 xdx x 2 |00.3
0.0
0 0.3 1
X
0.8
f(x)
0.6
1.0
6
Cumulative Distribution Function (CDF)
Let X be a continuous random variable with
probability density function f(x). The cumulative
distribution function (cdf) of X is the function
x
F ( x) P ( X x) f (t )dt.
7
More on cdf
The pdf of a continuous random variable can be
obtained from the cdf by differentiating
f(x)=dF(x)/dx.
8
Example 2
Find the cdf of the r.v. with the pdf
2 x 0 x 1 .
f ( x)
0 otherwise
Solution:
x
F ( x) 2t dt t 2 |0x x 2 1.0
0 0.8
0 x0 0.6
F(x)
2 0.4
F ( x) x 0 x 1 0.2
1 x 1
0.0
P(0<X<0.3)=F(0.3)-F(0)=0.32-0=0.09
9
Example 3
A hole is drilled in a sheet-metal component, and then a
shaft is inserted through the hole. The shaft clearance is
equal to the difference between the radius of the hole
and the radius of the shaft. Let the random variable X
denote the clearance, in millimeters. The probability
density function of X is
1.25(1 x 4 ), 0 x 1
f ( x)
0, otherwise
k 1 ( x 3) 2
f ( x)
2 x4
0 otherwise
a) Find the value of k.
b) Find F(x).
c) What is the probability that the actual tracking
weight is greater than the prescribed weight?
d) What is the probability that the actual weight is
within 0.25 gm of the prescribed weight?
11
Mean and Variance
Suppose X is a continuous random variable with
probability density function f(x).
The expected value or mean value of X is:
X xf ( x)dx.
( x X ) 2 f ( x)dx
2
X
The variance of X is:
x 2 f ( x)dx X2 .
h ( X ) h( x) f ( x)dx.
In general,
12
Example 4
An internal combustion engine contains several
cylinders bored into an engine block. Let X denote
the bore diameter of a cylinder, in millimeters.
Assume that the probability distribution of X is
13
Exercise
A firm has been monitoring its total daily telephone
usage. The daily use of time conforms to the following
probability density function (measured in hours).
643 x 2 (4 x) 0 x 4
f ( x)
0 otherwise
a) Find the F(x) for daily telephone usage X.
b) Find the probability that the time telephone usage
by the firm will exceed two hours for a selected
week.
c) Find the mean, variance, and standard deviation of
the firm’s daily telephone usage.
14
Commonly Used Continuous Distributions
Normal distribution
Gamma distribution
15
Normal Distribution
The normal distribution (also called the
Gaussian distribution) is by far the most
commonly used distribution in statistics. This
distribution provides a good model for many,
although not all, continuous populations.
16
Normal Distribution
The probability density function of a normal
population with mean and variance 2 is given
by
1 2
/ 2 2
f ( x) e ( x )
, x
2
If X ~ N(, 2), then the mean and variance of X
are given by
X
2
X
2
17
Standard Normal Distribution
In general, we convert to standard units by
subtracting the mean and dividing by the
standard deviation.
21
Standard Normal Distribution
The number z is sometimes called the “z-score”
of x.
22
Example 5
Aluminum sheets used to make beverage
cans have thicknesses (in thousandths of an
inch) that are normally distributed with
mean 10 and standard deviation 1.3. A
particular sheet is 10.8 thousandths of an
inch thick. Find the z-score.
23
CDF of a standard normal random
variable
24
Finding Normal Probabilities
The standard normal can be used to find the
probabilities associated with an arbitrary normal
random variables by “standardizing” it first as
shown below.
27
Example 7
The thickness of a certain sheet has a z-score of
1.7. Find the thickness of the sheet in the original
units of thousandths of inches.
29
Example 8
The weekly amount spent for maintenance and
repairs in a certain company has an
approximately normal distribution, with a mean
of $600 and a standard deviation of $40. If $700
is budgeted to cover repairs for next week, what
is the probability that the actual costs will exceed
the budgeted amount? Distribution Plot
Normal, Mean=600, StDev=40
700 600
P ( X 700) P ( Z )
0.010
40 0.008
P ( Z 2.5) 0.006
Density
0.004
1 (2.5) 0.002
1 0.9938 0.0062
0.00621
0.000
600 700
X
30
Example 9
In the previous example, how much should be
budgeted weekly for maintenance and repairs to
ensure that the probability that the budgeted
amount will be exceeded in any given week is
only 0.1?
P(X > a) = .1 or P(X < a) =0.9
Consider P(Z<z)=0.9, so z=-1(0.9)=1.28
a = +z = 600 + 1.28 (40) = $651.2
In Minitab,
P(X<a)=F(a)=0.9, so a=F-1(0.9)=$651.2
31
Exercises
1) A certain type of storage battery lasts on the
average 3.0 years with a standard deviation of
0.5 years. Assuming that the battery lives are
normally distributed, find the probability that a
given battery will last less than 2.3 years.
33
Exercises
2. The lifetime of computer chips is approximately
normal with mean 1.4×106 hours and standard
deviation 3×105 hours. The statistics department
has 5 computers built with that chip as the main
component. What is the probability that all 5
computers last longer than 1.8×106 hours?
34
Gamma Function
For r 0, the gamma function is defined by
(r ) x r 1e x dx
0
35
Gamma Distribution
A continuous random variable X is said to have
gamma distribution if its pdf is
r r 1 x
x e x0
f ( x; r , ) (r )
0 otherwise
Where the parameters r 0 and 0. The standard
gamma distribution has 1. Here r is called the
shape parameter and 1 / is called the scale
parameter. Is called the rate.
The mean and variance of gamma distribution are
E( X ) r / V ( X ) r / 2 .
and 36
Special Case
When r=1 we get the exponential
distribution.
37
Example 10
Suppose the survival time X in weeks of a randomly selected male
mouse exposed to 240 rads of gamma radiation has a gamma
distribution with r 8 (shape parameter) and 0.2 (rate ).
NB: rate = 1/scale parameter
a) Calculate the expected survival time.
E(X)=8/0.2= 40 weeks.
b) Calculate the variance.
V(X)=8/0.2^2=200
c) Calculate the probability that a mouse survives between 60
and 120 weeks.
P (30 X 60) p ( x 60) p ( x 30)
F( 60 )-F( 30 )
0.911- 0.256
38
0.655
Minitab Output of Example 10
39
Exercise
Suppose the time spent by a randomly selected student who
uses a terminal connected to a local time-sharing computer
facility has a gamma distribution with mean 20 min and
variance 80 min^2.
1. What are the values of r and ?
2. What is the probability that a student uses the terminal for
at most 24 min?
3. What is the probability that a student spends between 20
and 40 min using the terminal?
40