32
1 15.Math-Review Friday 8/18/00 Friday 8/18/00

1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

  • View
    217

  • Download
    1

Embed Size (px)

Citation preview

Page 1: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

1

15.Math-Review

Friday 8/18/00Friday 8/18/00

Page 2: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 2

Event: In this setting we are talking about some uncertain event. The

outcome of which is uncertain

Outcome: The result of an observation of the event once the uncertainty has

been resolved.

Probability: The likelihood that certain outcome is realized for the event.

Example:To roll a balanced 6-sided die is an event. The number that appears

on top of the die once its rolled it’s the outcome. And any outcome (any of the 6 sides) has a probability of 1/6.

Random Variables

Page 3: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 3

We have an uncertain event. If the outcome of the uncertainty is a number then it is

called a random variable:

Random Variables

Example:The result of the flip of a coin is uncertain event. We can obtain

heads or tails. This is not a random variable.If we associate the variable X a value equal to 1 if the coin flip is

head and 0 if the coin flip is tails, then X is a random variable.

Page 4: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 4

A random process (or event) is one whose outcome cannot be specified in advance (except in probabilistic terms).

A random variable is a number that reflects the outcome of a random process.

Random Variables

Page 5: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 5

A random variable can be discrete or continuous. Discrete: The values the random variable can take are fixed

discrete amounts.

Example: The number on top after the roll of a die can be 1, 2, 3, 4, 5 or 6.

Continuous: The random variable can take any value in some interval.

Example: If we draw a student at random in the class and record their height in principle we can obtain any number between .5 meters and 2.5 meters. (Very unlikely in the extremes)

Random Variables

Page 6: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 6

The behavior of a discrete random variable can be described with a probability distribution of the form:

Probability Distributions

x P(x=ai)

a1 p1

a2 p2

: :: :

an pn

The die example: x P(x=ai)

1 1/62 1/63 1/64 1/65 1/66 1/6

Page 7: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 7

The probability that a continuous random variable takes exactly one value =0. There are infinite possible values the variable can take.

For a cont. r.v. we ask what is the probability that the r.v. falls within a certain interval.

If X is a cont. r.v. its cumulative distribution function F(x) is defined by:

F(x) = P(Xx)

Probability Distributions

Page 8: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 8

What is P(a Xb) for a cont. r.v.? Since the events {X<a} and {aXb} are disjoint

(mutually exclusive) we have:

P(X b) = P({X<a}{aXb})=P(X<a)+P(aXb)

= P(X a)+P(aXb) This means that

P(aXb)= P(X b) - P(X a)=F(b)-F(a)

Probability Distributions

Page 9: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 9

We define f (x) the probability density function of the cont. r.v. X as:

Probability Distributions

)(

)()(

xd

xdFxf

By construction we have that:

b

a

x

dttfaFbFbXaP

xXPdttfxF

)()()()(

)()()(

But what is this density function?

Page 10: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 10

The density function is the function f( ) such that the probability over a tiny interval of length y around point x is yf(x).

Probability Distributions

x

f(x)

1

x

F(x)

Interval of length yP(Xshaded area) yf(x)

Page 11: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 11

Probability Distributions

Cumulative Chart

.000

.250

.500

.750

1.000

0

10000

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 6

Frequency Chart

.000

.043

.086

.129

.172

0

428.7

857.5

1715

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 6

Density function of a continuous r.v. These graphs show the

empirical frequency and cumulative frequency of the ‘die’ r.v.

What happens if we allow the r.v. to take more values between 1 and 6?

Page 12: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 12

Probability Distributions

Frequency Chart

.000

.024

.048

.072

.096

0

238.7

477.5

716.2

955

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 11

Cumulative Chart

.000

.250

.500

.750

1.000

0

10000

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 11

Here the r.v can take 11 equally likely and equally spaced values between 1 and 6. Note that the frequency

over an interval of length 1 is 2 of these bars: 2(.088)=0.1761/6

Page 13: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 13

Probability Distributions

Frequency Chart

.000

.013

.025

.038

.050

0

125.7

251.5

377.2

503

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 21

Cumulative Chart

.000

.250

.500

.750

1.000

0

10000

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 21

Here the r.v can take 21 equally likely and equally spaced values between 1 and 6. Note that the frequency

over an interval of length 1 is 4 of these bars: 4(.042)=0.1681/6

Page 14: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 14

Probability Distributions

Cumulative Chart

.000

.250

.500

.750

1.000

0

10000

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 41

Frequency Chart

.000

.007

.015

.022

.030

0

74.25

148.5

222.7

297

0.00 1.75 3.50 5.25 7.00

10,000 Trials 0 Outliers

Forecast: 41 Here the r.v can take 41 equally likely and equally spaced values between 1 and 6. Note that the frequency

over an interval of length 1 is 8 of these bars: 8(.022)=0.1761/6

Page 15: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 15

The probability of any one value decreases to 0.The cumulative frequency function is smoother. In the limit, when we pass to a continuous

distribution: the cumulative frequency function will become the

cumulative distribution function. The frequency function will go to the function g(x)=0. The frequency in an interval of length y will be y/6.

Probability Distributions

Page 16: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 16

Mean, Variance, Covariance

The behavior of r.v. is expressed by their distribution.The mean and variance give some summary

information of what the distribution looks like.The covariance describes how two r.v. relate to each

other.

x

f(x)

.000

.043

.086

.129

.172

1 3 42 5 6

Page 17: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 17

Mean, Variance, Covariance

The mean of r.v. X is an average of the possible values of X weighted by the probability. In the discrete case:

If X can take the values x1, x2,…, xn with probabilities p1, p2,…, pn respectively.

n

iiiX xpXE

1

)(

In the continuous case:Where f(x) is the probability density function:

dtttfXEX )()(

Page 18: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 18

Mean, Variance, Covariance

The variance of r.v. X is the weighted square distance from the mean. In the discrete case:

n

iii

n

iii

XExpXDEVSTD

XExpXVAR

1

2

1

22

)().(.

)()(

In the continuous case:

dttfXEtXDEVSTD

dttfXEtXVAR

)()().(.

)()()(

2

22

Page 19: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 19

Lets consider the random variables X, Y:

Mean, Variance, Covariance

xi pi yi pi

1 0.5 3 0.4

1.5 0.3 5 0.6

3 0.2

Compute the mean, variance and standard deviation.

X= 1.55, X2 =0.5725, X= 0.756637

Y= 4.2, Y2 =0.96, Y= 0.979796

Page 20: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 20

Mean, Variance, Covariance

Graphically:

X

f(x)

These are continuous r.v. distributions with the same variance and with different means. The mean is the average value the r.v. takes.

X X X

Distributions that have the same mean but different variances. The ‘fatter’ distributions have greater variance.

Page 21: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 21

Mean, Variance, Covariance

A city newsstand has been keeping records for the past year of the number of copies of the WSJ sold daily. Records were kept for 200 days.

Number of copies Frequency

0 24

1 52

2 38

3 16

4 37

5 18

6 13

7 2

Page 22: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 22

Mean, Variance, Covariance

What is the distribution of the number of copies of the WSJ sold in one day?

What is the average number of WSJ sold in one day? What is the standard deviation of the number of WSJ

sold each day?

Page 23: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 23

Mean, Variance, Covariance

X= 2.53, X2 =3.3791, X= 1.838233

# Copies Frequency Prob. xi-E(x) (xi-E(x))^20 24 0.12 -2.53 6.40091 52 0.26 -1.53 2.34092 38 0.19 -0.53 0.28093 16 0.08 0.47 0.22094 37 0.185 1.47 2.16095 18 0.09 2.47 6.10096 13 0.065 3.47 12.04097 2 0.01 4.47 19.9809

200 1

2.53 3.3791 = sumproducts(col, prob)1.83823285

Page 24: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 24

Mean, Variance, Covariance

If we are given two r.v. X and Y the covariance and correlation of X and Y are defined by: Discrete case:

YX

YiXi

n

ii

YiXi

n

ii

yxpYXCORR

yxpYXCOV

))((),(

))((),(

1

1

Where X and X are the mean and standard deviation of r.v. X respectively.

And pi is the probability of the joint distribution. In other words: pi = P(X=xi,Y=yi)

The continuous case is analogous

Page 25: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 25

Mean, Variance, Covariance

Interpretation: If COV(X,Y)>0, then if X is greater than its mean, Y is greater

than its mean.

X

Y P(X=xi,,Y=yi )= pi

X

Y

COV(X,Y)>0 COV(X,Y)<0

Y P(X=xi,,Y=yi )= pi

X

Y

X

If COV(X,Y)<0, then if X is greater than its mean, Y is smaller than its mean.

Page 26: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 26

Mean, Variance, Covariance

Example: In our old example: xi pi yi pi

1 0.5 3 0.4

1.5 0.3 5 0.6

3 0.2

The joint distribution is:1 1.5 3

3 0.2 0.12 0.08 0.4

5 0.3 0.18 0.12 0.6

0.5 0.3 0.2 1.0

y

x

We already know that: X= 1.55, X

2 =0.5725, X= 0.756637

Y= 4.2, Y2 =0.96, Y= 0.979796

Page 27: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 27

Mean, Variance, Covariance

So...

The covariance is 0 because these r.v. are independent. What if we change the problem a little:

1 1.5 3

3 0.1 0.22 0.08 0.4

5 0.4 0.08 0.12 0.6

0.5 0.3 0.2 1.0

y

x

0

)2.45)(55.13(12.0)2.45)(55.15.1(18.0)2.45)(55.11(3.0

)2.43)(55.13(08.0)2.43)(55.15.1(12.0)2.43)(55.11(2.0

))((),(1

YiXi

n

ii yxpYXCOV

Page 28: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 28

Mean, Variance, Covariance

Now:

Now X and Y are no longer independent, in fact they have a negative covariance.

Correlation is CORR(X,Y) = -0.1/(0.756637*0.979796) = -0.13489

1.0

)2.45)(55.13(12.0)2.45)(55.15.1(08.0)2.45)(55.11(4.0

)2.43)(55.13(08.0)2.43)(55.15.1(22.0)2.43)(55.11(1.0

))((),(1

YiXi

n

ii yxpYXCOV

Page 29: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 29

Mean, Variance, Covariance

Consider r.v. X,Y of means X, Y and standard deviations X,

y respectively.

Let a,b be some fixed numbers. Define Z=aX+bY, then:

),( 2)(

)(22222 YXCOVabbaZVAR

baZE

YXZ

YXZ

Page 30: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 30

Some Derivations

First we show that E(aX+bY)=aE(X)+bE(Y), we will use this formula in the remaining derivations.

)()()()(

),(),(

),()()()(

11

11

11

YbEXaEyYPybxXPxa

yYxXPybyYxXPxa

yYxXPbyaxpbyaxbYaXE

i

l

iii

k

ii

ii

n

iiii

n

ii

ii

n

iii

n

iiii

In the fourth equality it helps to think in terms of a table to link the joint distribution with the ‘marginal’ distributions.

Page 31: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 31

Some Derivations

VAR(X) = E((X-E(X))2) = E(X2 -2E(X)X+ E(X)2) = = E(X2) -2E(X)E(X) + E(X)2 = = E(X2) -E(X)2

COV(X,Y) = E( (X-E(X))(Y-E(Y)) ) = E(XY- E(X)Y- E(Y)X+ E(X)E(Y))= = E(XY)- E(X)E(Y)- E(Y)E(X) + E(Y)E(X) = = E(XY)- E(X)E(Y)

VAR(aX+bY)= E((aX +bY)2) - (E(aX+bY))2 = = E(a2X2+2abXY+b2Y2)-(aE(X)+bE(Y))2 = = a2E(X2)+2abE(XY)+b2E(Y2)-a2E(X)2-2abE(X)E(Y)-b2E(Y)2 = = a2(E(X2)-E(X)2)+ b2(E(Y2)- E(Y)2)+2ab(E(XY)-E(X)E(Y)) = = a2VAR(X)+b2VAR(Y)+2abCOV(X,Y)

Page 32: 1 15.Math-Review Friday 8/18/00. 15.Math-Review2 yEvent: xIn this setting we are talking about some uncertain event. The outcome of which is uncertain

15.Math-Review 32

Mean, Variance, Covariance

We know that an investment in Snowboard Inc. has a return that is a random variable with mean .9 and standard deviation 0.075. Also an investment in Skiboots Inc. has a return that is a random variable that we know has mean .9 and standard deviation 0.27. Also the return for these stocks has a correlation of -0.75.

If you decide to invest 30% of your capital in Snowboard Inc, and 70% in Skiboots Inc. What is the mean and variance of the return of the resulting portfolio?

What if you invest 50% on each?