BookmarkSubscribeRSS Feed
edomachowske
Calcite | Level 5

I am using WRS test for a project I am doing. I have tried to find the answer to my question elsewhere online and in textbooks I have but cannot seem to find it anywhere.

 

I have recorded the Z score and p values from the normal approximation but am also still unsure of how to interpret that for this test? Can I say that the two groups show a statisitically significant difference for my variable or can it not be simply interpreted like this?

 

Also, how are the "Mean Scores" interpreted and should I include them in my findings? I know that this stat is not the actual mean, so what is it?

 

I know this is not the best place to post the question since it doesnt have to do with programming anything but I know someone will know the answer! 

Thanks!

 

 

7 REPLIES 7
ballardw
Super User

Generally with any of the hypothesis tests you should decide your rejection region before the test is performed. Then you only have to find either the appropriate test statistic boundary value (z-score, T or F statistic) or associated p-value. If the test statistic is "large" or "small" enough then you  reject the hypothesis. Common is to use p-value less than 0.05 but that is not magic.

 

Yes reporting the z-score and other information is a good idea in context.

 

Something like: With a z-score of x.xx we reject (or fail to reject) the null hypothes of equal mean scores and conclude that there is (or is not) a statistically significant diffence between the mean scores of A.aa and B.bb for (what ever you measured).

 

Was your sample small enough that you should consider the EXACT options instead of using the large sample approximation (z-score)?

 

If you look in the SAS documentation for the NPAR1WAY procedure you may find an example tilted Exact Wilcoxon Two-Sample Test that shows an example where the large sample approximation differs notably from the Exact test.

PGStats
Opal | Level 21

Typically you would present your test results with something like:

 

Group A median weight (50.5 kg) was greater than Group B median weight (45.2 kg), and the difference was statistically significant (Wilcoxon rank-sum test, p < 0.0...)

 

or

 

Group A median weight (50.5 kg) was greater than Group B median weight (49.2 kg), but the difference was not statistically significant (Wilcoxon rank-sum test, p > 0.05)

PG
michan22
Quartz | Level 8

Wilconxon rank sum is a non-parametric test for 2 independent groups and it test whether a randomly chosen measurement from first group tends to be systematically bigger/smaller than one from the 2nd group.

The null hypothesis mathmatically would be: P(X>=Y)=P(Y>=X)=0.5

The alternative hypothesis would be (depending on whether you are doing a one-side test or two-sided test): P(X>=Y)>0.5 or P(X>=Y)<0.5 or P(X>=Y) !=0.5

If your data distribution is approximately symmetrical then this is testing means and medians.

Shristi
Calcite | Level 5

Dear Michan;

I am also having the same query. As you have explained the three types of alternative hypothesis. My query is, which alternative one sided hypothesis does SAS test for Wilcoxon Rank Sum test. I have 12 questions, and I applied the Wilcoxon test separately for all the questions and compiled the results in a table. You can see that in question Q7 and Q8, P value (P<Z) is <0.0001. But I am not sure what alternative hypothesis is being tested in both the questions?

 

 

 

QuestionsMedian 
 PrePostP<ZP>|Z|
Q1440.07610.1521
Q2330.32020.6404
Q3330.01760.0351
Q434<.0001<.0001
Q534<.0001<.0001
Q634<.0001<.0001
Q734<.0001<.0001
Q832<.0001<.0001
Q9340.00130.0025
Q102.51<.0001<.0001
Q1132.50.10270.2053
Q122.520.04030.0805

 

michan22
Quartz | Level 8

Hi Shristi, I cannot tell based on just the p-values you provided. I believe SAS provide more output when you execute the statistical test. The alternative hypothesis that SAS is testing depend on those output, for example, which group does the Wilcoxon two-sample test statistic (or sum of scores) correspond to in your data? please post the entire SAS output if you would like help in interpreting the results.

I am not an expert in SAS programming but it seems to me based on the table that the one-sided p-value is just derived from dividing the two-sided p-value by 2. In this case it might not even matter since the one-sided p-value would be the same no matter which one direction alternative hypothesis you are testing. 

Shristi
Calcite | Level 5

Dear Michan,

Thanks for the reply. I am sharing the data for two questions that are Q7 and Q8 along with the output saved in RTF.

 

*Treat - Treatment

Res- Response

 

Q7_TREATQ7_RESQ8_TREATQ8_RES
Pre3Pre4
Pre3Pre2
Pre3Pre4
Pre2Pre3
Pre3Pre2
Pre2Pre3
Pre3Pre2
Pre3Pre2
Pre3Pre3
Pre2Pre3
Pre2Pre3
Pre2Pre3
Pre2Pre3
Pre3Pre2
Pre4Pre3
Pre4Pre3
Pre4Pre3
Pre4Pre2
Pre3Pre2
Pre4Pre2
Pre4Pre2
Pre2Pre2
Pre2Pre3
Pre2Pre3
Pre2Pre2
Pre2Pre2
Pre2Pre3
Pre3Pre3
Pre2Pre3
Pre3Pre2
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post1Post4
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post4Post1
Post3Post2
Post4Post3
Post4Post3
Post4Post3
Post3Post3
Post3Post2
Post3Post2
Post4Post2
Post3Post2
Post3Post2
Post4Post2
Post4Post3
Post4Post2
Post4Post2
Post4Post2
michan22
Quartz | Level 8

Hi Shristi,

 

As you can see from the output (Q7 for example), the Wilcoxon two sample test statistic (633) corresponds to the sum of scores in your "pre" group, and the expected value under Ho (no difference) is 915. 633 is significantly less than 915, so you would conclude that you reject the null hypothesis of no difference between the two groups, and the data is supporting that the median score (I believe this is the option you used based on the last post?) from pre group is significantly lower than the post group (or to be real precise with the Wilcoxon rank sum test, the data is supporting that the scores from pre group is systematically lower than the post group). 

 

So to your original question, you have to figure out which alternative hypothesis SAS is testing based on the output if you decide to use the one-sided p-value. 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 3370 views
  • 0 likes
  • 5 in conversation