Path: news.mathworks.com!not-for-mail From: "Tomaz " <tomaz.bartolj@gmail.com> Newsgroups: comp.soft-sys.matlab Subject: Re: Conditional sampling from multivariate normal distribution Date: Tue, 20 Apr 2010 21:46:04 +0000 (UTC) Organization: Universiteit van Tilburg Lines: 25 Message-ID: <hql7as$q6n$1@fred.mathworks.com> References: <hpuqjr$295$1@fred.mathworks.com> <hpv9rm$n2d$1@fred.mathworks.com> <hpvif0$9ih$1@fred.mathworks.com> <hpvk44$2if$1@fred.mathworks.com> <hpvm38$t4c$1@fred.mathworks.com> <hpvrtp$iun$1@fred.mathworks.com> Reply-To: "Tomaz " <tomaz.bartolj@gmail.com> NNTP-Posting-Host: webapp-03-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1271799964 26839 172.30.248.38 (20 Apr 2010 21:46:04 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Tue, 20 Apr 2010 21:46:04 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2037399 Xref: news.mathworks.com comp.soft-sys.matlab:628294 Peter Perkins <Peter.Perkins@MathRemoveThisWorks.com> wrote in message <hpvrtp$iun$1@fred.mathworks.com>... > On 4/12/2010 1:43 PM, Tomaz wrote: > > > Could you please just tell > > me what would be 'statistical expression' that describes my problem the > > best? Is it 'Conditional sampling', 'Conditional distributions' or > > something else? Any synonyms/ alternatives? I am asking this to be able > > to search for related data more efficiently... > > I would think either of those, plus perhaps a "multivariate normal". The same simple result does not hold for MVT, for example. I tried really hard to understand the formulas and solve my problem, but I get stuck. Peter (or anybody else), I would really appreciate if you would point out where I go wrong. I tried to follow your directions and Wiki page, but this happens (look below). Should I change anything because of row/ column vector thing? mu=mean (origData) mu1=mu (1) mu2 = mu (2:4) sigma = cov (origData) sigma11 = sigma (1:1, 1:1) sigma12 = sigma (1:1, 2:4) sigma21 = sigma (2:4, 1:1) sigma22= sigma (2:4, 2:4) sigma1_2 = sigma11 - sigma21*(sigma22\sigma12) ??? Error using ==> mldivide Matrix dimensions must agree.