Why I am getting Same p-value, h and stats while using Wilcoxon Rank test for 7 different data set?
1 view (last 30 days)
I am trying to find the significant realtion between the az_solar and Mean_Surface_REF of seven different bands using Wilcoxon rank test. But I am geeting same p-value and statistics for every bands. However, each band contains different value.
Would some one please help me regrading these issue?
%% This is the code i am using
[p1,h1,stats1] = ranksum(az_solar,Mean_Surface_REF(:,1));
[p2,h2,stats2] = ranksum(az_solar,Mean_Surface_REF(:,2));
[p3,h3,stats3] = ranksum(az_solar,Mean_Surface_REF(:,3));
[p4,h4,stats4] = ranksum(az_solar,Mean_Surface_REF(:,4));
[p5,h5,stats5] = ranksum(az_solar,Mean_Surface_REF(:,5));
[p6,h6,stats6] = ranksum(az_solar,Mean_Surface_REF(:,5));
[p7,h7,stats7] = ranksum(az_solar,Mean_Surface_REF(:,7));
Also, I have attached my dataset.
dpb on 13 Jun 2022
>> [mean(taz) std(taz)]
>> [mean(mnref); std(mnref)]
0.0030 0.0065 0.0166 0.0093 0.0013 0.0045 0.0049
0.0034 0.0023 0.0043 0.0034 0.0039 0.0053 0.0052
pretty-much explains it -- the means are some 4-5 orders of magnitude between the one vector and any of the vectors in the array. You've just totally saturated the value of the test statistic to the point the p-value returned is essentially zero.
You'd have been able to determine this yourself if you had simply looked at your data before blindly throwing it at some test statistic.
struct with fields:
>> format long, format compact
More Answers (1)
the cyclist on 13 Jun 2022
Edited: the cyclist on 13 Jun 2022
That test statistic only depends on the count and relative ordering of the respective set elements. In your case, it looks like the counts are always the same, and (as @dpb points out), your 7 cases are always completely offset from the comparator set.
Here is a small example showing the same thing:
x = 1:5;
y1 = 101:105; % 5 elements, fully offset from x
y2 = 1001:1005; % Also 5 elements, fully offset from x [same result]
y3 = 101:103; % 3 elements, still fully offset [different result due to different count]