normal distribution
5 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
the cyclist
on 16 Dec 2011
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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!