Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8554679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:56:16+00:00 2026-06-11T14:56:16+00:00

I am writing to ask your opinion on how to interpret this case. I

  • 0

I am writing to ask your opinion on how to interpret this case.
I have two vectors “a” and “b” that I am trying to compare.

The wilcoxon test is giving me a pvalue of 5.139217e-303 of a over b with the alternative “greater”. Now if I make a summary on each of them I have the following

> summary(a)
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0000000 0.0001411 0.0002381 0.0002671 0.0003623 0.0012910 
> summary(c)
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0000000 0.0000000 0.0000000 0.0004947 0.0002972 1.0000000

The mean ratio is then around 0.5399031 which naively goes in opposite direction of the wilcoxon test ( I was expecting to find a ratio >> 1)

Even after removing outlier using the outlier package, I still have the same thing.
Can someone help me explain why I do have this result and how to explain it ?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:56:17+00:00Added an answer on June 11, 2026 at 2:56 pm

    As you haven’t posted your data this is indeed a difficult question and posting your data (e.g., via dput() would make things a lot easier. Other than that we can only specify. See here for more on posing a nice question with a reproducible example.

    However, your data has some properties we can see from the summary that allows for an answer.

    Wilcoxon test does seem to be inappropriate for your data. Remember that Wilcoxon uses the rank of each observation. The rank is difficult to obtain as there are ties in the data. You seem to have a lot of ties (min and median for c are both 0). There are ways to deal with ties, but other methods are better.

    As you do seem to not want to use the t-test (reasonable given that the distributions appear to be really different, e.g. median(a) < mean (a) but median(c) > mean(c)) another approach would be to use a permutation test.

    My package afex (on CRAN, based on coin) contains the function compare.2.vectors comparing two vectors using (e.g.) t-test, Wilcoxon and most notably permutation test. If your n is small, you can even use a exact test distribution for the permutation test. Given two vectors a and c the result could be (trying to simulate your data):

    > require(afex)
    > a <- round(runif(100, 0, 0.00129), 5)
    > c <- c(rep(0, 60), runif(37, 0, 0.00297), rep(1, 3))
    > summary(a)
         Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
    0.0000100 0.0002775 0.0006500 0.0006360 0.0009475 0.0012800 
    > summary(c)
       Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    0.00000 0.00000 0.00000 0.03054 0.00116 1.00000 
    
    > compare.2.vectors(a,c)
    $parametric
       test test.statistic test.value   test.df          p
    1     t              t  -1.745388 198.00000 0.08246866
    2 Welch              t  -1.745388  99.00094 0.08402002
    
    $nonparametric
                 test test.statistic  test.value test.df            p
    1 stats::Wilcoxon              W 6772.000000      NA 1.143036e-05
    2     permutation              Z   -1.736482      NA 1.929300e-01
    3  coin::Wilcoxon              Z    4.389418      NA 0.000000e+00
    4          median              Z   -4.514156      NA 0.000000e+00
    

    You see the same pattern, positive test statistics for Wilcoxon, but negative for all other tests. So better not use the Wilcoxon, but one of the other tests, all agreeing.

    PS: I am happy for comments on the function. Any more tests that would make sense?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel embarrassed that I have to come and ask for help with this,
I'm writing a MIPS assembly code that will ask the user for the file
Writing a test app to emulate PIO lines, I have a very simple Python/Tk
I ask for your help in solving something that is simply said and most
I ask for your patience about the lack of code snippets in this question
I'm writing a WP7 application and I have code to ask the user for
I have question to ask. I have a dll file written for reading&writing data
After googling a lot, I only have this space to ask you the next
This is a new questions, that I figured deserved a new thread. I have
I'm writing to ask you a question about NSSpeechSynthesizer. Really it works perfect for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.