Professional Documents
Culture Documents
Tuomas A. Rajala
Chalmers TU
April 7, 2014
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Last week:
Some examples of distribution families for r.v.s
Joint distribution: From one variable to many variables
1/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
2/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Marginalization: Z
fX (x) = f (x, y)dy
R
and similarly for Y , discrete case, and more than 2 variables.
Independence: X
Y f (x, y) = fX (x)fY (y)
3/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Joint expectation
Expectation For a r.v. (X, Y ) with joint density f (x, y), and some
function g(x, y),
Z Z
E[g(X, Y )] := g(x, y)f (x, y)dydx
R R
P P
In the discrete case: E[g(X, Y )] = x y g(x, y)f (x, y)
R R
Technical requirement: |g(x, y)|f (x, y)dxdy < .
4/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Covariance Let X and Y be r.v.s with a joint density fXY and marginal
means X := E(X) and Y := E(Y ). Then
Notes:
If X is large (small) when Y is large (small), Cov(X, Y ) > 0
If X is large (small) when Y is small (large), Cov(X, Y ) < 0
X
Y Cov(X, Y ) = 0. Not the other way in general!
Only the sign is interpretable, not the absolute value
5/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Correlation
2
Correlation: Let X and Y be r.vs with variances X and Y2 . Then we
define
Cov(X, Y )
:= Cor(X, Y ) :=
X Y
and call it the correlation of X and Y .
Notes:
Cor(X, Y ) [1, 1]
Often we denote correlation with or XY , and speak about the
correlation coefficient
Correlation=Covariance of standardized variables
6/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Worked example
Let X and Y have a joint density f (x, y) = x + y for 0 < x, y < 1. What
is their correlation?
Z 1 1 Z 1 1
fX (x) = (x + y)dy = x + fY (y) = (x + y)dx = y +
0 2 0 2
so Z 1 1 7 7
E(X) = x(x + )dx = , E(Y ) =
0 2 12 12
f(x,y)
and
2
Z 1
2 1 5 2 5
E(X ) = x (x + )dx = , E(Y ) =
0 2 12 12
y
2 2 11
Var(X) = E(X ) [E(X)] = x
144
Z Z Z 1 2 1 1
then E(XY ) = xy(x + y)dxdy = ( x + x)dx =
2 3 3 2.0
0.8
and 1.5
1 0.6
Cov(X, Y ) = E(XY ) E(X)E(Y ) = 1.0
y
144 0.4
0.5
which finally leads to 0.2
0.0
1 2
Cor(X, Y ) = p 2 X = sign() 1
1 X X
b1>0
b1<0
y
x x x x
8/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Bivariate normal
For two normal distributed r.v.s, correlation defines the joint distribution.
Note especially if = 0,
fX (x) = N (x , x2 ) and fY (y) = N (x , y2 )
f (x, y) = fX (x)fY (y) i.e. normal r.v.s uncorrelated iff independent
3
2
2
1
1
y
y
0
0
1
1
2
2
3
3 2 1 0 1 2 3 3 2 1 0 1 2 3 3 2 1 0 1 2 3
x x x
9/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Conditional density
As with the other set theoretical results, we also extend the conditional
probability
P (A|B) = P (A B)/P (B)
to random variables.
f (x, y)
f (x|y) := f (x|Y = y) :=
fY (y)
Note: X
Y = f (x|y) = fX (x)
10/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Worked example
Let X and Y have a joint density f (x, y) = 2 ey for 0 < x < y. What
are the conditional densities?
Z Z
fX (x) = f (x, y)dy = 2 ey dy = ex Exp()
x
Z Z y
fY (y) = f (x, y)dx = 2 ey dx = 2 yey Gamma(2, 1 )
0
therefore
f (x, y) 1
fX|y (x) = = U nif ([0, y])
fY (y) y
f (x, y)
fY |x (y) = = e(yx) shifted-Exp(, x)
fX (x)
joint density marginal of X, lambda=2 marginal of Y, lambda=2
2.0
4.0
0.15
3.5
1.5
1.5 3.0
2.5
0.10
f_X(x)
f_Y(x)
1.0
1.0 2.0
y
1.5
0.05
0.5
0.5 1.0
0.5
0.00
0.0
0.0
11/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
f (y|x)fX (x) 1
f (x|y) = = fN (y x)fX (x)
fY (y) fY (y)
1 1 1 2
= e 22 (yx) ex
fY (y) 2 2
1 1 2 2
= e 22 (y 2xy+x )x
fY (y) 2 2
Convolution
What is density of Z = X + Y for some r.v.s X and Y ? We can derive
it.
FZ (z) = P (Z < z) = P (X + Y < z)
Z Z zy
= f (x, y)dxdy
Z Z z
{x := v y} = f (v y, y)dvdy
Z z Z
= f (v y, y)dydv
so Z
d
fZ (z) =
FZ (z) = f (z y, y)dy
dz
The density of the sum is called convolution.
Especially if X
Y
Z
fZ (z) = fX (z y)fY (y)dy
14/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Example of convolution
15/16
Course ESS011 (2014)
Lecture 11: Multivariate randomness
Summary
Tomorrow we have two important limit theorems and also recap the
course so far.
16/16