Two samples with median of 0, mood's test give p-value of very close to 0. How to interpret this? First of all I would like to say I'm unfamiliar with the Mood's test so pardon me if the question is too basic.
I'm trying to compare the difference of median between two groups of data. I did some prelim test first and see that both groups have the same median of 0. These two group have different sample sizes (60k vs 30k observation)
However, my Mood's test in R gives me a p-value of nearly 0 (2.53e-08 to be specific), which I assume mean my two medians are different. So how does this happen when both of my sample's medians are 0 ? 
I have a lot of samples that I want to compare medians together so should I just ignore samples where I found the median to be 0? Thank you.
 A: Here is an example that may be sufficiently similar to yours
for a helpful explanation. My two groups have the same sample
sizes, which are much smaller than the sample sizes in your
problem. But the fundamental idea should be clear. Different distributions can produce samples that
have the same median.
Two groups x1 and x2 each have 50 observations (consisting of integers from 1 through 5), tabled in R
as follows:
table(x1);  table(x2)
x1
 1  2  3  4  5 
 3 15 23  4  5

table(x2) 
x2
 1  2  3  4  5 
 5  1 36  5  3 

It is easy to see that the two samples each have median 3,
as verified in R below.
median(x1); median(x2)
[1] 3
[1] 3

To do Mood's median test on two samples you can make a two-by-two
table of these data. The first row is for the first sample
and the second row is for the second sample. The first entry
in each row is the number of outcomes at or above the median.
Put the samples in to a table, as appropriate for input for the
relevant chisq.test in R, and run the test:
TAB = rbind(c(18, 32), c(7, 46))
TAB
     [,1] [,2]
[1,]   18   32
[2,]    7   46

chisq.test(TAB, cor=F)

        Pearson's Chi-squared test

data:  TAB
X-squared = 7.2716, df = 1, p-value = 0.007005

While both samples of size 50 have median 3, notice that
the first sample has 18 of its 50 observations below 3, while
the second sample only has 7 of its observations below 3.
Thus the two samples are from significantly different populations.
Making a barplot of each sample may help to illustrate that Sample 1 has proportionately more large values than does Sample 2.
par(mfrow=c(1,2))
 barplot(c(3,15,23,4,5), xlab="Sample 1", names.arg=1:5)
 barplot(c(5,1,36,5,3), xlab="Sample 2", names.arg=1:5)
par(mfrow=c(1,2))


Note: The following R code was used to get the two samples.
The p vectors show the relative proportions of numbers 1 through 5 should be randomly sampled for each.
set.seed(1234)
x1 = sample(1:5, 50, rep=T, p = c(1,2,4,1,1))
x2 = sample(1:5, 50, rep=T, p = c(1,1,5,1,1))

A: Mood's median test gets funky in some cases and shouldn't be used in those situations.  It sounds like you have two samples with the same median which is  also equal to the pooled median.  The first thing to say is that it would be ridiculous to say that two samples have statistically different medians when they have numerically the same median.   That's a statistical test you just don't need to perform. Another way to look at it, since you have so many values equal to the median, your data isn't truly continuous, and the test isn't really appropriate.  Mood's median test does an interesting thing where it counts values equal to and greater than the pooled mean (I think, usually) in the same group.  But why not equal to and less than?  Because with truly continuous data, the choice is arbitrary.  But with your data it may matter.  Try multiplying your data by -1 and see if that affects results...
So, what to do?  I think if you care about the medians, you have your answer.  Both samples have the same median, so you don't need to test anything.  If you are curious about other properties of the samples, you may want to look at other quantiles (e.g. the 75th percentile, by quantile regression or permutation test).  Or maybe the stochastic differences in the samples by Wilconon-Mann-Whitney.
