I want to test for statistical significance of the difference between two independent samples of normally distributed measurement. However instead of comparing means or overall distributions I want the test to focus on the right tail (say 75th percentile and above) of the distribution more than the "middle" part or the left tail.
Typical tests like Welch's t-test or Mann-Whitney U-test treat all distribution regions equally.
One possible solution that came to my mind was to filter both samples by removing measurements where the value is below the 75th percentile (applied independently to each of the two samples).
An answer to a somewhat similar question mentioned the Kolmogorov-Smirnov test (https://stats.stackexchange.com/a/568980/405082); however it is unclear how to apply it to the specific percentile (maybe using the filtering I described above?).
My question is: can I take a subsample by percentile of original samples in order to estimate statistical significance of the right tail difference?
I am using Python, if that matters.
As for rank-based test, can you provide some details? I am lost on how to apply something like Mann-Whitney U-test to a quantile.
– considerate_shrimp Jan 22 '24 at 09:11