0% found this document useful (0 votes)
57 views

Unit 4 - Continuous Random Variables

This document discusses continuous random variables and their probability density functions. It provides examples of key concepts like the normal and gamma distributions. Specifically, it covers the probability density function, cumulative distribution function, expected value, and variance. It also provides examples of calculating probabilities and distributions for different continuous random variables.

Uploaded by

Shouq Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Unit 4 - Continuous Random Variables

This document discusses continuous random variables and their probability density functions. It provides examples of key concepts like the normal and gamma distributions. Specifically, it covers the probability density function, cumulative distribution function, expected value, and variance. It also provides examples of calculating probabilities and distributions for different continuous random variables.

Uploaded by

Shouq Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

STAT 210

Probability and Statistics


Unit 4:
Continuous Random Variables
Outline
 Continuous random variables
 Probability density function
 Cumulative probability distribution
 Expected value, Variance, Standard deviation

 Examples
 Normal distribution
 Gamma distribution

STAT210: Probability and Statistics 2


Introduction
 Recall: A random variable X is continuous if its
possible values are contained in interval.
 Examples: Electrical current, pressure, time,
weight, length, temperature.

 For a continuous random variable, its


probabilities are given by areas under a curve.
 The curve is called a probability density
function (pdf) for the random variable.
 Sometimes the pdf is called the probability
distribution.
3
Probability Density Function
 For a continuous random variable X, the
probability density function (pdf), is a function
such that:
1. f ( x)  0

2. 
-
f ( x) dx  1
b
3. P (a  X  b)  
a
f ( x) dx , for any two numbers a
and b with a < b.

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

 Find P(X<0.3) 0.5


0.09

0.3

P (0  X  0.3)  2 xdx  x 2 |00.3
0.0
0 0.3 1
X

 0.32  0 2  0.09 2.0

 Find P(0.2<X<0.8) 1.5

0.8

f(x)
0.6


1.0

P (0.2  X  0.8)  2 xdx  x 2 |00..82


0.2 0.5

 0.82  0.2 2  0.60 0.0


0 0.2
X
0.8 1

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.

 Let X be a continuous rv with cdf F(x). Then,


 P(X>a)=1-F(a)
 P(a  X  b)=F(b)-F(a)

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 x0 0.6

F(x)
 2 0.4

F ( x)   x 0  x 1 0.2

1 x 1

0.0

-1.0 -0.5 0.0 0.5 1.0 1.5 2.0


x

 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

1.Find the cumulative distribution function F(x)

2. Components with clearances larger than 0.8 mm must


be scraped. What proportion of components are
scrapped?
10
Exercise
 The actual tracking weight of a stereo cartridge
that is set to track at 3 gm on a particular change
can be regarded as a continuous r.v. X with pdf


k 1  ( x  3) 2
f ( x)  
 2 x4
 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

10, 80.5  x  80.6


f ( x)  
0, otherwise
Let A  πX 2 4 represent the area of the bore.
Find the mean of A.

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.

 The normal distribution is continuous rather than


discrete. The mean of a normal population may
have any value, and the variance may have any
positive value.

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.

 Thus, if x is an item sampled from a normal


population with mean  and variance 2, the
standard unit equivalent of x is the number z,
where
x
z

21
Standard Normal Distribution
 The number z is sometimes called the “z-score”
of x.

 The z-score is an item sampled from a normal


population with mean 0 and standard deviation of
1. This normal population is called the standard
normal population.

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

 The cumulative distribution function of a


standard normal random variable is denoted as
F(X)= P(X ≤ x)=(z)= P(Z ≤ z).

 We use minitab to find (z) and F(x) as will be


given in the next slides.

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.

 In Minitab, the cdf, F(x) can be directly computed


for any normal random variable by specifying the
mean and the standard deviation.
25
Backward calculations
 We could find the observed value (x) of a given
proportion in N( , 2) by unstandardizing the z-
value.
 State the problem
 Draw a picture
 Find the z-value corresponding to the lower tail
probability using -1.
 Unstandardize x= + z
 In Minitab, the inverse cdf, F-1 can be directly
computed for any normal random variable.

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.

2) An electrical firm manufactures light bulbs that


have a length of life that is normally distributed
with mean equal to 800 hours and a variance of
1600 hours. Find the probability that a bulb
burns between 778 and 834 hours.
32
Exercises
1. Suppose the force acting on a column that helps to
support a building is normally distributed with
mean 15 kips and standard deviation 1.25 kips.
a) What is the probability that the force is at most
18 kips?
b) What is the probability that the force is between
10 and 12 kips?
c) What is the probability that the force differs
from 15 kips by at most 2 standard deviations?
d) How would you characterize the largest 5% of
all values of the force?

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

Important properties of gamma function:


1. If r is any integer, then Γ(r) = (r-1)!.
2. For any r, Γ(r+1) = r Γ(r).
3. Γ(1/2) =  .

35
Gamma Distribution
A continuous random variable X is said to have
gamma distribution if its pdf is
 r r 1 x
 x e x0
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

You might also like