http://journals.sagepub.com/doi/abs/10.1177/0956797617741719
> The underrepresentation of girls and women in science, technology, engineering, and mathematics (STEM) fields is a continual concern for social scientists and policymakers. Using an international database on adolescent achievement in science, mathematics, and reading (N = 472,242), we showed that girls performed similarly to or better than boys in science in two of every three countries, and in nearly all countries, more girls appeared capable of college-level STEM study than had enrolled. Paradoxically, the sex differences in the magnitude of relative academic strengths and pursuit of STEM degrees rose with increases in national gender equality. The gap between boys’ science achievement and girls’ reading achievement relative to their mean academic performance was near universal. These sex differences in academic strengths and attitudes toward science correlated with the STEM graduation gap. A mediation analysis suggested that life-quality pressures in less gender-equal countries promote girls’ and women’s engagement with STEM subjects.
Their definition of "gender equality" is this:
> The World Economic Forum publishes The Global Gender Gap Report annually. We used the 2015 data (World Economic Forum, 2015). For each nation, the Global Gender Gap Index (GGGI) assesses the degree to which girls and women fall behind boys and men on 14 key indicators (e.g., earnings, tertiary enrollment ratio, life expectancy, seats in parliament) on a 0.0 to 1.0 scale, with 1.0 representing complete parity (or men falling behind). For the countries participating in the 2015 PISA, GGGI scores ranged from 0.593 for the United Arab Emirates to 0.881 for Iceland.
(One of the things I'd be curious about is whether that's just a proxy for Western cultural norms; the more commonly cited reasons for a gender gap in STEM fields in the US are things like harassment and misogyny, and it's certainly possible that those are correlated more strongly with Western culture than with cross-cultural structural inequality.)