Download Random Variables

Document related concepts
no text concepts found
Transcript
Chapter 5
Probability Densities
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Continuous Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Random Variable
For a given sample space S of some
experiment, a random variable is any
rule that associates a number with
each outcome in S .
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Types of Random Variables
A discrete random variable is an rv whose
possible values either constitute a finite
set or else can listed in an infinite
sequence. A random variable is
continuous if its set of possible values
consists of an entire interval on a number
line.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Random Variables
Represents a possible numerical value
from a random event
Random
Variables
Discrete
Random Variable
Continuous
Random Variable
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Continuous Random Variables
A random variable X is continuous if its
set of possible values is an entire
interval of numbers (If A < B, then any
number x between A and B is possible).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Continuous Probability Distribution
Let X be a continuous rv. Then a
probability distribution or probability
density function (pdf) of X is a function
f (x) such that for any two numbers a
and b,
P a  X  b    f (x )dx
b
a
The graph of f is the density curve.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Probability Density Function
For f (x) to be a pdf
1. f (x) > 0 for all values of x.
2.The area of the region between the
graph of f and the x – axis is equal to 1.
y  f ( x)
Area = 1
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Probability Density Function
P (a  X  b )is given by the area of the shaded
region.
y  f ( x)
a
b
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Probability for a Continuous rv
If X is a continuous rv, then for any
number c, P(x = c) = 0. For any two
numbers a and b with a < b,
P (a  X  b )  P (a  X  b )
 P (a  X  b )
 P (a  X  b )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Cumulative Distribution Function
The cumulative distribution function,
F(x) for a continuous rv X is defined for
every number x by
F (x )  P  X  x    f ( y )dy
x

For each x, F(x) is the area under the
density curve to the left of x.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Using F(x) to Compute Probabilities
Let X be a continuous rv with pdf f(x)
and cdf F(x). Then for any number a,
P  X  a   1  F (a)
and for any numbers a and b with a < b,
P a  X  b   F (b )  F (a)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Obtaining f(x) from F(x)
If X is a continuous rv with pdf f(x)
and cdf F(x), then at every number x
for which the derivativeF ( x ) exists,
F (x )  f (x ).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Percentiles
Let p be a number between 0 and 1. The
(100p)th percentile of the distribution of a
continuous rv X denoted by  ( p ), is
defined by
p  F  ( p )   
(p)

f ( y )dy
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Median
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  .
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
of Continuous Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Expected Value
The expected or mean value of a
continuous rv X with pdf f (x) is
X  E  X  

 x  f ( x)dx

Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Expected Value of h(X)
If X is a continuous rv with pdf f(x) and
h(x) is any function of X, then
E  h( x )    h ( X ) 

 h( x)  f ( x)dx

Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Variance and Standard Deviation
The variance of continuous rv X with
pdf f(x) and mean  is
2
X

 V ( x) 
 (x  )

2
 f ( x)dx
 E[ X    ]
2
The standard deviation is  X  V ( x).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Short-cut Formula for Variance
    E ( X )
V (X )  E X
2
2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Covariance between two discrete
random variables:
σxy =  [x – E(x)] [y – E(y)] f(xy)
where:
xi = possible values of the x discrete random
variable
yj = possible values of the y discrete random
variable
P(xi ,yj) = joint probability of the values of xi and yj
occurring
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Let X and Y be random variables,
The Covariance of X and Y is
 XY  E [(X  X )(Y  Y )
 E (XY )  X Y
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Correlation Coefficient
• The Correlation Coefficient shows
the strength of the linear association
between two variables
σxy
ρ
σx σy
where:
ρ = correlation coefficient (“rho”)
σxy = covariance between x and y
σx = standard deviation of variable x
σy = standard deviation of variable y
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Interpreting the
Correlation Coefficient
• The Correlation Coefficient always falls
between -1 and +1
=0
x and y are not linearly related.
The farther  is from zero, the stronger the linear
relationship:
 = +1
x and y have a perfect positive linear
relationship
 = -1
x and y have a perfect negative linear
relationship
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
4.3
Mean and Variance of Linear
Combinations of Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Expected Value of Linear Combinations
E (aX  b)  a  E ( X )  b
This leads to the following:
1. For any constant a,
E (aX )  a  E ( X ).
2. For any constant b,
E ( X  b)  E ( X )  b.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Expected Value of
E [ g (X )  h (X )]  E [ g (X )]  E [h (X )]
Also
E [ g (X ,Y )  h (X ,Y )] 
E [ g (X ,Y )]  E [h (X ,Y )]
Finally
E [Y  X ]  E [Y ]  E [X ]
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are independent, then
E (XY )  E (X )E (Y )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
• Expected value of the sum of two
discrete random variables:
E(x + y) = E(x) + E(y)
=  x P(x) +  y P(y)
(The expected value of the sum of two
random variables is the sum of the two
expected values)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Rules of Variance
V (aX
2
 b)   aX b
a
2
2
 X
and  aX b  a   X
This leads to the following:
1.
2.
2
2
2
 aX  a   X ,  aX
2
2
 X b   X
 a  X
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are random variables,
then

2
aX bY
 a   b   2ab XY
2
2
X
2
2
Y
If X and Y are Independent
random variables, then

2
aX bY
 a  b 
2
2
X
2
2
Y
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are Independent
random variables, then

2
aX bY
 a  b 
2
2
X
2
2
Y
If X1, X2, … Xn are
Independent random variables,
then 2
a X
1
a
2
1
1 a2 X 2 ...an X n
2
X1
a 
2
2
2
X2

 ...  a 
2
n
2
Xn
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Special Continuous
Probability Densites
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Uniform Distribution
A continuous rv X is said to have a
uniform distribution on the interval [A, B]
if the pdf of X is
 1
A x B

f  x; A, B    B  A
 0
otherwise
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Normal Distribution
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Normal Distributions
A continuous rv X is said to have a
normal distribution with parameters
 and  , where       and
0   , if the pdf of X is
1
 ( x   )2 /(2 2 )
f ( x) 
e
  x  
 2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Standard Normal Distributions
The normal distribution with parameter
values   0 and   1 is called a
standard normal distribution. The
random variable is denoted by Z. The
pdf is
1
 z2 / 2
f ( z;0,1) 
e
  z  
 2
The cdf is
z
 ( z )  P( Z  z ) 

f ( y;0,1)dy

Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Standard Normal Cumulative Areas
Shaded area = (z )
Standard
normal
curve
0
z
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Standard Normal Distribution
Let Z be the standard normal variable.
Find (from table)
a. P( Z  0.85)
Area to the left of 0.85 = 0.8023
b. P(Z > 1.32)
1  P( Z  1.32)  0.0934
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
c. P(2.1  Z  1.78)
Find the area to the left of 1.78 then
subtract the area to the left of –2.1.
= P( Z  1.78)  P( Z  2.1)
= 0.9625 – 0.0179
= 0.9446
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
z Notation
z will denote the value on the
measurement axis for which the area
under the z curve lies to the right of z .
Shaded area
 P(Z  z )  
0
z
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. Let Z be the standard normal variable. Find z if
a. P(Z < z) = 0.9278.
Look at the table and find an entry
= 0.9278 then read back to find
z = 1.46.
b. P(–z < Z < z) = 0.8132
P(z < Z < –z ) = 2P(0 < Z < z)
= 2[P(z < Z ) – ½]
= 2P(z < Z ) – 1 = 0.8132
P(z < Z ) = 0.9066
z = 1.32
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Nonstandard Normal Distributions
If X has a normal distribution with
mean  and standard deviation  , then
Z
X 

has a standard normal distribution.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Normal Curve
Approximate percentage of area within
given standard deviations (empirical
rule).
99.7%
95%
68%
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. Let X be a normal random variable
with   80 and   20.
Find P( X  65).
65  80 

P  X  65   P  Z 

20 

 P  Z  .75
= 0.2266
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. A particular rash shown up at an
elementary school. It has been
determined that the length of time that the
rash will last is normally distributed with
  6 days and   1.5 days.
Find the probability that for a student
selected at random, the rash will last for
between 3.75 and 9 days.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
96
 3.75  6
P  3.75  X  9   P 
Z

1.5 
 1.5
 P  1.5  Z  2
= 0.9772 – 0.0668
= 0.9104
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Percentiles of an Arbitrary Normal
Distribution
(100p)th percentile
(100 p)th for 








,

for normal 

standard normal 
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Normal Approximation to the
Binomial Distribution
Let X be a binomial rv based on n trials, each
with probability of success p. If the binomial
probability histogram is not too skewed, X
may be approximated by a normal distribution
with

 np and   npq .
 x  0.5  np 
P( X  x)   



npq


Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. At a particular small college the pass rate
of Intermediate Algebra is 72%. If 500
students enroll in a semester determine the
probability that at least 375 students pass.
  np  500(.72)  360
  npq  500(.72)(.28)  10
 375.5  360 
P( X  375)   
  (1.55)
10


= 0.9394
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Gamma
Distribution
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Gamma Function
For   0, the gamma function
( ) is defined by

 1  x
( )   x
e dx
0
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Gamma Distribution
A continuous rv X has a gamma
distribution if the pdf is
 1
 1  x / 
x e
x0
 
f ( x; ,  )    ( )

0
otherwise

where the parameters satisfy   0,   0.
The standard gamma distribution has   1.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
The mean and variance of a random
variable X having the gamma distribution
f ( x;  ,  ) are
E( X )     V ( X )    
2
2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Exponential Distribution
A continuous rv X has an exponential
distribution with parameter  if the pdf is
 e x x  0
f ( x;  )  
0

otherwise
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
The mean and variance of a random
variable X having the exponential
distribution
   
1

   
2
2
1

2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Probabilities from the Gamma
Distribution
Let X have a exponential distribution
Then the cdf of X is given by
x0
 0
F ( x;  )  
 x
x0
1  e
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Applications of the Exponential
Distribution
Suppose that the number of events
occurring in any time interval of length t
has a Poisson distribution with parameter  t
and that the numbers of occurrences in
nonoverlapping intervals are independent
of one another. Then the distribution of
elapsed time between the occurrences of
two successive events is exponential with
parameter    .
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Chi-Squared Distribution
Let v be a positive integer. Then a
random variable X is said to have a chisquared distribution with parameter v if
the pdf of X is the gamma density with
  v / 2 and   2. The pdf is
1

(v / 2)1  x / 2
x
e
 v/2
f ( x; v)   2 (v / 2)

0

x0
x0
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Chi-Squared Distribution
The parameter v is called the number of
degrees of freedom (df) of X. The
2
symbol  is often used in place of “chisquared.”
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Other Continuous
Distributions
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Weibull Distribution
A continuous rv X has a Weibull
distribution if the pdf is
   1 ( x /  )
  x e
f ( x;  ,  )   

0

x0
x0
where the parameters satisfy   0,   0.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
The mean and variance of a random
variable X having the Weibull
distribution are
2

1
2  
1  

2
2 
     1        1       1    
 
         
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Lognormal Distribution
A nonnegative rv X has a lognormal
distribution if the rv Y = ln(X) has a
normal distribution the resulting pdf has
parameters  and  and is
 1
[ln( x )  ]2 /(2 2 )
e

f ( x;  ,  )   2 x

0

x0
x0
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
The mean and variance of a variable X
having the lognormal distribution are
E( X )  e
  2 / 2
V (X )  e
2   2
e
2

1
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Beta Distribution
A rv X is said to have a beta distribution
with parameters A, B,   0, and   0
if the pdf of X is
f ( x;  ,  , A, B) 
 1
 1
 1
(   )  x  A   B  x 



 

 B  A ( )  (  )  B  A   B  A 

0
otherwise

x0
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
The mean and variance of a variable X
having the beta distribution are
  A  ( B  A) 
 
2

 
( B  A) 
2
(   ) (    1)
2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Related documents