Download Cumulative Distribution Function

Document related concepts
no text concepts found
Transcript
Lecture note 6
Continuous Random Variables and
Probability distribution
Continuous Random Variables
A random variable is continuous if
it can take any value in an interval.
Probability Distribution of
Continuous Random Variables
 For continuous random variable, we use
the following two concepts to describe
the probability distribution
1. Probability Density Function
2. Cumulative Distribution Function
Probability Density Function
Probability Density Function is a similar
concept as the probability distribution
function for a discrete random variable.
You can consider the probability density
function as a “smoothed” probability
distribution function.
Comparing Probability Distribution
Function (for discrete r.v) and Probability
density function (for continuous r.v)
Binimial probability Distribution function with success prob 0.5
and total # trial 50
0.12
Probability Dinsity Function Example (Normal
Distribution with mean 25 and SD 3.2)
0.12
0.1
0.1
0.08
0.08
0.06
0.06
0.04
0.04
0.02
0.02
0
0
1
4
7
10 13 16 19 22 25 28 31 34 37 40 43 46 49
0
5
10
15
20
25
30
35
40
45
50
Comparing Probability Distribution
Function (Discrete r.v) and Probability
density function
Binimial probability Distribution function with success prob 0.5
and total # trial 50
0.12
0.1
0.08
0.06
0.04
0.02
0
1
4
7
10
13
16
19
22
25
28
31
34
37
40
43
46
49
Probability distribution function for a discrete random
variable shows the probability for each outcome.
Comparing Probability Distribution
Function (Discrete r.v) and Probability
density function (Continuous r.v)
f(x)
0
a
b
x
Probability Density Function shows the probability
that the random variable falls in a particular range.
Probability density function
Let X be a continuous random variable.
Let x denotes the value that the random
variable X takes. We use f(x) to denote the
probability density function.
Example
You client told you that he will visit you
between noon and 2pm. Between noon
and 2pm, the time he will arrive at your
company is totally random. Let X be the
random variable for the time he arrives
(X=1.5 means he visit your office at
1:30pm)
Let x be the possible value for the random
variable X. Then, the probability density
function f(x) has the following shape.
Probability Density Function
Example
f(x)
0.5
0
2
x
Probability Density Function
Example
The probability that your client
visits your office between 12:30
and 1:00 is given by the shaded
area.
f(x)
0.5
0
0.5
1
2
x
Probability Density Function
Example
f(x)
Note that area between 0 and 2 should be
equal to 1 since the probability that your
clients arrives between noon and 2pm is 1
(assuming that he will keep his promise that
he will visit between noon and 2pm)
0.5
0
2
x
Some Properties of probability
density function
1. f(x)≥0 for any x
2. Total area under f(x) is 1
Cumulative Distribution
Function
The cumulative distribution function, F(x), for a
continuous random variable X expresses the
probability that X does not exceed the value of x,
as a function of x
F ( x)  P( X  x)
In other words, the cumulative
distribution function F(x) is given by
the shaded area.
f(x)
F(x)=P(X≤x)
x
x
Cumulative Distribution Function
-Example-
f(x)
F(x)
Density
Function
Cumulative
Distribution
Function
1
0.5
0
x
2
0
2
A property of cumulative distribution
functions
P ( a  X  b)  P ( X  b)  P ( X  a )
 F (b)  F (a)
Probability Density Function and Cumulative
Distribution Function
-ExerciseThe daily revenue of a certain shop is a
continuous random variable. Let X be the
random variable for the daily revenue (in
thousand dollars). Suppose that X has the
following probability density function.
f ( x)  0.25
0
for 0  x  4
otherwise
Ex.1 Graph f(x),
Ex. 2 Find F(3),
Ex.3 Find P(2<X<3)
Ex. 4 Graph F(x)
Relationship Between Probability Density
Function and Cumulative Distribution
Function
Let X be a continuous random variable. Then,
there is a following relationship between
probability density function and cumulative
distribution function.
P(a  X  b)  F (b)  F (a)


b
a
f (u )du
Expectation for continuous
random variable
Expectation for a continuous random
variable is defined in a similar way as the
expectation for a discrete random
variable.
See Next Page
Expectation for the discrete random
variable is defined as
Discrete case : E ( X )   xP( x)
x
 For continuous variable, f(x) corresponds to
P(x). However, we cannot sum xf(x) since the
value of x is continuous. Therefore, we define the
expectation using integral in the following way.
x
Continuous Case : E(X)   xf ( x)dx
x
where x is the lowest possible value of X and x
is the highest possible value for X. We use μX to
denote E(X) .
Expectation of a function of a
continuous random variable
Let g(X) be a function of a continuous
random variable X. Then the expectation
of g(X) is given by the following.
x
E[g(X)]   g ( x) f ( x)dx
x
A special case is the variance given in the next slide
Variance and standard deviation
for the continuous random
variable
Variance and standard deviation for a
continuous random variable are defined
as
x
Var ( X )     ( x   X ) f ( x)d x
2
X
2
x
SD( X )   X  Var( X )
Expected value
for Continuous Random variable
-ExerciseContinue using the daily revenue example.
The probability density function for X is given
by
f ( x)  0.25
0
for 0  x  4
otherwise
Compute E(X) and SD(X)
Linear Functions of Variables
Let X be a continuous random variable with mean X and
variance X2, and let a and b any constant fixed numbers.
Define the random variable W as
W  a  bX
Then the mean and variance of W are
W  E (a  bX )  a  b X
and
 W2  Var (a  bX )  b 2 X2
and the standard deviation of W is
W  b  X
Linear Functions of Variables
-ExerciseContinue using the daily sales example.
Suppose that the manager’s daily salary in
thousand dollars is determined in the following
way.
W=4+0.5X
Ex: Compute E(W) and SD(W)
Linear Functions of Variable
An important special case of the previous results is
the standardized random variable
Z
X  X
X
which has a mean 0 and variance 1.
Normal Distribution
A random variable X is said to be a normal
random variable with mean μ and variance σ2 if X
has the following probability density function.
f ( x) 
1
2 2
e
 ( x   ) 2 / 2 2
for -   x  
where e and  are physical constants, e =
2.71828. . . and  = 3.14159. . .
Probability Density Function for
a Normal Distribution
0.4
0.3
0.2
0.1
0.0

x
A note about the normal
distribution
Normal distributions approximate many types
of distributions.
Normal distributions have been applied to
many areas of studies, such as economics,
finance, operations management etc.
Normal Distribution
approximates many types of
distributions.
Probability Dinsity Function Example (Normal
Distribution with mean 25 and SD 3.2)
Binimial probability Distribution function with success prob 0.5
and total # trial 50
0.12
0.12
0.1
0.1
0.08
0.08
0.06
0.06
0.04
0.04
0.02
0.02
0
0
1
4
7
10 13 16 19 22 25 28 31 34 37 40 43 46 49
0
5
10
15
20
25
30
35
40
45
50
The shape of the normal
distribution
The shape of the normal density function
changes with the mean and the standard
deviation
The shape of normal
distribution. Exercise
 Open “Normal Density Function Exercise”.
Excel function NORMDIST(x, μ,σ,FALSE) will compute
the normal density function with mean μ and standard
deviation σ evaluated at x.
EX1: Plot the normal density functions for μ=0 and σ=1,
and μ=1 and σ=1. You will see how the change in the
mean affect the shape of the density (without changing
standard deviation)
EX2: Plot the normal density function for μ=0 and σ=1,
and μ=0 and σ=2. You will see how the change in the
standard deviation affects the shape (without changing
the mean)
Answer
Normal Distribution with the same variance but different mean
-6
-4
-2
0.5
0.4
Case 1
Case 2
0.3
f(x)
f(x)
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
Normal Dist with the same mean but different standard deviation
Case 1
Case3
0.2
0.1
0
0
x
2
4
6
-6
-4
-2
0
x
2
4
6
1. Changing the mean without changing the standard
deviation causes a shift.
2. Increasing standard deviation makes the shape flatter
(Fat Tail).
Properties of the Normal
Distribution
Suppose that the random variable X follows a normal
distribution given by the previous slides. Then
i. The mean of the random variable is ,
E( X )  
The variance of the random variable is 2,
2
2
E[( X   X ) ]  
iii. The Following notation means that a random
variable has the normal distribution with mean 
and variance 2.
ii.
X ~ N ( , )
2
Cumulative Distribution Function
of the Normal Distribution
Suppose that X is a normal random variable with
mean  and variance 2 ; that is X~N(, 2). Then the
cumulative distribution function is
F ( x0 )  P( X  x0 )
This is the area under the normal probability density
function to the left of x0, as illustrated in the figure in
the next slide.
Shaded Area is the Probability that X
does not Exceed x0 for a Normal
Random Variable
f(x)
x0
x
Range Probabilities for Normal
Random Variables
Let X be a normal random variable with cumulative
distribution function F(x), and let a and b be two
possible values of X, with a < b. Then
P(a  X  b)  F (b)  F (a)
The probability is the area under the corresponding
probability density function between a and b.
Range Probabilities for Normal
Random Variables
(Figure 6.12)
f(x)
a

b
x
The Standard Normal
Distribution
The Standard Normal Distribution is the normal
distribution with mean 0 and variance 1. We often use Z
to denote the Standard Normal Variable.
Z ~ N (0,1)
If Z has standard normal distribution, we say that Z
follows the standard normal distribution.
Computing the cumulative distribution
and a range probability for the standard
normal distribution
We often need to compute the cumulative
distribution and a range probability for a
standard normal distribution.
Since the standard normal distribution is
used so frequently, most of the textbooks
provide the cumulative distribution table.
See P837 of our textbook.
Computing the cumulative distribution
and a range probability for the standard
normal distribution
-Exercise-
Compute the following probability
P(Z≤1.72)
P(1.25<Z<1.72)
P(Z≤-1.25)
P(-1.25<Z<1.72)
Finding Range Probabilities for
Normally Distributed Random Variables
Let X be a normally distributed random variable with mean 
and variance 2. Then the random variable Z = (X - )/ has a
standard normal distribution: Z ~ N(0, 1)
It follows that if a and b are any numbers with a < b, then
b 
a
P ( a  X  b)  P
Z

 
 
b 
a 
 F
  F

  
  
where Z is the standard normal random variable and F(z)
denotes its cumulative distribution function.
Computing Normal Probabilities
(Example 6.6)
A very large group of students obtains test scores that are
normally distributed with mean 60 and standard deviation
15. If you randomly choose a student, what is the
probability that the test score of the student is between 85
and 95?
95  60 
 85  60
P(85  X  95)  P
Z

15 
 15
 P(1.67  Z  2.33)
 F (2.33)  F (1.67)
 0.9901  0.9525  0.0376
Joint Cumulative Distribution Functions
Let X1, X2, . . .Xk be continuous random variables
i.
Their joint cumulative distribution function, F(x1, x2, . . .xk)
defines the probability that simultaneously X1 is less than x1, X2
is less than x2, and so on; that is
F ( x1 , x2 ,, xk )  P( X 1  x1  X 2  x2   X k  xk )
i.
iii.
The cumulative distribution functions F1(x1), F2(x2), . . .,Fk(xk)
of the individual random variables are called their marginal
distribution functions. For any i, Fi(xi) is the probability
that the random variable Xi does not exceed the specific value
xi.
The random variables are independent if and only if
F ( x1 , x2 ,, xk )  F1 ( x1 ) F2 ( x2 )  Fk ( xk )
or equivalent ly
f ( x1 , x2 ,, xk )  f1 ( x1 ) f 2 ( x2 )  f k ( xk )
Joint Cumulative Distribution
Functions
Joint cumulative distribution functions
often have complex forms, especially
when they are not independent.
Some simple joint distribution functions
are presented in the next page.
Joint distribution functions
-Example, optionalX and Y are said to have independent joint
uniform distribution if X and Y has the
following distribution function.
F(x,y)=xy 0≤x≤1, 0≤y≤1
X and Y are said to have independent joint
exponential distribution if the joint distribution
function is given by
F(x,y)=(1-e-x)(1-e-y),
0<x<∞、 0<y<∞
Expectation of a function of
two random variables.
Let g(X,Y) be a function of two continuous
random variables X and Y. Let f(x,y) be
the joint distribution function of X and Y.
Then the expectation of g(X,Y) is defined
as
y
E[g(X, Y)]  
y
x
 g ( x, y) f ( x, y)dxdy
x
Special case is the covariance in the
next slide
Covariance
Let X and Y be a pair of continuous random variables,
with respective means x and y. The expected value of
(x - x)(Y - y) is called the covariance between X and Y.
That is
Cov( X , Y )  E[( X   x )(Y   y )]
An alternative but equivalent expression can be derived
as
Cov( X , Y )  E ( XY )   x  y
If the random variables X and Y are independent, then
the covariance between them is 0. However, the
converse is not true.
Correlation
Let X and Y be jointly distributed random variables. The
correlation between X and Y is
  Corr ( X , Y ) 
Cov( X , Y )
 X Y
Sum of two random variables
Let X and Y be jointly distributed random
variables. Let μX be the mean of X, μY be the
mean of Y, σ2X be the variance of X ,σ2Y be the
variance of Y. Then, we have
E(aX+bY) = aμX + bμY
Var(aX+bY) = a2 σX2 +b2 σY2 +2abCov(X,Y)
= a2 σX2 +b2 σY2 +2abCorr(X,Y)σXσY
Sums of Random Variables
-ExerciseLet X be the return for the stock A, and Y
be the return for stock B. You have some
fixed amount of money to invest in Stock
A and Stock B. Let a be the share of
money invested in stock A. (if you invest
half of the money in stock A, a=0.5). Let b
be the share of money invested in stock B
(that is b=1-a). Then the return from the
portfolio W is given by
Return of the portfolio: W=aX+bY
Suppose that μX=0.4, μY=0.1, σ2X=0.5, σ2Y=0.2,
Corr(X,Y)=-0.2
Ex 1.
Suppose you invest 40% of your money in stock
A, (i.e., a=0.4). Let W be the return of this
portfolio. Compute E(W) and Var(W), and
SD(W).
Ex 2.
Compute E(W) and SD(W) for different values
of a, using “sum of random variables exercise”.
Plot the relationship between SD(W) and E(W).
Answer for Ex2
Relationship between the expected return and the
standard deviation of portfolios (corr=-0.2)
0.45
Expected return
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0
0.1
0.2
0.3
0.4
0.5
0.6
Standard deviation of the portfolio
0.7
0.8
Related documents