For example, let's take blacks in the US. The data tells you that a black person is more likely to be a criminal than a white person. There are two possible reasons for this: (1) blacks are more prone to crime, or (2) blacks are more likely to live in circumstances that make them criminals. With access to only anecdotal data, I strongly believe that (2) is true, and that if you took into account enough circumstances (e.g. single parent, school district, income level, parents' wealth) you'd be able to remove race from your model and still arrive to the "equal opportunity" result. That way, you wouldn't discriminate based on race, but you would still help the people most needy of help (poor, uneducated, etc.). I think the same applies to colege applications and sex wage gap, which is why I strongly oppose any kind of affirmative action.
Life expentancy sex gap might be a different case. IIRC, men die earlier because of some behavioural/social tendencies (working dangerous jobs, supressing emotions, risky behaviour (speeding, smoking)), so maybe there are some non-discriminatory (or at least less-discriminatory) ways of determining life expectancy (e.g. testosterone level, job description, ...). However, there are also biological differences that seem very strongly linked to the quality of being male (i.e. the Y chromosome). E.g. prostate cancer is less lethal than breast cancer, and women are more likely to get MS than men. These particular examples suggest that men should live longer, but I'm guessing there might be other gender-specific ilnesses that might reduce their (our) expected lifespan. If that's the case, I don't think it's too discriminatory to have different insurance fees for different sexes.
In all such scenarios, however, there could still be broader societal goals that would override specific instances of (non-)discrimination. For exapmle, AFAIK women's health is more expensive (because of pregnancy), but having more children benefits everyone in the society (in the West), so it makes sense to "discriminate" against men by letting women pay less for their health insurance.