Lesson 2 - Random Variables-Statistics
Lesson 2 - Random Variables-Statistics
MANIMP
In portfolio selection analysis we will model the asset’s return as a random variable,
and we follow a mean-variance analysis approach.
We consider the following distribution indices:
• the expected value or expectation (index of position or central tendency)
• the variance (index of dispersion)
of the asset’s return.
Assets’ returns are The portfolio’s return is a function of the Portfolio’s return is a
random variables returns of the assets which compose it random variable
x2 8 ¼ = 𝑥1 𝑝1 + 𝑥2 𝑝2 + 𝑥3 𝑝3 𝐴
x3 10 ½
= 4 ∙ 0.25 + 8 ∙ 0.25 + (10) ∙ 0.5
The set of all possible numerical values that
the r.v. can take is called Support of X = 1 + 2 + 5=𝟖
𝐸(𝑋) = 𝑥𝑘 𝑝𝑘
𝑘=1
It is also called:
Mean or Expected value
or Moment of order 𝑟 = 1
from the origin 𝒙𝟎 = 𝟎 𝐸(𝑋) = 𝑥 𝑝(𝑥)
𝑥
QUANTITATIVE PORTFOLIO SELECTION FOR MANAGEMENT: FOUNDATIONS – FEDERICA RICCA
Properties of the expected value E(X)
Property 0 (PE0)
Example: 𝛼 = 3
If a r.v. X assumes only one value α (scalar), we have:
We have: only 𝑥1 = 𝛼 and
E(X) = α 𝑝1 = 1:
In fact, X assumes only the value α with probability p(x=α)=1. 𝐸 𝑋 =𝛼∙1
=3∙1=3
𝐸 𝑋 = 𝑥 𝑝 𝑥 = 𝛼 ∙1 = 𝛼
𝑥
In fact, X is a constant (does not vary):
the expected value of a constant is the constant itself and we write E(α) = α.
Property 1 (PE1)
Given a scalar β, we have:
E(βX) = β E(X)
We have:
Property 1 (PE1)
Given a scalar β, we have:
E(βX) = β E(X)
We have:
𝐸(∙) = ∙ 𝑝(∙)
(PE2)
In fact:
PE2 PE1 PE0
E(X – α) = E(X) + E(–α) = E(X) + (–1)∙E(α) = E(X) – α
Special case: Let E(X) =μ (expected value of X), and fix α =μ in the above
formula, then we have:
E(X – μ) = E(X) – μ = μ – μ = 0
Property 3 (linearity)
The expected value of a linear combination of two r.v. X and Y, with real
weights α and β, respectively, is equal to the linear combination of the expected
values of X and Y with the same weights:
E(αX+βY) = αE(X)+βE(Y) We say that the
expected value is
invariant for linear
transformations
Property 4 Let xmin and xmax be the minimum and maximum values among the
possible realizations of X, then:
xmin ≤ E(X) ≤ xmax
EXAMPLE 2
Consider the discrete r.v. X with support {x1= –1, x2=1, x3=2} and the following
different possible probability distributions:
1. p1=0.25, p2= 0.25, p3=0.50;
2. p1=0.25, p2= 0.50, p3=0.25;
3. p1=0.50, p2= 0.25, p3=0.25.
Compute the expected value of X in the three different cases.
Solution:
1. E(X) = x1p1+x2p2+x3p3 = 0.25 (–1) + 0.25 (1) + 0.50 (2) = 1
NOTE: in all cases the value of E(X) is between xmin = –1 and xmax = 2.
NOTE: The value of E(X) changes according to the probability distribution considered.
It decreases as the probability associated to the lowest realizations of X increases (in this
sense E(X) is a positional index).
𝐾
2 Variance
𝑉𝑎𝑟(𝑋) = 𝑥𝑘 − 𝝁 𝑝𝑘 (Index of dispersion of the
𝑘=1 values of X around 𝜇)
𝐾
2 2
𝑉𝑎𝑟(𝑋) = 𝑥𝑘 − 𝝁 𝑝𝑘 = 𝐸 𝑋−𝝁
𝑘=1
𝐾
2 Variance
𝑉𝑎𝑟(𝑋) = 𝑥𝑘 − 𝝁 𝑝𝑘 (Index of dispersion of the
𝑘=1 values of X around 𝜇)
Property 1 (PV1)
Consider the linear transformation of X given by Y= αX+β (α and β are numbers)
and the property of the expected value:
NOTE:
E(Y) = αE(X)+β
𝑉𝑎𝑟(𝑋 + 𝛽) = 𝑉𝑎𝑟(𝑋)
For the square deviations of Y from its average, one has:
2 2
𝑌 − 𝐸(𝑌) = 𝛼𝑋 + 𝛽 − (𝛼𝐸 𝑋 + 𝛽)
2 2
= 𝛼𝑋 − 𝛼𝐸 𝑋 = 𝛼(𝑋 − 𝐸 𝑋 ) = 𝛼 2 𝑋 − 𝐸(𝑋) 2
NOTE: The variance is a quadratic function of X, therefore its values are of the same
order of magnitude of the square of the values of X.
Applying the alternative formula 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − 𝐸(𝑋) 2 we first compute 𝐸(𝑋 2 ):
𝐸(𝑋 2 ) = (−1)2 0.25 + (1)2 0.25 + (2)2 0.50 = 2.5 Moment of order 2 from
the origin
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − 𝐸(𝑋) 2
= 2.5 − 12 = 𝟏. 𝟓
In our portfolio analysis we also use some indices which measure relations existing
between two random variable X and Y.
We focus on covariance and correlation.
Consider two r.v. X and Y, with K and H possible values, respectively, and expected
values μX and μY. The covariance’s formula is:
This index measures how deviations of X from its average μX associates with
those of Y from μY.
Using the expected value operator E(∙), the formula of the covariance of X and Y can be
equivalently written as follows:
𝐶𝑜𝑣(𝑋, 𝑌) = 𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
The covariance of X and Y
Deviations of X and Y from their measures the linear dependence
mean values μX and μY. of the two random variables.
= 𝛼 2 𝐸 𝑋 − 𝜇𝑋 2
+ 𝛽 2 𝐸 𝑌 − 𝜇𝑌 2
+ 2𝛼𝛽𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
= 𝛼 2 𝐸 𝑋 − 𝜇𝑋 2
+ 𝛽 2 𝐸 𝑌 − 𝜇𝑌 2
+ 2𝛼𝛽𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
We have:
Property 0 (PCov0)
Given the r.v. X and a real constant 𝛼, we have:
There are no co-movements
𝐶𝑜𝑣(𝑋, 𝛼) = 0 between X and α since α is
constant and does never change
Property 2 (PCov1)
Given the r.v. X and Y and four real constants 𝛼, 𝛽, 𝛾, 𝛿, we have:
Provided that Var(X) and Var(Y) are strictly positive (different from 0), the
covariance can be normalized obtaining the correlation coefficient, 𝜌𝑋𝑌 :
𝐶𝑜𝑣(𝑋, 𝑌) 𝜎𝑋𝑌
𝜌𝑋𝑌 = =
𝐷𝑒𝑣(𝑋)𝐷𝑒𝑣(𝑌) 𝜎𝑋 𝜎𝑌
Cov(X,Y) e ρXY:
• covariance and correlation measure the same aspect Correlation 𝜌𝑋𝑌 is a
• the difference between the two is that ρXY does not depend pure number and
on the order of magnitude of the variances of X and Y 𝜌𝑋𝑌 ∈ [−1,1].
Cov(X,Y) e ρXY:
• covariance and correlation measure the same aspect Correlation 𝜌𝑋𝑌 is a
• the difference between the two is that ρXY does not depend pure number and
on the order of magnitude of the variances of X and Y 𝜌𝑋𝑌 ∈ [−1,1].
• in all other cases ρXY takes values in the open Correlation 𝜌𝑋𝑌 is a
pure number and
interval (-1,1).
𝜌𝑋𝑌 ∈ [−1,1].
2 9 10
𝐸(𝑌) = 10 𝜎𝑌 = 24
3 3 4
Exp. value 9 10
We can now compute the variance and the standard deviation of X and Y.
We first compute the (three) square deviations from the mean for both X and Y.
2 9 10
𝐸(𝑌) = 10 𝜎𝑌 = 24
3 3 4
Exp. value 9 10
Now we can compute the covariance and the correlation between X and Y.
EXERCISE II-2
Consider the discrete r.v. X with support {x1=15, x2=9, x3=3} and all probabilities
equal to 1/3. Also consider the discrete r.v. Y with support {y1=1, y2=10, y3=19}
and all probabilities all equal to 1/3.
Compute the covariance between X and Y and the corresponding correlation
coefficient.