Test for median difference Given samples of two distributions I am looking for a test for median difference (I.e. reject null in favor of evidence that medians are different.) I do not want to assume anything about both distributions. Is there any standard test for this situation?
I know Mood's median test, but I believe it assumes that the distributions are  shifted. $F_2(t) = F_1(t-a)$ for some $a \in \mathbb{R}$. I back this claim with these sources:
Buthmann, A. (2017). "Understanding the Uses for Mood’s Median Test". I Six Sigma blog post.
Taylor, A. D. (2012). "Mood’s Median Test". Handout (PDF link via Wayback Machine). 2 pages.
Glen, S. (2016). "Mood’s Median Test: Definition, Run the Test and Interpret Results". Statistics How To: Elementary statistics for the rest of us blog post.
 A: You could consider a permutation test.
median.test <- function(x,y, NREPS=1e4) {
  z <- c(x,y)
  i <- rep.int(0:1, c(length(x), length(y)))
  v <- diff(tapply(z,i,median))
  v.rep <- replicate(NREPS, {
    diff(tapply(z,sample(i),median))
  })
  v.rep <- c(v, v.rep)
  pmin(mean(v < v.rep), mean(v>v.rep))*2
}

set.seed(123)
n1 <- 100
n2 <- 200
## the two samples
x <- rnorm(n1, mean=1)
y <- rexp(n2, rate=1)
median.test(x,y)


Gives a 2 sided p-value of 0.1112 which is a testament to how inefficient a median test can be when we don't appeal to any distributional tendency.
If we used MLE, the 95% CI for the median for the normal can just be taken from the mean since the mean is the median in a normal distribution, so that's 1.00 to 1.18. The 95% CI for the median for the exponential can be framed as $\log(2)/\bar{X}$, which by the delta method is 0.63 to 0.80. Therefore the Wald test is statistically significant at the 0.05 level but the median test is not.
A: Assuming your outcome is ordinal or interval-valued, you can use the nonparametric median test with k=2. Here's a description from Stata's implementation of it:

The median test examines whether it is likely that two or more samples
  came from populations with the same median. The null hypothesis is
  that the samples were drawn from populations with the same median. The
  alternative hypothesis is that at least one sample was drawn from a
  population with a different median. The test should be used only with
  ordinal or interval data. Assume that there are score values for k
  independent samples to be compared. The median test is performed by
  first computing the median score for all observations combined,
  regardless of the sample group. Each score is compared with this
  computed grand median and is classified as being above the grand
  median, below the grand median, or equal to the grand median.
  Observations with scores equal to the grand median can be dropped,
  added to the “above” group, added to the “below” group, or split
  between the two groups. Once all observations are classified, the data
  are cast into a 2xk contingency table, and a Pearson’s chi-squared
  test or Fisher’s exact test is performed.

