normal distribution

5 次查看(过去 30 天)
Avishek
Avishek 2011-12-16
i have a 2D matrix whose values depends upon two axis
A=zeros(5,5);
A=[ 1 1 1 1 1;
2 6 7 6 2;
3 7 9 7 3;
2 6 7 6 2;
1 2 5 2 1;]
% now calculating mean value
area=sum(sum(A));
m_value=area/25
% calculating mean vector;
u=zeros(2,1);
for i=1:5
for j=1:5
u=u+(A(i,j)*[i;j]);
end
end
u=u/area
uu=u*u';
var=zeros(2);
for i=1:5
for j=1:5
sq=[i;j]*[i;j]';
var=var+ (A(i,j)*sq/area);
end
end
var=var-uu;% this is covariance matrix
%*NOw how do i test that data contained in matrix A is normally distributed or not*
*which test/equation should i apply?*
*i think it is the case of multivariate *
any suggestions comments are welcome

回答(1 个)

the cyclist
the cyclist 2011-12-16
I am not aware of any tests for multivariate normality in MATLAB, including in the Statistics Toolbox.
I also scanned the file exchange, but did not see anything useful.
You could code it yourself. Mardia's test from this page:
seems like it might not be too difficult to code.
  1 个评论
Avishek
Avishek 2011-12-16
yeah coding is not my problem, but i am new to coding, i just want to know how to find whether the data in matrix follows distribution or not.
the link you provided has mean(u), sigma(variance),and X(mustbe data of x).
my confusion is " should i use the mean values or mean vectors"
and how do i incorporate these matrix, vectors in the equation , since they are for single elements.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by