3. Chap 5-3
Random Variable
Random Variable
Outcomes of an experiment expressed numerically
E.g., Toss a die twice; count the number of times
the number 4 appears (0, 1 or 2 times)
E.g., Toss a coin; assign $10 to head and -$30 to a
tail = $10
T = -$30
4. Chap 5-4
Discrete Random Variable
Discrete Random Variable
Obtained by counting (0, 1, 2, 3, etc.)
Usually a finite number of different values
E.g., Toss a coin 5 times; count the number of tails
(0, 1, 2, 3, 4, or 5 times)
5. Chap 5-5
Probability Distribution
Values Probability
0 1/4 = .25
1 2/4 = .50
2 1/4 = .25
Discrete Probability Distribution
Example
Event: Toss 2 Coins Count # Tails
T
T
T T This is using the A Priori Classical
Probability approach.
6. Chap 5-6
Discrete Probability Distribution
List of All Possible [Xj , P(Xj) ] Pairs
Xj = Value of random variable
P(Xj) = Probability associated with value
Mutually Exclusive (Nothing in Common)
Collective Exhaustive (Nothing Left Out)
0 1 1j jP X P X
7. Chap 5-7
Summary Measures
Expected Value (The Mean)
Weighted average of the probability distribution
E.g., Toss 2 coins, count the number of tails,
compute expected value:
j j
j
E X X P X
0 .25 1 .5 2 .25 1
j j
j
X P X
8. Chap 5-8
Summary Measures
Variance
Weighted average squared deviation about the mean
E.g., Toss 2 coins, count number of tails, compute
variance:
(continued)
2 22
i iE X X P X
22
2 2 2
0 1 .25 1 1 .5 2 1 .25
.5
i iX P X
9. Chap 5-9
Covariance and Its Application
1
th
th
th
: discrete random variable
: outcome of
: discrete random variable
: outcome of
: probability of occurrence of the
outcome of an
N
XY i i i i
i
i
i
i i
X E X Y E Y P X Y
X
X i X
Y
Y i Y
P X Y i
X
th
d the outcome of Yi
10. Chap 5-10
Computing the Mean for
Investment Returns
Return per $1,000 for two types of investments
100 .2 100 .5 250 .3 $105XE X
200 .2 50 .5 350 .3 $90YE Y
P(Xi) P(Yi) Economic Condition Dow Jones Fund X Growth Stock Y
.2 .2 Recession -$100 -$200
.5 .5 Stable Economy + 100 + 50
.3 .3 Expanding Economy + 250 + 350
Investment
12. Chap 5-12
Computing the Covariance for
Investment Returns
P(XiYi) Economic Condition Dow Jones Fund X Growth Stock Y
.2 Recession -$100 -$200
.5 Stable Economy + 100 + 50
.3 Expanding Economy + 250 + 350
Investment
100 105 200 90 .2 100 105 50 90 .5
250 105 350 90 .3 23,300
XY
The covariance of 23,000 indicates that the two investments are
positively related and will vary together in the same direction.
13. Chap 5-13
Computing the Coefficient of
Variation for Investment Returns
Investment X appears to have a lower risk
(variation) per unit of average payoff (return)
than investment Y
Investment X appears to have a higher
average payoff (return) per unit of variation
(risk) than investment Y
121.35
1.16 116%
105
X
X
CV X
194.68
2.16 216%
90
Y
Y
CV Y
14. Chap 5-14
Sum of Two Random Variables
The expected value of the sum is equal to the
sum of the expected values
The variance of the sum is equal to the sum
of the variances plus twice the covariance
The standard deviation is the square root of
the variance
E X Y E X E Y
2 2 2
2X Y X Y XYVar X Y
2
X Y X Y
20. Exercises
Collect the PM2.5 values on hourly basis for
the past 24 hrs and Calculate the mean,
median, mode, variance, standard deviation,
covariance and correlation. Get data from
Air4Thai website
Get the value of THB against USD for the past
one month and calculate the metrics.
Get the values of SET index for the past 2
weeks and calculate the metrics
Chap 5-20