# Bootstrap p-values reduce type 1 error of the robust rank-order test of difference in medians

## Description

The robust rank-order test was designed to be appropriate when the samples being compared have unequal variance. However, it tends to be excessively liberal when the samples are asymmetric because the test statistic is assumed to have a standard normal distribution for sample sizes > 12. This work proposes an on-the-fly method to estimate the distribution of the test statistic. The method of likelihood maximization is used to estimate the parameters of the parent distributions of the given sample-pair. Subsequently, the null distribution of the test statistic is obtained by the Monte-Carlo method. Simulations are performed to compare this method with that of standard normal approximation of the test statistic. For small sample sizes (<= 20), the Monte-Carlo method performs better, especially for low values of significance levels (< 5%). Additionally, when the smaller sample has the larger standard deviation, the Monte-Carlo method performs better even for large sample sizes (= 40/60). The two methods do not differ in power. Finally, a Monte-Carlo sample size of 10^4 is found to be sufficient to obtain the aforementioned improvements. The results of this study pave the way for development of a toolbox to perform the robust rank-order test in a distribution-free manner.

## Files

## Steps to reproduce

Running matlab files main.m, main2.m, main3a.m, main3b.m and main4.m produces figures provided in the figures folder. Matlab Parallel Processing toolbox and Global Optimization toolbox are required to run these codes. These codes were written in MATLAB R2020a. The simulation results are provided in the .mat files so one may load them and run only the figure generation portions of the .MAT files to generate the figures directly without running the simulations.