Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Fit Multivariate Normal Distribution To Data In MATLAB?

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?

like image 598
Shaked Avatar asked Nov 11 '22 04:11

Shaked


1 Answers

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.

like image 72
Robert Dodier Avatar answered Nov 15 '22 07:11

Robert Dodier