+ Reply to Thread
Results 1 to 4 of 4

Thread: Conditional density, bivariate normal

  1. #1
    Points: 3,621, Level: 37
    Level completed: 81%, Points required for next Level: 29
    askazy's Avatar
    Location
    Holand
    Posts
    160
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Conditional density, bivariate normal




    Let Z=X+Y where X \sim N(\mu,\sigma^2) and Y \sim N(0,1) are independent. What is the conditional density of X given Z, f_{X|Z}(x|z)?

    I already found that f_{X,Z}(x,z)=\frac{1}{2\pi\sigma}e^{-\frac{1}{2\sigma^2}[(x-\mu)^2+\sigma^2(x-z)^2]} is bivariate normal and Z \sim N(\mu,\sigma^2+1)

    f_{X|Z}(x|z)=\frac{f_{X,Z}(x,z)}{f_Z(z)}=\frac{\frac{1}{2\pi\sigma}e^{-\frac{1}{2\sigma^2}[(x-\mu)^2+\sigma^2(x-z)^2]}}{\frac{1}{\sqrt{2\pi}\sqrt{\sigma^2+1}}e^{-\frac{1}{2(\sigma^2+1)}(z-u)^2}}

    f_{X|Z}(x|z)=\frac{\sqrt{\sigma^2+1}}{\sqrt{2\pi}\sigma}e^{-\frac{1}{2\sigma^2}[(x-\mu)^2+\sigma^2(x-z)^2]+\frac{1}{(2\sigma^2+1)}(z-\mu)^2}

    After some simplifications I get

    f_{X|Z}(x|z)=\frac{\sqrt{\sigma^2+1}}{\sqrt{2\pi}\sigma}e^{\frac{1}{2\sigma^2(\sigma^2+1)}[-(\sigma^2+1)(x^2-2\mu x+\sigma^2(x^2-2zx)-2\sigma^2\mu z]}

    from here I'm stuck.Someone said that the conditional distribution would be N(Z,1) but not give details.
    The difference between stupidity and genius is that genius has its limits.
    "Albert Einstein"

  2. #2
    TS Contributor
    Points: 7,081, Level: 55
    Level completed: 66%, Points required for next Level: 69

    Location
    Copenhagen , Denmark
    Posts
    515
    Thanks
    71
    Thanked 123 Times in 116 Posts

    Re: Conditional density, bivariate normal

    The mathematical expression you have written lacks a parenthesis inside the hard parenthesis [] of the exponential function making it unclear what the factor (\sigma^2 + 1) is multiplied with

  3. #3
    TS Contributor
    Points: 7,081, Level: 55
    Level completed: 66%, Points required for next Level: 69

    Location
    Copenhagen , Denmark
    Posts
    515
    Thanks
    71
    Thanked 123 Times in 116 Posts

    Re: Conditional density, bivariate normal

    Heres what I have:

    First of all I note that (X,Z) are both linear combinations of (X,Y) that are independent so their distribution is bivariate normal.
    It then holds that X\lvert Z is normal with mean:

    E[X\lvert Z] = \mu_x + \rho_{xz}\frac{\sigma_x}{\sigma_z} (Z- E[Z])

    and the variance is given as

    \sigma^2_{x\lvert z} = (1-\rho_{xz}^2)\sigma^2_x

    to find the terms we do:

    cov(z,z) = cov(z,x) + cov(z,y)

    and using that E[Y]=0 and independence of X and Y:

    Var(z)= cov(z,x) + E[ZY] = cov(z,x) + E[(X+Y)Y] = cov(z,x) + var(Y)

    however since var(z) = var(x) + var(y)

    we have: cov(z,x) = var(x)

    and then \rho_{zx} = \frac{var(x)}{sd(x),sd(z)} = \frac{sd(x)}{sd(z)} = \frac{sd(x)}{\sqrt{var(x)+ 1}}


    I know that this does not prove what you are assked to prove but the place where you are stuck you probably have to collect terms and complete the square in order to get the conditional distribution on the form of a normal. The above gives you what I believe you have to end up with .....

  4. The Following User Says Thank You to JesperHP For This Useful Post:

    askazy (06-10-2015)

  5. #4
    TS Contributor
    Points: 7,081, Level: 55
    Level completed: 66%, Points required for next Level: 69

    Location
    Copenhagen , Denmark
    Posts
    515
    Thanks
    71
    Thanked 123 Times in 116 Posts

    Re: Conditional density, bivariate normal


    ok so working with the density form youre first equation but dropping constant factors .. here is what I get ...

    \frac{f_{xz}}{f_z} \propto \exp\left( - \frac{1}{2\sigma_x^2} [(x-\mu)^2 + \sigma_x^2 (x-z)^2]\right)

    first expand the square:

    \propto \exp\left( - \frac{1}{2\sigma_x^2 }[x^2 + \mu^2 -2x\mu + \sigma_x^2 (x^2 + z^2 - 2xz)]\right)

    remove any additive terms in exp function not containing x since can be seperated out as factors not including x. Hence the expression is proportional to:

    \propto \exp\left( - \frac{1}{2\sigma_x^2 }[x^2  -2x\mu + \sigma_x^2 x^2  - 2\sigma_x^2xz)]\right)
    =  \exp\left( - \frac{1}{2\sigma_x^2 }[(\sigma_x^2 + 1) x^2  -2(\mu+ \sigma_x^2z)x]\right)
    =  \exp\left( -  \frac{1}{2}\frac{(\sigma_x^2 + 1)}{\sigma_x^2 }[ x^2  -2 \frac{(\mu+ \sigma_x^2z)}{(\sigma_x^2 + 1)}x]\right)
    adding and substracting the constant C needed to complete the square:
    =  \exp\left( -  \frac{1}{2}\frac{(\sigma_x^2 + 1)}{\sigma_x^2 }\left[\left[  x  - \frac{(\mu+ \sigma_x^2z)}{(\sigma_x^2 + 1)}\right]^2 - C \right]\right)

    where C= \left[ \frac{(\mu+ \sigma_x^2z)}{(\sigma_x^2 + 1)}\right]^2

    and then quickly removing the constant to get the proportional expression:
    \propto  \exp\left( -  \frac{1}{2}\frac{(\sigma_x^2 + 1)}{\sigma_x^2 }\left[  x  - \frac{(\mu+ \sigma_x^2z)}{(\sigma_x^2 + 1)}\right]^2 \right)

    conditional on z this is a normal kernel with the variance \frac{\sigma_x^2}{\sigma_x^2 + 1} and conditional mean:

    \frac{\mu}{(\sigma_x^2 + 1)} +\frac{\sigma_x^2}{\sigma_x^2 + 1} z
    and since \mu = E[Z] we can add and substract:


    \frac{\mu}{(\sigma_x^2 + 1)} +\frac{\sigma_x^2}{\sigma_x^2 + 1} z  + \frac{\mu \sigma_x^2}{\sigma_x^2 + 1} - \frac{\mu \sigma_x^2}{\sigma_x^2 + 1}


    to get:


    \mu+\frac{\sigma_x^2}{\sigma_x^2 + 1}( z - E[z])

    to check that the result is the same as we get if we use the sentence I wrote up in the previous post

  6. The Following User Says Thank You to JesperHP For This Useful Post:

    askazy (06-10-2015)

+ Reply to Thread

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats