Tuesday, 3 September 2013

Wilcoxon Signed Rank Test

The Wilcoxon Signed Rank test is a non-parametric test for paired/matched samples, and can be regarded as the non-parametric counterpart to the Paired Student's  t-test.  A worked example follows.

Suppose we have two groups of matched samples:

Group 1: 1,2,4,5,6,7,8,3

Group 2: 2,5,1,3,9,10,3,3

We first find the difference between these matched samples (Group 1 sample - Group 2 sample)

Group 1     Group 2      Difference
1                  2                     -1    
2                  5                     -3
4                  1                    +3
5                  3                    +2
6                  9                     -3
7                10                     -3
8                  3                      5
3                  3                      0

We discard the case where there is 0 difference (the last pair), so that the sample size $N_r$ is $7$. Then, we sort the difference by absolute value and rank them, and highlight where there are ties (i.e. the same absolute values of the difference).

Rank      Difference
  1               -1
  2              +2
  3               -3
  4               -3
  5               -3
  6              +3
  7              +5

The ranks for the ties are averaged out, resulting in

Rank      Difference
  1               -1
  2              +2
  4.5            -3
  4.5            -3
  4.5            -3
  4.5           +3
  7              +5

Next we sum the ranks for the negative difference (which is $14.5$), and the sum of the positive difference can be found by subtracting 14.5 from the total rank ($7\times 8 \times 0.5=28$), which is $13.5$.

The value of $W$ (the Wilcoxon Signed-Rank statistic) is the lower of the (positive/negative) sum of the ranks, hence $13.5$.

We need to find the critical value of $W$, $Wcrit$, as there are only 7 samples, so that a z-score will be highly inaccurate. We do this by referring to a table for a two-tailed test at 5% level, and obtain $Wcrit=2$. As $W$ is greater than $Wcrit$, the result is not significant.

Even though the z-score will be inaccurate (on SciStatCalc, if the number of samples exceeds 25, the z-score is considered accurate enough, and the $Wcrit$ value is no longer used, to limit the size of the table storing $Wcrit$), it is nevertheless worth evaluating this as an exercise. The z-score is given by equation
$\Large \frac{W-\mu}{\sigma}$

where $\mu$ is the mean and $\sigma$ is the standard deviation.

The $\mu$ value is $\frac{Nr\times (N_r+1)}{4}$, and so will be $7\times 8\times 0.25 = 14$ for our example.

The $\sigma$ is given by $\sqrt{\frac{N_r(N_r+1)(2N_r+1)}{24}}$, and will be $\sqrt{7\times 8 \times 15 \times (1/24)}=5.9169$.

The z-score is thus $(13.5 - 14)/5.9169=-0.084515$, resulting in a p-value of 0.93, which is considerably larger than  the critical 0.05 value. The result is not significant by quite some margin.

Below is a screenshot of SciStatCalc with the results of the Wilcoxon signed rank test.

Wilcoxon Signed Rank test ios iphone app SciStatCalc


  

10 comments:

  1. Hello Everyone out there,I am here to give my testimony about a Herbalist doctor who helped me . I was infected with HERPES SIMPLEX VIRUS in 2011, i went to many hospitals for cure but there was no solution, so I was thinking how can I get a solution out so that my body can be okay. One day I was in the river side thinking where I can go to get solution. so a lady walked to me telling me why am I so sad and i open up all to her telling her my problem, she told me that she can help me out, she introduce me to a doctor who uses herbal medication to cure HERPES SIMPLEX VIRUS and gave me his email, so i mail him. He told me all the things I need to do and also give me instructions to take, which I followed properly. Before I knew what is happening after two weeks the HERPES SIMPLEX VIRUS that was in my body got vanished . so if you are also heart broken and also need a help, you can also email him at {oliha.miraclemedicine@gmail.com}
    or whatsapp him number: +2349038382931. or website is https://olihamiraclemedicine.webs.com/
    Contact him today and you will have a testimony...Good luck!

    Dr. OLIHA Also Cures:
    1. HIV/AIDS
    2. HERPES 1/2
    3. CANCER
    4. ALS (Lou Gehrig’s disease)
    5. Hepatitis B
    6. chronic pancreatic
    7. Emphysema
    8. COPD (Chronic Obstructive Pulmonary Disease

    ReplyDelete
  2. DR OYAGU herbal medicine is a good remedy for herpes simplex virus cure. My name is MIGNON WRIGHT , am from USA,I am here to give my testimony about DR OYAGU who helped me in my life, i want to inform the public how i was cured from (HERPES SIMPLEX VIRUS) by DR OYAGU, i visited different hospital but they gave me list of drugs like Familiar, Zovirax, and Valtrex which is very expensive to treat the symptoms and never cured me. I was browsing through the Internet searching for remedy on HERPES and i saw comment of people talking about how DR OYAGU cured them, when i contacted him he gave me hope and send a Herbal medicine to me that i took and it seriously worked for me, am a free person now without any problem, my HERPES result came out negative, I pray to God to never let me and my family forget you in our life, am now cured permanently, you can also get your self cured my friends if you really need this doctor help, you can reach him on his website ;https://oyaguspellcaster.wixsite.com/oyaguherbalhome Email: oyaguherbalhome@gmail.com or via whatsapp +2348101755322

    ReplyDelete
  3. HELLO everyone! Still don’t know the right words to express my Gratitude to the Great DR.Imoudu After been diagnosed with the #herpes for the passed 1 years, i was given so many health prescription and advice with no improvement, I totally lost hope, until i found many testimonies of Great DR.Imoudu in an online research Like anybody would be, i advice anyone that is living with herpes can also contact him today, because he has the cure to any virus problem contact him on WhatsApp +2348109609753..
    Or his Email: DR.IMOUDUHEALERTEMPLE@GMAIL. COM
    1...ALS CURE/DIABETES CURE/EPILESY/HPV CURE/LOOSE WEIGHT AND BODY/EX-BACK/HEPATITIS/
    THANK YOU DR.Imoudu FOR YOU GOOD WORK IN MY LIFE..


    ReplyDelete
    Replies
    1. I was having Herpes Simplex Virus then i came across a review of people saying that they got treated from Herpes Simplex Virus by Dr VOODOO., So i gave a try by contacting him through his email and explain my problem to him. He send natural medicine herbs to me and told me all the things I need to do and also give me instructions to take the medicine, which I followed properly. Before I knew what is happening after two weeks the HERPES SIMPLEX VIRUS that was in my body got vanished . so if you are also heart broken by any deadly diseases like HERPES HIV, shingles,low sperm count or bringing back your ex lover, this great man is extremely the best in which I have seen if you also need a help, you can also email him at voodoospelltemple66@gmail.com Add Dr voodoo on whatsApp +2348140120719

      Delete
  4. Am really happy that i have been cured from HSV1&2 DISEASE with the herbal medicine of Dr otaigbe have been suffering from this disease for a long time now without solution until i came across the email of this doctor who have cure so many people with his herbal medicine, i also choose to give him a chance to help me, he told me what to do and i kindly did it, and he gave me his herbal medicine and direct me on how to use it, i also follow his instructions for use and he ask me to go for a check up after 3 months which i did, to my greatest surprise my result came out as negative, i am really happy that there is someone like this doctor who is ready to help anytime any day. To all the readers and viewers that is doubting this testimony stop doubting it and contact this doctor if you have any disease and see if he will not actually help you. I know that there are some people out there who are really suffering and hurting their family just because of these diseases. you can get to him through email:DROTAIGBESPELLHOME@GMAIL. COM or WhatsApp him +2349066103332 .

    ReplyDelete
  5. All thanks to Dr Raymond for helping me to get my penis longer and bigger with his cream in just two week his cream is very active and also it work fast for everyone who have used it, the best thing about his herbal cream is that it does not have side effects and the results is permanent. Note he can also cure the below sicknesses and disease PREMATURE EJACULATIONLOW SPERM COUNTERECTILE DYSFUNCTIONHIV/AIDS CUREHERPES CUREINFECTION CUREPILESTROKEHEART FAILUREYou can email him if you need his help via: drraymondherbalcenter@gmail.com or WhatsApp him via: +2348116744524

    ReplyDelete
  6. I'm here to testify about what DR. OYAGU did for me. I have been suffering from (GENITAL HERPES VIRUS) disease for the past 2 years and had constant pain and inching, especially in my private part. During the first year, I had faith in God that i would be cured someday. This disease started circulating all over my body and I have been taking treatment from my doctor, few weeks ago I came across a testimony of Shayla Bosschart on the internet testifying about a Man called DR. OYAGU on how he cured her from 7 years HSV 2. And she also gave the email address of this man, advise anybody to contact him for help on any kind of diseases that he would be of help, so I emailed him telling him about my (HSV 2) he told me not to worry that I was going to be cured!! Well, I never doubted him I have faith he can cure me too,, DR. OYAGU prepared and sent me Healing Soap, roots and herbs which I took. In the first one week, I started experiencing changes all over me, after two weeks of using his Roots/ Herbs, Oil and Soap, I was totally cured. no more inching , pain on me anymore as DR. OYAGU assured me. After some time I went to my doctor to do another test behold the result came out negative. So friends my advise is if you have such disease or know anyone who suffers from it or any other disease like HPV, HBV, HIV, ALS, HBP, CANCER etc. you can contact DR. OYAGU for help via email} oyaguherbalhome@gmail.com visit his website https://oyaguspellcaster.wixsite.com/oyaguherbalhome whatsapp him through his mobile} +2348101755322. , Thanks once again DR. OYAGU for making me a happy woman again.

    ReplyDelete
  7. Am Here To Give My Testimony About A Doctor Who Helped Me In My Life. I Was Infected With HERPES SIMPLEX VIRUS In 2019, I Went To Many Hospitals For Cure But There Was No Solution, So I Was Thinking How Can I Get A Solution Out So That My Body Can Be Okay. One Day I Was In The River Side Thinking Where I Can Go To Get Solution. So A Lady Walked To Me Telling Me Why Am I So Sad And I Open Up All To Her Telling Her My Problem, She Told Me That She Can Help Me Out, She Introduce Me To A Doctor Who Uses Herbal Medication To Cure HERPES SIMPLEX VIRUS And Gave Me His Email, So I Mail Him. He Told Me All The Things I Need To Do And Also Give Me Instructions To Take, Which I Followed Properly. Before I Knew What Is Happening After Two Weeks The HERPES SIMPLEX VIRUS That Was In My Body Got Vanished . So If You Are Also Heart Broken And Also Need A Help, You Can Also contact Him Through Dr. Oyagu reach him oyaguherbalhome@gmail.com visit his website https://oyaguspellcaster.wixsite.com/oyaguherbalhome Or whatsapp him via +2348101755322

    ReplyDelete
  8. DR OYAGU herbal medicine is a good remedy for herpes simplex virus cure. My name is MIGNON WRIGHT , am from USA,I am here to give my testimony about DR OYAGU who helped me in my life, i want to inform the public how i was cured from (HERPES SIMPLEX VIRUS) by DR OYAGU, i visited different hospital but they gave me list of drugs like Familiar, Zovirax, and Valtrex which is very expensive to treat the symptoms and never cured me. I was browsing through the Internet searching for remedy on HERPES and i saw comment of people talking about how DR OYAGU cured them, when i contacted him he gave me hope and send a Herbal medicine to me that i took and it seriously worked for me, am a free person now without any problem, my HERPES result came out negative, I pray to God to never let me and my family forget you in our life, am now cured permanently, you can also get your self cured my friends if you really need this doctor help, you can reach him on his website ;https://oyaguspellcaster.wixsite.com/oyaguherbalhome Email: oyaguherbalhome@gmail.com or via whatsapp +2348101755322

    ReplyDelete
  9. TESTIMONY ON HOW I GOT CURED TOTALLY FROM HERPES VIRUS BY DR ISHIAKU HERBS

    I want to inform the public how I was cured of herpes  Virus by a Doctor called Dr ISHIAKU. I visited different hospitals but they gave me a list of drugs like Famvir, Zovirax, and Valtrex which are very expensive to treat the symptoms and never cured me. I was browsing through the Internet searching for remedies on Herpes and I saw comments of people talking about how Doctor ishiaku cured them. I Was scared because I never believed in the Internet but I was convinced to give him a try because I had no hope of being cured of herpes so I decided to contact him on his email, i searched his email on the net and I saw a lot of people testifying about his goodness. When I contacted him he gave me hope and sent a Herbal medicine to me that I took and it seriously worked for me, am a free person now without any problems, my HERPES result came out negative. You can contact him on his email: (ishiakuherbalcure@yahoo.com)or what - sapp him via (+2348180828544) and get all your problems solved.

    1)Sickness of any kind
    2)Help to cure  HEPATITIS B, DIABETICS, HIV
    3)Marriage problem, To Re-unit or to cast a spell
    4)Pregnancy problem
    5)Financial problem and Job promotion
    6)bad mouth odour or tooth problem
    7)eye or ear problem
    8) enlargement of manhood

    Website: www.ishiakuherbalcure.Wordpress.com

    ReplyDelete