A test might determine an athlete is not a woman for the sake of competition, but that certainly does not make her a man in her everyday life. Other indicators of sex are subject to similar variations. The so-called biological line between male and female is frankly quite fuzzy. So much for sex. But sex is not gender.
Sex is biological.
Gender is social, cultural, psychological and historical. It is used to describe people and their roles in society, the jobs they do and the way they dress, how they are meant to behave. A person's gender is usually assigned at birth, with a cursory look at the genitals. The 'boy' or 'girl' which is documented on the birth certificate affects almost everything else that happens to that child socially for the rest of his or her life. The third gender Responses to ambiguous genitals vary from culture to culture.