I am currently analysing data of a big webshop with over 31,000 vendors selling goods, i.e. each vendor is selling items over the webshop.

The cool thing is that we know the gender of these vendors (=individuals) and the categories of their products. Now, we want to see if there are categorical gender differences, i.e. we would like to test, if males sell more/less items than females of a certain category and if these differences are significant. Here is a graph of the data: https://i.stack.imgur.com/sitxf.png. The question I have now is which statistical test is appropriate for this kind of analysis?

So far I was using a chi-squared test to see if the distributions over all categories are significantly different between males and females. Now I would like to know: which statistical test is valid to use to show me for instance that the two distributions between males, females of the category "Apparel" is also significant?

  • 2
    $\begingroup$ What is the exact question you want to answer? Is it, (1) Do men or women, on average, sell more items (over all categories or within each category)? or (2) Do men or women, on average, sell a higher dollar total (over all categories or within each category)? Or do you have another question in mind? Also, you probably have unequal numbers of men and women vendors and that inequality probably varies by category. Unless you deal with these inequalities, your analysis might simply reflect that, rather than what you are really interested in. $\endgroup$
    – Joel W.
    Aug 9, 2012 at 16:59

2 Answers 2


I think you can compare them by individual categories using a t test or Wilcoxon rank sum whichever is more appropriate based on distributions. The tests wll take account of the differences in sample sizes. Most importantly though since you would be doing 20 or more test a p-value adjustment for multiplicity should be applied.

  • 1
    $\begingroup$ Dear Michael, many thanks for the quick answer. By p-value adjustment I assume you mean "bonferroni adjustment", right? Many thanks, Chris $\endgroup$
    – Chris
    Aug 9, 2012 at 17:29
  • $\begingroup$ @Chris I mean any of a series of procedures of which Bonferroni is just one that control either the familywise error or the false discovery rate. It includes the Sidak bound, Tukey's LSD test, the methods of Dunnett, Holm and others as well as bootstrap and permutation p-value adjustment as described by Westfall and Young. $\endgroup$ Aug 9, 2012 at 17:56
  • $\begingroup$ The multiple testing problem was already taken care of via the chi-squared test that the OP mentions (assuming that a chi-squared test refers to the simultaneous testing if differences between male and female across all categories are unequal to zero; also have a look at Fischer's exact test for an alternative). As I understood, now, the OP is looking within an individual category only, hence no multiple testing correction needs to be applied. A standard t-test on the difference is sufficient. The correction would have been needed as a replacement for the chi-squared test. $\endgroup$
    – PaulG
    Mar 9, 2022 at 16:48

Another approach could be logistic regression. Let $p_i$ be the probability that an iten of category $i$ is sold by a male, and $n_i$ be the total number of sales of category $i$. Then you can make a logistic regression model for $y_i$ the number of sales of products in category $i$ by males (and $n_i - y_i$ being the number of sales by females). You should probably remember the possibility of overdispersion. One advantahe of this approach is that you can first try a fixed effects model, where the probabilities $p_i$ are constant (which will probably be a bad fit). Then you can expand the model with random effects for the categories, possibly using other covariables, either covariables of the product categories or seller covariables.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.