# Comparing the Wilcoxon-Mann-Whitney to alternative statistical tests

#### 2025-06-04

In this document, we show that the Wilcoxon-Mann-Whitney test is comparable or superior to alternative methods.

Two alternative methods could be compared with the Wilcoxon-Mann-Whitney (WMW) test proposed by BioQC: the Kolmogorov-Smirnov (KS) test, and the Student’s t-test, or more particularly, the Welch’s test which does not assume equal sample number or equal variance, which is appropriate in the setting of gene expression studies.

1. It is documented in statistics literature that the WMW test offers a higher power than the Kolmogorov-Smirnov test1,2.
2. Compared with parameterized test methods such as the t-test, the WMW test is (a) resistance to monotone transformation, (b) suffers less from outliers, and (c) provides higher efficiency when many genes are profiled and the distribution of gene expression deviates from the normal distribution, which are important criteria in genome-wide expression data.

Based on these considerations, BioQC implements a computationally efficient version of the WMW test. In order not to confuse end-users, no alternative methods are implemented.

Nevertheless, in order to demonstrate the power of WMW test in comparison with the KS-test or the t-test, we performed the sensitivity benchmark described in the simulation studies, for the two alternative tests respectively.

Figure 1: Sensitivity benchmark. Expression levels of genes in the ovary signature are dedicately sampled randomly from normal distributions with different mean values. The lines show the enrichment score for the Wilcoxon-Mann-Whitney test, the t-test and the Kolmogorov-Smirnov test respectively. In the right panel, outliers were added by adding a random value to 1% of the simulated genes.

As expected, the results suggest, that both the KS-test and the WMW-test are robust to noise, while the performance of the t-test drops significantly on noisy data. Additionally, the WMW-test appears to be superior to the KS-test for low expression differences.

## Computational Performance

Since the KS-test is so slow, we did not replicate the sensitivity benchmark from the simulation studies using the enrichment score rank. While it takes BioQC about 5 seconds on a single thread to test all 155 signatures, it already takes the KS-test about 4 seconds to test a single signature.

    ##       test replications elapsed relative
    ## 2  runKS()            5   21.58    1.000
    ## 1 runWMW()            5   23.56    1.092

## R Session Info

    sessionInfo()

    ## R version 4.5.0 (2025-04-11 ucrt)
    ## Platform: x86_64-w64-mingw32/x64
    ## Running under: Windows Server 2022 x64 (build 20348)
    ##
    ## Matrix products: default
    ##   LAPACK version 3.12.1
    ##
    ## locale:
    ## [1] LC_COLLATE=C
    ## [2] LC_CTYPE=English_United States.utf8
    ## [3] LC_MONETARY=English_United States.utf8
    ## [4] LC_NUMERIC=C
    ## [5] LC_TIME=English_United States.utf8
    ##
    ## time zone: America/New_York
    ## tzcode source: internal
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] ggplot2_3.5.2         plyr_1.8.9            reshape2_1.4.4
    ##  [4] hgu133plus2.db_3.13.0 rbenchmark_1.0.0      gplots_3.2.0
    ##  [7] gridExtra_2.3         latticeExtra_0.6-30   lattice_0.22-7
    ## [10] org.Hs.eg.db_3.21.0   AnnotationDbi_1.71.0  IRanges_2.43.0
    ## [13] S4Vectors_0.47.0      testthat_3.2.3        limma_3.65.1
    ## [16] RColorBrewer_1.1-3    BioQC_1.37.0          Biobase_2.69.0
    ## [19] BiocGenerics_0.55.0   generics_0.1.4        knitr_1.50
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] tidyselect_1.2.1    dplyr_1.1.4         farver_2.1.2
    ##  [4] blob_1.2.4          Biostrings_2.77.1   bitops_1.0-9
    ##  [7] fastmap_1.2.0       digest_0.6.37       lifecycle_1.0.4
    ## [10] statmod_1.5.0       KEGGREST_1.49.0     RSQLite_2.4.0
    ## [13] magrittr_2.0.3      compiler_4.5.0      rlang_1.1.6
    ## [16] sass_0.4.10         tools_4.5.0         yaml_2.3.10
    ## [19] labeling_0.4.3      interp_1.1-6        bit_4.6.0
    ## [22] pkgload_1.4.0       KernSmooth_2.23-26  withr_3.0.2
    ## [25] desc_1.4.3          grid_4.5.0          caTools_1.18.3
    ## [28] edgeR_4.7.2         scales_1.4.0        gtools_3.9.5
    ## [31] dichromat_2.0-0.1   cli_3.6.5           rmarkdown_2.29
    ## [34] crayon_1.5.3        httr_1.4.7          DBI_1.2.3
    ## [37] cachem_1.1.0        stringr_1.5.1       XVector_0.49.0
    ## [40] vctrs_0.6.5         jsonlite_2.0.0      bit64_4.6.0-1
    ## [43] jpeg_0.1-11         locfit_1.5-9.12     jquerylib_0.1.4
    ## [46] glue_1.8.0          stringi_1.8.7       gtable_0.3.6
    ## [49] GenomeInfoDb_1.45.4 deldir_2.0-4        UCSC.utils_1.5.0
    ## [52] tibble_3.2.1        pillar_1.10.2       htmltools_0.5.8.1
    ## [55] brio_1.1.5          R6_2.6.1            rprojroot_2.0.4
    ## [58] evaluate_1.0.3      png_0.1-8           memoise_2.0.1
    ## [61] bslib_0.9.0         Rcpp_1.0.14         xfun_0.52
    ## [64] pkgconfig_2.0.3

## References

1. Irizarry, Rafael A., et al. “Gene set enrichment analysis made simple.”Statistical methods in medical research 18.6 (2009): 565-575.↩︎

2. Filion, Guillaume J. “The signed Kolmogorov-Smirnov test: why it should not be used.” GigaScience 4.1 (2015): 1.↩︎