Path: news.mathworks.com!not-for-mail
From: "Tomaz " <tomaz.bartolj@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Random sampling from mulvairate distribution
Date: Mon, 9 Nov 2009 15:21:02 +0000 (UTC)
Organization: Universiteit van Tilburg
Lines: 16
Message-ID: <hd9c0u$inu$1@fred.mathworks.com>
References: <hd8s6n$n7$1@fred.mathworks.com> <a1aa67ad-54fe-4aea-b785-275b6f62cfa7@m20g2000vbp.googlegroups.com>
Reply-To: "Tomaz " <tomaz.bartolj@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257780062 19198 172.30.248.37 (9 Nov 2009 15:21:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 9 Nov 2009 15:21:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2037399
Xref: news.mathworks.com comp.soft-sys.matlab:583570


Greg, firstly thank you for your help.
To tell you the truth my knowledge of statistics is not good enough to quite understand your hints. But let me rephrase my question.

I have a data set with 4 independent normally distributed variables. I put this dataset in matrix A. From this it is easy to calculate average vector (MU): 
MU = mean(A);

It is also trivial to obtain variance-covariance matrix (SIGMA).
SIGMA = cov(A);

So, given MU and SIGMA I can 'build' and plot normal (Gaussian) multi variate distribution.

Now, what I need to do is to generate a value for x4, when I have x1, x2 and x3 given. 

I will be basicaly performing a simulation, where I will generate values for column x4 every time. I suppose I just need a normal (univariable) distribution of x4 and then sample from it. However, in my understanding this normal distribution is different (has other mean and stdDev) for every combination of x1, x2, x3. So, how an I get the right distribution function for some particular values of x1, x2 and x3? And how can I then sample values for x4 out of it? 

I hope I was more clear now?