what test to use on z-scores

2 views (last 30 days)
Joanne Hall on 25 Mar 2023
Commented: Star Strider on 26 Mar 2023
Dear matlab,
I have z-scores of 2 groups. I want to compare them.
What test in matlab should I use for relative comparison using just the z scores?
Thanks in advance for any guidance!
Joanne
Joanne Hall on 26 Mar 2023
Thanks Star, see answr below

Star Strider on 25 Mar 2023
Since the zscore is simply a standardised method of expressing data, and if the mean values and standard deviation (std) values of each group are known, it is possible to map back to the original data and then do a valid comparison. However, if that information is not available and so it is not possible to cannot back-calculate to the original data, then your ability to discriminate the two gropus is likely lost, and no test will produce a valid comparison.
An example using random original and standardised data and the Wilcoxon ranksum test (assuming that the two groups are not paired) illustrates the issue —
x = randn(25,1);
y = randn(25,1)*3+5;
zx = zscore(x);
zy = zscore(y);
[p1,h1,stats1] = ranksum(x,y) % Original Data Are Significantly Different
p1 = 1.3090e-07
h1 = logical
1
stats1 = struct with fields:
zval: -5.2776 ranksum: 365
[p2,h2,stats2] = ranksum(zx,zy) % Standardised Scores OF The Original Data Are Not Significantly Different
p2 = 0.8009
h2 = logical
0
stats2 = struct with fields:
zval: -0.2522 ranksum: 624
So while the original data in this example are significantly different (the ranksum test assumes that both groups have the same underlying distribution, although the distribution itself is irrelevant), the standardised scores of the same data are not.
It is not worth the effort to compare the standardised scores, since any differences between the two groups that might have originally existed are lost in the standardisation process.
You have my sympathies.
.
Star Strider on 26 Mar 2023
As always, my pleasure!

Categories

Find more on Hypothesis Tests in Help Center and File Exchange

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by