Slides 4
Slides 4
Lecture 4
School of Mathematics
Univariate Normal Distribution
• For x ⇠ N(µ, 2
) the density function is
✓ ◆2 !
1 1 x µ
f (x) = p exp
2⇡ 2
1
Univariate Normal Distribution
• For x ⇠ N(µ, 2
) the density function is
✓ ◆2 !
1 1 x µ
f (x) = p exp
2⇡ 2
x µ 2
• Write = (x µ)( 2
) 1
(x µ)
1
Univariate Normal Distribution
• For x ⇠ N(µ, 2
) the density function is
✓ ◆2 !
1 1 x µ
f (x) = p exp
2⇡ 2
x µ 2
• Write = (x µ)( 2
) 1
(x µ)
• For generalised vector x this is
(x µ)0 ⌃ 1
(x µ)
1
Mahalanobis distance
2
Mahalanobis distance
• Also written as
2
= dM (x, µ)
2
Multivariate Normal Distribution
0
Definition 6.1 A random vector x = (x1 , . . . , xp ) follows a multivariate
normal distribution (MVN; or a p-dimensional normal distribution) of
parameters µ and ⌃, x ⇠ Np (µ, ⌃), if its density function is
⇢
1 1
f (x) = exp (x µ)0 ⌃ 1
(x µ)
(2⇡)p/2 |⌃|1/2 2
3
Multivariate Normal Distribution
0
Definition 6.1 A random vector x = (x1 , . . . , xp ) follows a multivariate
normal distribution (MVN; or a p-dimensional normal distribution) of
parameters µ and ⌃, x ⇠ Np (µ, ⌃), if its density function is
⇢
1 1
f (x) = exp (x µ)0 ⌃ 1
(x µ)
(2⇡)p/2 |⌃|1/2 2
3
Multivariate Normal Distribution
0
Definition 6.1 A random vector x = (x1 , . . . , xp ) follows a multivariate
normal distribution (MVN; or a p-dimensional normal distribution) of
parameters µ and ⌃, x ⇠ Np (µ, ⌃), if its density function is
⇢
1 1
f (x) = exp (x µ)0 ⌃ 1
(x µ)
(2⇡)p/2 |⌃|1/2 2
3
Multivariate Normal Distribution
0
Definition 6.1 A random vector x = (x1 , . . . , xp ) follows a multivariate
normal distribution (MVN; or a p-dimensional normal distribution) of
parameters µ and ⌃, x ⇠ Np (µ, ⌃), if its density function is
⇢
1 1
f (x) = exp (x µ)0 ⌃ 1
(x µ)
(2⇡)p/2 |⌃|1/2 2
3
Generalised Population Variance
4
Generalised Population Variance
4
Generalised Population Variance
4
Generalised Population Variance
4
Example:
5
Example:
5
Example:
5
Example: Contour plots
6
Example: Contour plots
6
Example: Finding contours
https://datasciencegenie.com/3d-contour-plots-of-bivariate-normal-distribution/
7
MVN Properties:
8
MVN Properties:
8
MVN Properties:
8
MVN Properties (cont.):
Standardized variables:
1/2
z=⌃ (x µ) ⇠ Np (0, I)
9
MVN Properties (cont.):
Chi-square distribution:
10
MVN Properties (cont.):
Chi-square distribution:
10
MVN Properties (cont.):
11
MVN Properties (cont.):
11
MVN Properties (cont.):
11
MVN Properties (cont.):
x1 ⇠ Nr (µ1 , ⌃11 )
11
MVN Properties (cont.):
! ! ! !
x µx x ⌃xx ⌃xy
E = , cov =
y µy y ⌃yx ⌃yy
12
MVN Properties (cont.):
! ! ! !
x µx x ⌃xx ⌃xy
E = , cov =
y µy y ⌃yx ⌃yy
For the next three slides we assume
! " ! !#
x µx ⌃xx ⌃xy
is Np+q ,
y µy ⌃yx ⌃yy
12
MVN Properties (cont.):
Independence:
13
MVN Properties (cont.):
Independence:
13
MVN Properties (cont.):
Independence:
13
MVN Properties (cont.):
Conditional distributions:
14
MVN Properties (cont.):
Conditional distributions:
E (x | y) = µx + ⌃xy ⌃yy1 y µy
cov(x | y) = ⌃xx ⌃xy ⌃yy1 ⌃yx
14
MVN Properties (cont.):
Conditional distributions:
E (x | y) = µx + ⌃xy ⌃yy1 y µy
cov(x | y) = ⌃xx ⌃xy ⌃yy1 ⌃yx
14
MVN Properties (cont.):
Conditional distributions:
E (x | y) = µx + ⌃xy ⌃yy1 y µy
cov(x | y) = ⌃xx ⌃xy ⌃yy1 ⌃yx
14
Bivariate Normal Distribution
! !!
2
0 µx x xy
Given a random vector (x, y) ⇠ N , 2
µy yx y
15
Bivariate Normal Distribution
! !!
2
0 µx x xy
Given a random vector (x, y) ⇠ N , 2
µy yx y
15
Joint density function
16
Joint density function
"✓ ◆2 ✓ ◆2 #
1 x µx y µy (x µx ) (y µy )
Q(x, y ) = + 2⇢
1 ⇢2 x y x y
16
Marginal density functions
and ( ✓ ◆2 )
1 1 y µy
fy (y ) = p exp .
2⇡ y 2 y
17
Independence
18
Independence
18
Independence
18
Conditional Distributions
19
Conditional Distributions
and
8 !2 9
1 < 1 x µx ⇢ yx (y µy ) =
fx|y (x | y ) = p p exp p .
2⇡ x 1 ⇢ 2 : 2 x 1 ⇢2 ;
19
Conditional Distributions
and
8 !2 9
1 < 1 x µx ⇢ yx (y µy ) =
fx|y (x | y ) = p p exp p .
2⇡ x 1 ⇢ 2 : 2 x 1 ⇢2 ;
Thus
✓ ◆
y 2
y | x = x ⇠ N µy + ⇢ (x µx ) , y 1 ⇢2
x
19
Conditional Distributions
and
8 !2 9
1 < 1 x µx ⇢ yx (y µy ) =
fx|y (x | y ) = p p exp p .
2⇡ x 1 ⇢ 2 : 2 x 1 ⇢2 ;
Thus
✓ ◆
y 2
y | x = x ⇠ N µy + ⇢ (x µx ) , y 1 ⇢2
x
and
✓ ◆
x 2
x | y = y ⇠ N µx + ⇢ (y µy ) , x 1 ⇢2
y
19