# Test the difference of one side tails from two ditributions?

wilcox.test tests the median difference between two distributions.

ks.test tests for any difference between two distributions.

How to test (better having an implementation in R) for the difference in the one-side tail (e.g., right tail) between two distributions (e.g., one distribution has a longer right tail distribution than the other, any difference in the middle or the left tail does not matter)?

• This paper outlines a way to test percentiles: ncbi.nlm.nih.gov/pmc/articles/PMC4811631 Hypothesis Testing of Population Percentiles via the Wald Test with Bootstrap Variance Estimates Mar 6, 2022 at 19:32
• wilcox.test does not test the median difference, see tandfonline.com/doi/full/10.1080/00031305.2017.1305291 Mar 6, 2022 at 21:09
• I think a basic sign test would also do it, see e.g. rdrr.io/cran/snpar/man/quant.test.html Mar 6, 2022 at 21:28
• @ChristianHennig But under certain cases, wilcox.test still can be considered as a median test? The bottom line of the paper seems to be that wilcox.test and median test are not same under some cases. But it is not under all cases they are always different. Do I understand the paper that you pointed correctly? Mar 6, 2022 at 22:20
• @user1424739 What is called "the median test" is something else than Wilcoxon and always different, see en.wikipedia.org/wiki/Median_test What is true is that under the Wilcoxon H0 the two distributions (and therefore their medians) are the same, and that many pairs of distributions for which equality would be rejected with large probability by Wilcoxon have different medians. Mar 7, 2022 at 14:50