Two-sample location test when data is heavily skewed towards zero? I want to test if the mean between two independent samples is different. Both samples are large, about 2 million observations each, however almost all of the observations are zero. In particular in each sample, only around 10,000 observations are non-zero.
This data captures the amount of money spent over a given time period amongst two groups of customers, a value of zero means that the customer did not make any purchases.
Running a Student's t-test or Mann-Whitney U test does not show any statistically significant difference between the means. I was considering dropping all of the non-zero observations, and re-running the tests, but I'm not sure how to interpret the results.
Any insight would be appreciated.
 A: You might try a Heckman two-step model. If you don't have an exclusion restriction--a variable that changes whether a customer buys or not, but does not affect how much he spends directly--the identification will be fragile and you can get wacky results. But in some marketing examples, a two-step approach can make sense, though it's hard to tell without knowing what your two groups are. 
Take a look at the examples, formulas and references sections of the Stata manuals. You don't have to use Stata to estimate, but these manuals are pretty nice for explaining the idea. 
If your expenditure data has a long right tail, you can estimate this model in logs using $\ln(min\{y\}) -\varepsilon$ in place of $\ln(0)$. Play around with what $\varepsilon$ is to make sure your results are not very sensitive.
Another approach would be to use the two-part model (tpm) command in Stata, which avoids the twin difficulties of exclusion restrictions and logarithmic transformations. It's the continuous outcome counterpart of the hurdle models for count data (like number of purchases rather than revenue). I am not aware of a non-Stata implementation.
A: The Wilcoxon-Mann-Whitney 2-sample test may still work for this problem if you handle the excessive ties correctly when computing the $P$-value.  Or use the fact that the Wilcoxon test is a special case of the proportional odds ordinal logistic model, and that model's likelihood ratio $\chi^2$ test accounts for excessive ties automatically.  For a total sample size of 2,000,000, if the number of unique non-zero values exceeds around 100 the model will take a lot of computer time to run, so you might consider rounding the non-zero values a bit to have fewer intercepts in the model.  The R rms package's orm function will efficiently handle thousands of unique $Y$ values if the sample size were not so large.  For your case it will probably work OK with a hundred or so unique $Y$ values.
