At present, people of different ethnicities have a disproportionate share of wealth, and thus fewer resources that they can spend on training and support. Support begins early: parents help their children find the right activity to undertake and also teach them the mentality to work hard at it in order to compete -- this is almost impossible to accomplish if those parents have to be away most of the time because of financial constraints.
As for gender, we have only recently entered an era where we recognize that girls are equally capable of doing things like math at a top level (the first Fields Medal given to a woman was given to them quite recently). In girls' formative years, parents still have some subconscious expectations of what their children are capable of -- perhaps being reluctant to expose girls to the sciences or other serious undertakings. There are some recent efforts to get girls into these things, but the fact that they are newsworthy proves that it's not the norm yet. The time that there will be equal female representation in these areas will be when an entire generation understands that women and girls are equally capable of getting into them. This will be after everyone who comes from the previous era of society have died.