# Statistical test on percentage difference of a continuous variable and a binary varable

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.

• 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? Jun 24 at 16:47
• 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. Jun 24 at 16:53

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).