Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3651
| From | Barrie Stokes <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: MultinormalDistribution Question |
| Date | 2011-07-11 10:57 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ivekuh$85v$1@smc.vnet.net> (permalink) |
| References | <201107100901.FAA24634@smc.vnet.net> |
Hi Steve
The following will give you some ideas (note that I haveI have repaired your CapSigma).
mean1 = 5.8;
sigma1 = 0.2;
mean2 = 5.3;
sigma2 = 0.2;
rho = 0.6;
mu = {mean1, mean2}
CapSigma = {{sigma1^2, rho*sigma1*sigma2} , {rho*sigma1*sigma2, sigma1^2}}
dist = MultinormalDistribution[mu, CapSigma]
pdf = PDF[dist, {x, y}]
plot1 = Plot3D[pdf, {x, 4, 7}, {y, 4, 7}, PlotRange -> All]
pdfConditional = (PDF[dist, {x, y}] /. {x -> 6.3})/ Integrate[ PDF[dist, {x, y}] /. {x -> 6.3}, {y, 4, 7} ] // Simplify
plotConditional = Plot[pdfConditional, {y, 4, 7}, PlotRange -> All]
meanConditional = Integrate[ y pdfConditional, {y, 4, 7} ]
sdConditional = Sqrt[ Integrate[ (y - meanConditional)^2 pdfConditional, {y, 4, 7} ]]
Cheers
Barrie
>>> On 10/07/2011 at 7:01 pm, in message <201107100901.FAA24634@smc.vnet.net>,
Steve <s123@epix.net> 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 | Next | Find similar | Unroll thread
Re: MultinormalDistribution Question Barrie Stokes <Barrie.Stokes@newcastle.edu.au> - 2011-07-11 10:57 +0000
csiph-web