Variance decomposition using ANOVA

Say you have a random variable $X$ (e.g., kilometers driven). Getting its variance is straightforward. But what if you want to say, $A$ percent of the variance in $X$ is due to $\text{Var}(X)$ for female drivers and $B$ percent is the rest, that is, $\text{Var}(X)$ for male drivers? $A + B$ should be 100 percent.

Is this possible? Are there assumptions to be made to simplify things? Independence of female and male drivers?

[Question was also asked here http://mathoverflow.net/questions/88185/variance-decomposition-anova but I realized it's best to do it at Stats instead.]

-
I would suggest you remove the duplicate on MathOverflow. –  chl Feb 12 '12 at 8:58

This is pretty much what analysis of variance (ANOVA) does. Except that there is an additional source of variance in the response variable which is variation between individuals that is not explained by sex.

A model is fit of the form:

$y_i=\beta_0+\beta_1x_i+\epsilon_i$

where $x_i$ is 1 if the individual is male, 0 otherwise; and $\epsilon_i$ has a normal distribution. It is then possible to divide the variance into an element explained by the difference between sexes (the structural part of the model above) and an element explained by the difference between individuals (the $\epsilon_i$ part).

It's not possible to say what variance is explained by men and what by women - only a total amount explained by the difference between the two.

-
Did you want to add that not all of the variance will be explained by gender, e.g. some could be due to age, or quality of public transport. :) –  Michelle Feb 11 '12 at 10:35
Yes, good point, that was meant to be included in "variation between individuals that is not explained by sex", which should be broad enough... The point is a good one, that the remaining variance can still be thought of as having a truly random individual part, and a structural part that has just been missed from the under-specified model. –  Peter Ellis Feb 11 '12 at 10:42