Geoscience Reference
In-Depth Information
n = n1 + n2;
V1 = ismember(data,data1)
V2 = ismember(data,data2)
An = sum(((n+1)/2 - abs(icf - (n+1)/2)).* V1)
which also yields
An =
4903
Finally, we calculate the z -value using the equations introduced above by
typing
if mod(n,2) == 0
display('n is even')
muAn = 0.25 * n1 * (n+2);
siAn = n1*n2*(n^2-4)/((48*(n-1)));
else
display('n is odd')
muAn = 0.25 * n1 * (n+1)^2/n;
siAn = n1*n2*(n+1)*(n^2+3)/(48*n^2);
end
zcalc = (An - muAn)/sqrt(siAn)
which yields
zcalc =
-0.7184
Since the critical z -value
zcrit = norminv(1-0.05/2,0,1)
which yields
zcrit =
1.9600
is larger than the calculated z -value, we cannot reject the null hypothesis
without another cause. Using
[h,p,stats] = ansaribradley(data1,data2)
yields a similar result
h =
0
p =
Search WWH ::




Custom Search