# Can we treat gender as ordinal variable?

I know this question is stupid, but it is really make me confused. If we have the gender variable, and then encode it as 0 (female) and 1 (male). Most people would say we should treat gender as nominal data, since male and female are not quantitative values.

However, what if we consider the number of Y chromosome? In general, male has one Y chromosome, and female has zero Y chromosome. The number of Y chromosome is the ordinal variable. Then, we can get the data like this,

observation   gender      #Y chromosome
1           male (1)        1
2           female(0)       0
3           female (0)      0
4           male (1)        1


In that case, is it okay that we treat gender (0,1) as ordinal variable?

• What difference would it make? It is still a dichotomous variable. – Kuku Nov 2 '20 at 11:46
• There is a question you don't ask of whether gender is a binary variable. But given that your data arrive as binary, what is then important is that binary variables are special in at least two senses. I'd say that (e.g.) rank correlations show that binary variables are ordinal in an extended sense: that is, the rank correlation between gender and some other variable is well defined apart from a convention about sign of correlation. Binary variables are only one step away from measurement insofar as taking the mean of a binary variable coded as 0 and 1 gets you a probability. – Nick Cox Nov 2 '20 at 11:46
• But why you want to know is a fair comment in return. Binary variables are fine in regression-type models as responses or as predictors. The only other reason I can think for exploring this is a desire for some nonparametric test. – Nick Cox Nov 2 '20 at 11:48
• You could also treat it as interval if you really want to use that system since there is only one interval and so every interval is equal to every other interval. But really you would be better to focus on what the variable actually is as @Kuku points out. – mdewey Nov 2 '20 at 11:48
• The argument that gender is really counting chromosomes is tendentious, not least because you then get into a tangle over not having data on everyone's chromosomes, which can be more variable than XX or XY. . – Nick Cox Nov 2 '20 at 11:49