If voters are biased against female candidates, only the most talented, hardest working female candidates will succeed in the electoral process. Furthermore, if women perceive there to be sex discrimination in the electoral process, or if they underestimate their qualifications for office, then only the most qualified, politically ambitious females will emerge as candidates. We argue that when either or both forms of sex-based selection are present, the women who are elected to office will perform better, on average, than their male counterparts. We test this central implication of our theory by studying the relative success of men and women in delivering federal spending to their districts and in sponsoring legislation. Analyzing changes within districts over time, we find that congresswomen secure roughly 9% more spending from federal discretionary programs than congressmen. Women also sponsor and cosponsor significantly more bills than their male colleagues.