I want to run a statistical analysis on the gender pay gap data published by EU (https://ec.europa.eu/eurostat/databrowser/product/page/SDG_05_20) at a specific year, this data have the following form: for each country they provide the difference between the average gross hourly earnings of male paid employees and of female paid employees as a percentage of average gross hourly earnings of male paid employees. I am looking whether there exist a correlation between someone's gender and its earnings. I could not find which statistical test I should use to do that.

Secondary question: I then need to use more data to check whether the gander pay gap is correlated to other discrete variables, such as whether the employee works in the pubic or private sector (https://ec.europa.eu/eurostat/databrowser/product/page/EARN_GR_GPGR2CT). The data are split in groups, again giving the same information per country. think that I should use ANOVA, my problem is that earnings' information is given as a percentage difference. Should I use ANOVA, Kruskal-Wallis, or something different? (I am going to run both tests to see whether there exist a significant different on their results).

My problem-concern for both questions are the form of the earnings' data, I have never dealt with such data before. Please note that I am not supposed to use any additional data.

  • $\begingroup$ Have you looked at the actual data? What is the point of testing the null hypothesis "no correlation between gender and earnings" when there isn't a single country without a gender pay gap? $\endgroup$
    – dipetkov
    Jun 24 at 16:47
  • $\begingroup$ On top of that, with or without additional covariates, this data cannot tell you whether women get equal pay for equal work because the data is confounded with another source of gender inequality: that women might not have the same career opportunities as men conditional on having the same education and experience. $\endgroup$
    – dipetkov
    Jun 24 at 16:53

1 Answer 1


I think for the first problem you should use a t-test comparing the mean to $0$.

For the second problem, I suggest using a Friedman test, useful for when there are repeated measures or a randomized block design. The code is friedman.test(y ~ A|B, data) where y is the numeric outcome variable (difference between male and female earnings as a proportion of male earnings), A is the group (private or public ownership), and B is the blocking variable that species matched observations (the country it came from).

  • $\begingroup$ Shouldn't the friedman test be used when each group contains the same subjects? The groups in the example case are the type of ownership, each employee in only in one of the groups. $\endgroup$
    – Coconut9
    Jun 24 at 16:57
  • $\begingroup$ @Coconut9 I thought the data was by country after downloading it with one “sheet” for public sector and another for private. Or did I not find the employee data $\endgroup$
    – Jellyfish
    Jun 24 at 18:39
  • $\begingroup$ Yes, they are split in two. My groups are the public and the private sector. Each employee from each country however only appears in one of the two groups. Is the Friedman test the correct choice here? $\endgroup$
    – Coconut9
    Jun 24 at 18:46
  • $\begingroup$ @Coconut9 That is quite an interesting epistemological question, I see what you're saying. My reasoning was that since the countries are the observations, and they appear in both groups, then the Friedman test is applicable. I guess because the countries are the blocks, it's ok, because this accounts for the fact that employees in the country may be more similar to one another $\endgroup$
    – Jellyfish
    Jun 24 at 18:54
  • $\begingroup$ You got a reasonable point there. In any case, I will stick with One-Way ANOVA because some of the data are incomplete and do not provide values for each group in all countries. $\endgroup$
    – Coconut9
    Jun 24 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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