Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3660

Re: MultinormalDistribution Question

From Andrzej Kozlowski <akoz@mimuw.edu.pl>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: MultinormalDistribution Question
Date 2011-07-11 11:01 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ivel76$89d$1@smc.vnet.net> (permalink)
References <201107100901.FAA24634@smc.vnet.net>

Show all headers | View raw


First, your covariance matrix is not symmetric definite. I think you probably meant:

CapSigma = {{sigma1^2, rho*sigma1*sigma2}, {rho*sigma1*sigma2,
   sigma2^2}}

Assuming that, you can get the conditional expectation from the definition:

Integrate[y PDF[dist, {6.3, y}], {y, -Infinity, Infinity}]/
 PDF[MarginalDistribution[dist, 1], 6.3]

5.6

Alternatively, you can use Mathematica 8 built in NExpectation function:

NExpectation[y \[Conditioned] 6.299 <= x <= 6.301, {x, y} \[Distributed] dist]
5.6


Once you have the conditional expectation, you can compute the conditional variance, e.g.

 Chop[Integrate[(y - 5.6)^2*PDF[dist, {6.3, y}], {y, -Infinity, Infinity}]/PDF[MarginalDistribution[dist, 1], 6.3]]
 0.0256


Andrzej Kozlowski

On 10 Jul 2011, at 11:01, Steve wrote:

> Hello,
>
> Can someone help me with this ?
>
> I have 2 normal distributions; dist1 describes x and dist2 describes
> y. Each are fully defined and are correlated to one another by the
> correlation coefficient. How can I detemine the mean and standard
> deviation of the expected normal distribution that is associated with
> a given x value from dist1 ?
>
> An example:
> mean1 = 5.8
> sigma1 =0 .2
>
> mean2 = 5.3
> sigma2 = 0.2
>
> Correlation Coefficient, rho = 0.6
>
> Given an x value of 6.3 (from dist1) what is the corresponding mean
> and standard deviation of y ?
>
> I can view the combined density function from the following:
>
> Mu = {mean1, mean2}
> CapSigma = {{sigma1^2, rho*sigma1*sigma2} , {rho,  rho*sigma1*sigma2}
> dist = MultinormalDistribution[Mu,CapSigma]
> pdf = PDF[dist,{x,y}]
> plot1 = Plot3D[pdf, {x,4,7},{y,4,7}, PlotRange->All]
>
> but can't see how to determine the mean and the standard deviation of
> y for a given value of x, like 6.3
>
> Any help would be appreciated.
>
> Thanks,
>
> --Steve
>
>
>
>

Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: MultinormalDistribution Question Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-11 11:01 +0000
  Re: MultinormalDistribution Question Steve <s123@epix.net> - 2011-07-17 10:03 +0000
    Re: MultinormalDistribution Question Ray Koopman <koopman@sfu.ca> - 2011-07-19 10:54 +0000
    Re: MultinormalDistribution Question Ray Koopman <koopman@sfu.ca> - 2011-07-20 10:36 +0000

csiph-web