본문 바로가기
AI & Data/AI&ML Examples

[AI/ML Examples] Factorization criterion in action in the special case of the bivariate normal pdf

by Henry Cho 2023. 2. 6.
728x90

Factorization criterion in action in the special case of the bivariate normal pdf

포스트 난이도: HOO_Senior


# Example 1

 

Find the marginals (i.e., the marginal pdfs of Xand Y from the joint pdf). If you are unable to do this analytically (which is fine, nopenalties), assume μX=μY= 0,σX=σY= 1, and ρ= 0.5; specifically, use numerical integration to find the values of the marginal pdfs on a fine grid from on the interval [-3,3], plot those and compare withNormal(0,1) pdf

f _y(y)=\int_{-\infty }^{\infty }f_x_y(x,y)dx = \frac{1}{2\pi \sigma _x\sigma _y\sqrt{1-p^{2}}}\int_{-\infty }^{\infty }e^{-\frac{1}{2}Q(x,y)}dy

Q(x,y)=\frac{(\frac{x-\mu _x}{\sigma_x})^{2}-2p(\frac{x-\mu _x}{\sigma _x})(\frac{y-\mu _y}{\sigma _y})+(\frac{y-\mu _y}{\sigma _y})^{2}}{1-p^{2}}

=(\frac{x-a}{b})^{2}+c

a=\mu _x+p\frac{\sigma _x}{\sigma _y}(y-\mu )

b= \sigma _x\sqrt{1-p^{2}}

c=(\frac{y-\mu _y}{\sigma _y})^{2}

f_y(y)=\frac{1}{2\pi \sigma _x\sigma _y\sqrt{1-p^{2}}}\int_{-\infty }^{\infty }e^{-\frac{1}{2}((\frac{x-a}{b})^{2}+c)^{2}}dx

f_y(y)=\frac{e^{-\frac{c}{2}}}{2\pi \sigma _x\sigma _y\sqrt{1-p^{2}}}\int_{-\infty }^{\infty }e^{-\frac{1}{2}((\frac{x-a}{b})^{2})}dx

f_Y(y)=\frac{e^{-\frac{c}{2}}}{\sqrt{2\pi} \sigma _x\sigma _y\sqrt{1-p^{2}}}\sigma _x\sqrt{1-p^{2}}

f_y(y)=\frac{1}{\sqrt{2\pi}\sigma _y}e^{-\frac{1}{2}(\frac{y-\mu _y}{\sigma _y})^{2}}

# Example 2

 

Show that ifρ= 0then the rvs are independent. Marginally,X is normal with mean μX and variance σ2X(similarly, for Y).

 

If p=0,

f_x_y(x,y)=\frac{1}{2\pi \sigma _x\sigma _y}e^{-\frac{1}{2}((\frac{x-\mu _x}{\sigma _x})^{2}+(\frac{y-\mu _y}{\sigma _y})^{2})}

f_x(x)f_y(y)=\frac{1}{2\pi \sigma _x\sigma _y}e^{-\frac{1}{2}((\frac{x-\mu _x}{\sigma _x})^{2}+(\frac{y-\mu _y}{\sigma _y})^{2})}

f_x_y(x,y)=f_x(x)f_y(y)

Thus, X and Y are independent.


# Example 3

 

Assume μX=μY= 0 and σX=σY= 1; let ρ be general (strictly between -1 and 1). For values of ρ on the grid from -0.75 to 0.75 with step size 0.25, p lot the conditional pdf of X given that Y= 1. If Y= 1 is the observed value, does the correlation (positive or negative) help one predicting X, relative to the case of ρ= 0? Briefly discuss.


 

728x90

댓글