Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3659 > unrolled thread
| Started by | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| First post | 2011-07-11 11:01 +0000 |
| Last post | 2011-07-11 11:01 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: MultinormalDistribution Question Bob Hanlon <hanlonr@cox.net> - 2011-07-11 11:01 +0000
| From | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| Date | 2011-07-11 11:01 +0000 |
| Subject | Re: MultinormalDistribution Question |
| Message-ID | <ivel67$89a$1@smc.vnet.net> |
Clear[x, y];
mean1 = 58/10;
sigma1 = 2/10;
mean2 = 53/10;
sigma2 = 2/10;
rho = 6/10;
dist = MultinormalDistribution[{mean1, mean2},
{{sigma1^2, rho*sigma1*sigma2},
{rho*sigma1*sigma2, sigma2^2}}];
plot1 = Plot3D[PDF[dist, {x, y}],
{x, mean1 - 3 sigma1, mean1 + 3 sigma1},
{y, mean2 - 3 sigma2, mean2 + 3 sigma2},
PlotRange -> All]
m = Integrate[y*PDF[dist, {63/10, y}],
{y, -Infinity, Infinity}]
(14*Sqrt[2/Pi])/E^(25/8)
m // N
0.490792
Alternatively,
m == Expectation[y*DiracDelta[x - 63/10],
Distributed[{x, y}, dist]]
True
s = Sqrt[Integrate[(y - m)^2*PDF[dist, {63/10, y}],
{y, -Infinity, Infinity}]];
s // N
1.51329
Alternatively,
s == N[Sqrt[Expectation[(y - m)^2*DiracDelta[x - 63/10],
Distributed[{x, y}, dist]]]]
True
Bob Hanlon
---- 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 top | Article view | comp.soft-sys.math.mathematica
csiph-web