How To Fit Multivariate Normal Distribution To Data In MATLAB?

Shaked picture Shaked · Aug 1, 2014 · Viewed 9.4k times · Source

I'm trying to fit a multivariate normal distribution to data that I collected, in order to take samples from it. I know how to fit a (univariate) normal distribution, using the fitdist function (with the 'Normal' option).

How can I do something similar for a multivariate normal distribution?

Doesn't using fitdist on every dimension separately assumes the variables are uncorrelated?

Answer

Robert Dodier picture Robert Dodier · Aug 13, 2014

There isn't any need for a specialized fitting function; the maximum likelihood estimates for the mean and variance of the distribution are just the sample mean and sample variance. I.e., compute the sample mean and sample variance and you're done.