Chapter 4
Chapter 4
Random
Variables
Fall 2022
ECO2222
Discrete Probability Distributions
• Probability Distribution Function (p.d.f.), P(x), of a
discrete random variable X expresses the probability that X
takes the value x, as a function of x:
P(x) = P(X=x), for all values of x
Other textbook refers this to the probability mass function
F(x ) = P (X ≤ x )
0 0
Probability
.50
.25 2 ¼=0. 1
H H 25
Fall 2022
ECO2222
• Properties of p.d.f:
1. 0 ≤ P(x) ≤ 1
2. P( x) 1
x
F( x ) ≤ F( x )
μ E(X) xP(x)
x
x P(x)
• Example: Toss 2 coins,
0 .25
x = # of heads,
1 .50
compute expected value of x:
2 .25
E(x) = (0 x .25) + (1 x .50) + (2 x .25) = 1.0
Fall 2022
ECO2222
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-7
Variance & Standard Deviation
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-9
Expected Value of Functions of a Random Variable
• E (k) = k Var (k) = 0
• E[g(x)] = g ( x) P( x)
x
a b xP ( x) a b x
x
• Variance and Standard Deviation:
y2 Var (a bx) b 2 x2
y | b | x
Binomial Uniform
Hypergeometric Normal
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-11
4.4 Binomial Distribution
• Bernoulli distribution:
• Each repetition of an experiment involving only two
mutually exclusive and collectively exhaustive outcomes.
• Bernoulli Random Variable: X={0,1}
p.d.f. P(x=1)= P and P(x=0)= 1-P
2 E[( x ) 2 ] ( x ) 2 P( x)
x
Fall 2022
ECO2222
Binomial Probability Distribution
A fixed number of observations, n
e.g., 15 tosses of a coin; ten light bulbs taken from a warehouse
Two mutually exclusive and collectively exhaustive categories
e.g., head or tail in each toss of a coin; defective or not defective light bulb
Generally called “success” and “failure”
Probability of success is P , probability of failure is 1 – P
Constant probability for each observation
e.g., Probability of getting a tail is the same each time we toss the coin
Observations are independent
The outcome of one observation does not affect the outcome of the other
Fall 2022
ECO2222
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-15
The Binomial Distribution
n! X n- X
P(x) = P (1- P)
x ! (n - x )!
n!
P(x) = probability of x successes in n trials, Cnx
x! (n x)!
with probability of success P on each trial
Example: Flip a coin four Example: Flip a coin
x = number of ‘successes’ in sample, times, let x = # heads: twice, let x = # heads:
(x = 0, 1, 2, ..., n)
n=4 n=2
n = sample size (number of independent
P = 0.5 P = 0.5
trials or observations) 1 - P = (1 - 0.5) = 0.5 1 - P = (1 - 0.5) = 0.5
P = probability of “success” x = 0, 1, 2, 3, 4 x = 0, 1, 2
Calculating a Binomial Probability
What is the probability of one success in five observations if
the probability of success is 0.1?
x = 1, n = 5, and P = 0.1
n X n!
P(x 1) C P (1 P) n
x
X
P X (1 P) n X
x!(n x)!
5!
(0.1)1 (1 0.1)5 1
1!(5 1)!
(5)(0.1)(0.9) 4
.32805 Fall 2022
ECO2222
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-17
Binomial Distribution
Examples:
n = 10, x = 3, P = 0.35: P(x = 3|n =10, p = 0.35) = .2522
n = 10, x = 8, P = 0.45: P(x = 8|n =10, p = 0.45) = .0229
Fall 2022
ECO2222
10 students invited to a party, p(attending)=0.85, P(x>8)=?
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-19
Two-Variable Case: Jointly Distributed Discrete Random Variables
P( x y) = P(X = x Y = y) Joint Probability Function
P ( x) P ( xy )
y
P ( y ) P ( xy )
x
Marginal Probability Function
P( xy )
P( y | x)
P( x)
P( xy )
P( x | y )
P( y ) Conditional Probability Function
Good and Defective Batteries Produced in Three Different Plants
Cov( X , Y )
Corr ( X , Y )
x y
E[ g ( X , Y )] g ( x, y ) P ( xy )
x y
W aX bY
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-23
Portfolio Analysis (continued)
• The mean value for W is
μW E[W] E[aX bY]
aμX bμY
or using
σ 2W the
acorrelation
σ X b 2σ 2Yformula
2 2
2abCorr(X, Y)σ Xσ Y Fall 2022
ECO2222
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-24
Example: Investment Returns
Return per $1,000 for two types of investments
Investment
P(xi), P(yi) Economic condition Passive Fund X Aggressive Fund Y
.2 Recession - $ 25 - $200
.5 Stable Economy + 50 + 60
.3 Expanding Economy + 100 + 350
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-25
Computing the Standard
Deviation for Investment Returns
Investment
P(xiyi) Economic condition Passive Fund X Aggressive Fund Y
0.2 Recession - $ 25 - $200
0.5 Stable Economy + 50 + 60
0.3 Expanding Economy + 100 + 350
193.71 ECO2222
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-26
Covariance for Investment
Returns
Investment
P(xiyi) Economic condition Passive Fund X Aggressive Fund Y
.2 Recession - $ 25 - $200
.5 Stable Economy + 50 + 60
.3 Expanding Economy + 100 + 350
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-27
Interpreting the Results for Investment Returns
• The aggressive fund has a higher expected return, but much more risk
μy = 95 > μx = 50
but
σy = 193.21 > σx = 43.30 r=0.961
CVy = 193.21/95 > CVx= 43.3/50
P=0.4X+0.6Y
E(P) .4 (50) (.6) (95) 77
σ P (.4) 2 (43.30) 2 (.6)2 (193.21) 2 2(.4)(.6)( 8250)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-29
Chapter Summary
• Defined discrete random variables and probability
distributions
• Discussed the Binomial distribution
• Reviewed the Poisson distribution (read)
• Discussed the Hypergeometric distribution (skipped)
• Defined covariance and the correlation between two
random variables
• Examined application to portfolio investment
Fall 2022 ECO2222