Kruskal-Wallis: 1-tailed or 2-tailed?


I have a general question regarding the output data from Kruskal-Wallis pairwise comparison tests on microbiome data. Is this stats test, and the associated p-values generated, 1-tailed or 2-tailed? I have one reviewer who is curious.

Thanks, in advance!

Hello Hasti_A,

Could you tell us the command you used? I can look up how the test is run based on that.


Hi Colin,

Sure! I'm focusing on just Shannon group significance, but this is the overall command I used:

> for metric in observed_features shannon pielou_e faith_pd
  qiime diversity alpha-group-significance \
    --i-alpha-diversity ${metric}_vector.qza \
    --m-metadata-file ../metadata_for_comb_abdomens.tsv \
    --o-visualization ${metric}_group_significance.qzv


Here's the Qiime2 plugin code for making that visualizer:

And here are the docs for the kruskalwallis function:

The p-value for the test using the assumption that H has a chi square distribution. The p-value returned is the survival function of the chi square distribution evaluated at H.

As discussed in this GitHub issue, it's one-sided.


    kw_H_pairwise['q-value'] = multipletests(
        kw_H_pairwise['p-value'], method='fdr_bh')[1]

This means when you have multiple tests, the false discovery rate is controlled with the Benjamini & Hochberg (1995) method!

Hopefully this helps answer the ref's questions and gets the paper published!


Fantastic! This is SO helpful, thank you so much. Appreciate your help.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.