lecture note 6

54
Lecture note 6 Lecture note 6 Continuous Random Variables and Probability distribution

Upload: weylin

Post on 12-Jan-2016

48 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture note 6

Lecture note 6Lecture note 6

Continuous Random Variables and Probability distribution

Page 2: Lecture note 6

Continuous Random Continuous Random VariablesVariables

A random variable is continuous continuous if it can take any value in an interval.

Page 3: Lecture note 6

Probability Distribution of Probability Distribution of Continuous Random Continuous Random

VariablesVariables

For continuous random variable, we use the following two concepts to describe the probability distribution

1. Probability Density Function2. Cumulative Distribution Function

Page 4: Lecture note 6

Probability Density Probability Density FunctionFunction

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.

Page 5: Lecture note 6

Comparing Probability Distribution Comparing Probability Distribution Function (for discrete r.v) and Function (for discrete r.v) and

Probability density function (for Probability density function (for continuous r.v)continuous r.v)

Binimial probability Distribution function with success prob 0.5and total # trial 50

0

0.02

0.04

0.06

0.08

0.1

0.12

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49

Probability Dinsity Function Example (NormalDistribution with mean 25 and SD 3.2)

0

0.02

0.04

0.06

0.08

0.1

0.12

0 5 10 15 20 25 30 35 40 45 50

Page 6: Lecture note 6

Comparing Probability Distribution Comparing Probability Distribution Function (Discrete r.v) and Function (Discrete r.v) and Probability density functionProbability density function

Binimial probability Distribution function with success prob 0.5and total # trial 50

0

0.02

0.04

0.06

0.08

0.1

0.12

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.

Page 7: Lecture note 6

Comparing Probability Distribution Comparing Probability Distribution Function (Discrete r.v) and Function (Discrete r.v) and

Probability density function Probability density function (Continuous r.v)(Continuous r.v)

x ba

Probability Density Function shows the probability that the random variable falls in a particular range.

f(x)

Page 8: Lecture note 6

Probability density functionProbability 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.

Page 9: Lecture note 6

ExampleExample 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.

Page 10: Lecture note 6

Probability Density Function Probability Density Function ExampleExample

0 2

0.5

x

f(x)

Page 11: Lecture note 6

Probability Density Function Probability Density Function ExampleExample

0 2

0.5

x

f(x)

0.5 1

The probability that your client visits your office between 12:30 and 1:00 is given by the shaded area.

Page 12: Lecture note 6

Probability Density Function Probability Density Function ExampleExample

0 2

0.5

x

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)

Page 13: Lecture note 6

Some Properties of Some Properties of probability density functionprobability density function

1. f(x)≥0 for any x2. Total area under f(x) is 1

Page 14: Lecture note 6

Cumulative Distribution Cumulative Distribution FunctionFunction

The cumulative distribution functioncumulative 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

)()( xXPxF

Page 15: Lecture note 6

In other words, the cumulative In other words, the cumulative distribution function F(x) is given distribution function F(x) is given by the shaded area.by the shaded area.

xx

f(x)

F(x)=P(X≤x)

Page 16: Lecture note 6

Cumulative Distribution Cumulative Distribution FunctionFunction-Example--Example-

0 2x

f(x)

0 2

1

0.5

F(x)

Density Function

Cumulative DistributionFunction

Page 17: Lecture note 6

A property of cumulative A property of cumulative distribution functionsdistribution functions

)()()( aXPbXPbXaP

)()( aFbF

Page 18: Lecture note 6

Probability Density Function and Probability Density Function and Cumulative Distribution FunctionCumulative Distribution Function

-Exercise--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.

otherwise 0

4x0for 25.0)(

xf

Ex.1 Graph f(x), Ex. 2 Find F(3),

Ex.3 Find P(2<X<3) Ex. 4 Graph F(x)

Page 19: Lecture note 6

Relationship Between Probability Relationship Between Probability Density Function and Cumulative Density Function and Cumulative

Distribution FunctionDistribution Function

Let X be a continuous random variable. Then, there is a following relationship between probability density function and cumulative distribution function.

)()()( aFbFbXaP

b

aduuf )(

Page 20: Lecture note 6

Expectation for continuous Expectation for continuous random variablerandom variable

Expectation for a continuous random variable is defined in a similar way as the expectation for a discrete random variable.

See Next Page

Page 21: Lecture note 6

Expectation for the discrete random variable is defined as

x

xxPXE )()( :case Discrete

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

x

dxxxf )(E(X) :Case Continuous

where is the lowest possible value of X and is the highest possible value for X. We use μX to denote E(X) .

x x

Page 22: Lecture note 6

Expectation of a function Expectation of a function of a continuous random of a continuous random

variablevariable Let g(X) be a function of a continuous random

variable X. Then the expectation of g(X) is given by the following.

x

x

dxxfxg )()(E[g(X)]

A special case is the variance given in the next slide

Page 23: Lecture note 6

Variance and standard Variance and standard deviation for the continuous deviation for the continuous

random variablerandom variable Variance and standard deviation for a continuous random

variable are defined as

xdxfxXVarx

x XX )()()( 22

)()( XVarXSD X

Page 24: Lecture note 6

Expected valueExpected valuefor Continuous Random for Continuous Random

variablevariable-Exercise--Exercise-

Continue using the daily revenue example. The probability density function for X is given by

otherwise 0

4x0for 25.0)(

xf

Compute E(X) and SD(X)

Page 25: Lecture note 6

Linear Functions of VariablesLinear Functions of VariablesLet X be a continuous random variable with mean X and variance X

2, and let a and b any constant fixed numbers. Define the random variable W as

Then the mean and variance of W are

and

and the standard deviation of W is

bXaW

XW babXaE )(

222 )( XW bbXaVar

XW b

Page 26: Lecture note 6

Linear Functions of VariablesLinear Functions of Variables-Exercise--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)

Page 27: Lecture note 6

Linear Functions of VariableLinear Functions of Variable

An important special case of the previous results is the standardized random variable

which has a mean 0 and variance 1.X

XXZ

Page 28: Lecture note 6

Normal DistributionNormal 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.

xexf x -for 2

1)(

22 2/)(

2

where e and are physical constants, e = 2.71828. . . and = 3.14159. . .

Page 29: Lecture note 6

Probability Density Function Probability Density Function for a Normal Distributionfor a Normal Distribution

x0.0

0.1

0.2

0.3

0.4

Page 30: Lecture note 6

A note about the normal A note about the normal distributiondistribution

Normal distributions approximate many types of distributions.

Normal distributions have been applied to many areas of studies, such as economics, finance, operations management etc.

Page 31: Lecture note 6

Normal Distribution Normal Distribution approximates many types of approximates many types of

distributions.distributions.

Binimial probability Distribution function with success prob 0.5and total # trial 50

0

0.02

0.04

0.06

0.08

0.1

0.12

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49

Probability Dinsity Function Example (NormalDistribution with mean 25 and SD 3.2)

0

0.02

0.04

0.06

0.08

0.1

0.12

0 5 10 15 20 25 30 35 40 45 50

Page 32: Lecture note 6

The shape of the normal The shape of the normal distributiondistribution

The shape of the normal density function changes with the mean and the standard deviation

Page 33: Lecture note 6

The shape of normal The shape of normal distribution. Exercisedistribution. 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)

Page 34: Lecture note 6

AnswerAnswerNormal Distribution with the same variance but different mean

0

0.050.1

0.150.2

0.250.3

0.350.4

0.45

- 6 - 4 - 2 0 2 4 6

x

f(x) Case 1

Case 2

Normal Dist with the same mean but different standard deviation

0

0.1

0.2

0.3

0.4

0.5

-6 -4 -2 0 2 4 6

x

f(x) Case 1

Case3

1. Changing the mean without changing the standard deviation causes a shift.

2. Increasing standard deviation makes the shape flatter (Fat Tail).

Page 35: Lecture note 6

Properties of the Normal Properties of the Normal DistributionDistribution

Suppose that the random variable X follows a normal distribution given by the previous slides. Then

i. The mean of the random variable is ,

ii. The variance of the random variable is 2,

iii. The Following notation means that a random variable has the normal distribution with mean and variance 2.

)(XE

22 ])[( XXE

),(~ 2NX

Page 36: Lecture note 6

Cumulative Distribution Cumulative Distribution Function of the Normal Function of the Normal

DistributionDistribution

Suppose that X is a normal random variable with mean and variance 2 ; that is X~N(, 2). Then the cumulative distribution cumulative distribution functionfunction is

This is the area under the normal probability density function to the left of x0, as illustrated in the figure in the next slide.

)()( 00 xXPxF

Page 37: Lecture note 6

Shaded Area is the Probability Shaded Area is the Probability that X does not Exceed xthat X does not Exceed x00 for a for a

Normal Random VariableNormal Random Variable

xx0

f(x)

Page 38: Lecture note 6

Range Probabilities for Range Probabilities for Normal Random VariablesNormal 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

The probability is the area under the corresponding probability density function between a and b.

)()()( aFbFbXaP

Page 39: Lecture note 6

Range Probabilities for Normal Range Probabilities for Normal Random VariablesRandom Variables

(Figure 6.12)(Figure 6.12)

xb

f(x)

a

Page 40: Lecture note 6

The Standard Normal The Standard Normal DistributionDistribution

The Standard Normal Distribution is the normal distribution with mean 0 and variance 1. We often use Z to denote the Standard Normal Variable.

If Z has standard normal distribution, we say that Z follows the standard normal distribution.

)1,0(~ NZ

Page 41: Lecture note 6

Computing the cumulative Computing the cumulative distribution and a range probability distribution and a range probability for the standard normal distributionfor 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.

Page 42: Lecture note 6

Computing the cumulative Computing the cumulative distribution and a range probability distribution and a range probability for the standard normal distributionfor the standard normal distribution

-Exercise--Exercise-

Compute the following probabilityP(Z≤1.72)P(1.25<Z<1.72)P(Z≤-1.25)P(-1.25<Z<1.72)

Page 43: Lecture note 6

Finding Range Probabilities for Finding Range Probabilities for Normally Distributed Random Normally Distributed Random

VariablesVariables

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

where Z is the standard normal random variable and F(z) denotes its cumulative distribution function.

aF

bF

bZ

aPbXaP )(

Page 44: Lecture note 6

Computing Normal ProbabilitiesComputing Normal Probabilities(Example 6.6)(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?

0376.09525.09901.0

)67.1()33.2(

)33.267.1(

15

6095

15

6085)9585(

FF

ZP

ZPXP

Page 45: Lecture note 6

Joint Cumulative Distribution Joint Cumulative Distribution FunctionsFunctions

Let X1, X2, . . .Xk be continuous random variables

i. Their joint cumulative distribution functioncumulative 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

i. The cumulative distribution functions F1(x1), F2(x2), . . .,Fk(xk) of the individual random variables are

called their marginal distribution functionsmarginal distribution functions. For any i, Fi(xi) is the probability that the random variable Xi does not exceed the specific value xi.

iii. The random variables are independentindependent if and only if

)(),,,( 221121 kkk xXxXxXPxxxF

)()()(),,,(

lyequivalent

)()()(),,,(

221121

221121

kkk

kkk

xfxfxfxxxf

or

xFxFxFxxxF

Page 46: Lecture note 6

Joint Cumulative Distribution Joint Cumulative Distribution FunctionsFunctions

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.

Page 47: Lecture note 6

Joint distribution functionsJoint distribution functions-Example, optional--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<∞

Page 48: Lecture note 6

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

dydxyxfyxgx

x

y

y ),(),(Y)]E[g(X,

Special case is the covariance in the next slide

Expectation of a function Expectation of a function of two random variables.of two random variables.

Page 49: Lecture note 6

CovarianceCovariance

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 covariancecovariance between X and Y. That is

An alternative but equivalent expression can be derived as

If the random variables X and Y are independent, then the covariance between them is 0. However, the converse is not true.

)])([(),( yx YXEYXCov

yxXYEYXCov )(),(

Page 50: Lecture note 6

CorrelationCorrelation

Let X and Y be jointly distributed random variables. The correlationcorrelation between X and Y is

YX

YXCovYXCorr

),(

),(

Page 51: Lecture note 6

Sum of two random Sum of two random variablesvariables

Let X and Y be jointly distributed random variables. Let μX be the mean of X, μY be the mean of Y, σ2

X 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 σY

2 +2abCov(X,Y)

= a2 σX2 +b2 σY

2 +2abCorr(X,Y)σXσY

Page 52: Lecture note 6

Sums of Random VariablesSums of Random Variables-Exercise--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

Page 53: Lecture note 6

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).

Page 54: Lecture note 6

Answer for Ex2Answer for Ex2Relationship between the expected return and the

standard deviation of portfolios (corr=-0.2)

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

Standard deviation of the portfolio

Exp

ecte

d re

turn