Tuesday, 22 October 2013

Wilcoxon Signed Rank Test Calculator

The Wilcoxon Signed Rank test is a non-parametric test used to determine whether two dependent/matched groups of data are different. A good example would be the blood sugar level of a group of patients before a particular drug is applied, and the blood sugar level of the same group of patients just after the treatment. The result of Patient 1 before the treatment is matched with the result of Patient 1 after the treatment, and so on.

The Wilcoxon Signed Rank test is robust in that it does not require the data to have a Normal/Gaussian distribution, and can be regarded as the non-parametric counterpart to the parametric Paired Student's t-test. For more details on how to carry out the Wilcoxon Signed Rank test, have a look at the following post, or refer to an appropriate textbook on the subject.

As is common with hypothesis testing in general, we start out with a Null Hypothesis, which can be thought of as our default assumption. The Null Hypothesis for the Wilcoxon Signed Rank test is that the two groups of data are not different. Based on the W statistic, which is calculated from the data, we determine whether to accept or reject the Null Hypothesis. If we have a large enough number of samples (say over 25, to be on the safe side), we can use the calculated p-value to either accept or reject the Null Hypothesis. For a smaller sample size, we read off the critical value of W from a table, and if our calculated W statistic is below the critical W value we reject the Null Hypothesis.

The p-value is the probability of obtaining either the observed difference or a more extreme value of the difference between the two groups, purely based on chance. If the p-value is very low (say below a threshold value of 0.05), we reject the Null Hypothesis and the result is considered significant. On the other hand, if the p-value is greater than 0.05, we accept the Null Hypothesis. One should exercise caution when interpreting the results, but a very low value of the p-value could merit further examination of the data, in terms of investigating the possible causes of the significant difference.

Below is an online calculator of the Wilcoxon Signed Rank test. Please enter Group 1 and Group 2 values as comma separated numbers in the fields below. Group 1 and Group 2 must have the same number of samples, and there must be at least 6 differing samples for each of the two groups for the test results to be valid. Alternatively, you can choose a two-column CSV file to load - simply press on the choose file button below the clear Group 1 and Group 2 buttons. To reload the same file after clearing the text areas, you would need to reload this webpage.

At the bottom there is a graph that will contain histograms of the Group 1 samples and the Group 2 samples, and another graph that will contain the histogram of the differences between the both groups, once the button is pressed to perform the Wilcoxon Signed Rank Test.

Group 1 values:
Group 2 values:






Results pending...



Histograms of the two matched groups
Freq.
Values

Histogram of the group differences
Freq.
values

4 comments:

  1. Thank you for your calculator!

    ReplyDelete
  2. What if you want to compare the percentages of one sample like
    67.49
    51.49
    54.91
    59.02
    63.69
    66.56
    65
    61.76
    66.31
    59.46
    59.52
    60.39
    87.48
    70.85
    61.95
    60.64
    80.32
    65.44
    51.24
    49

    ReplyDelete
  3. Good luck to anyone reading this true life story of mine, I Was Diagnosed With type 2 Herpes Virus Last year, And I Was Looking For Solution To Be Cured Luckily I Saw Testimonies On How Dr OYAGU Cure Herpes Virus I Decided To Contact Dr OYAGU I Contacted Him He Prepared A Herbal Medicine Portion And Sent It To Me, I Started The Herbal Medicine For My Health. He Gave Me Step By Step Instructions On How To Apply It, When I Applied It As Instructed, I Was Cured Of This Deadly Herpes Within 2 weeks, I Am Now Herpes Negative. My Brother And Sister I No That There Are So Many People That Have The Same Herpes Virus Please contact Dr OYAGU To Help You Too, And Help Me To Thank Dr OYAGU For Cure Me, I’m Cured By Dr. OYAGU Herbal Medicine, His Contact Email:oyaguherbalhome@gmail.com or visit his website https://oyaguspellcaster.wixsite.com/oyaguherbalhome Or Cell Whatsapp Number +2348101755322 thank you

    ReplyDelete

Logistic Regression Calculator and ROC Curve Plotter

This blog post implements a Logistic Regression calculator for a binary output. Consider a binary outcome response variable \(Y\...