Prev: images matching using canny edge detection algorithm
Next: Ordered computation of eigenvalues from good initial estimates, without explicit sorting
From: Alfian Abdul Halin on 28 Apr 2010 08:31 Hi, I was wondering if anyone can help me plotting the probabiliy of data, vs the calue of the data. E.g. I have 3 variables, observe N-times X = [132 333 444; 143 345 1000; 444 111 123; etc. etc. etc.] Assuming normal distribution, I calculated: p = mvnpdf(X,mean(X),cov(X)); From here, I get the probability values of each observation in X (or am I wrong here...) Anywayz... How to I come up with a plot of the probability value vs the data X? Since I am new to all this, I don't quite know what query term to search for. Tried searching online, but ended up getting more confused. Any help is highly appreciated. Thanks in advance! Alf
From: Tom Lane on 28 Apr 2010 10:17
Alf, what you get is indeed the probability density for each data point. But you have three-dimensional data, plus an extra dimension for the density, and I'm not sure how you would like to plot that. One option is to use the contourslice function. It would require that you evaluate the density over a regular grid of points: p = mvnpdf(Z, mean(X), cov(X)) where Z is a matrix containing the grid over which the density should be evaluated. But I suspect that's not what you really want. I have also seen people use a chi-square plot for multivariate data. You could search around for that to see if it's what you need. The basic idea is to look at a measure of distance from each point to the mean, and examine the distribution of those distances. -- Tom "Alfian Abdul Halin" <jawatroxion(a)gmail.com> wrote in message news:hr99qa$4sn$1(a)fred.mathworks.com... > Hi, I was wondering if anyone can help me plotting the probabiliy of data, > vs the calue of the data. > > E.g. I have 3 variables, observe N-times > > X = [132 333 444; > 143 345 1000; > 444 111 123; > etc. etc. etc.] > > Assuming normal distribution, I calculated: > > p = mvnpdf(X,mean(X),cov(X)); > > From here, I get the probability values of each observation in X (or am I > wrong here...) > Anywayz... > > How to I come up with a plot of the probability value vs the data X? Since > I am new to all this, I don't quite know what query term to search for. > Tried searching online, but ended up getting more confused. > > Any help is highly appreciated. Thanks in advance! > > Alf > |