# Can binary data be ordinal?

Binary data is often mentioned as a nominal sub-category, especially in such examples as female/male, smoker/non-smoker, etc. However, binary data with such values as pass/fail, correct/incorrect, absent/present, etc, seems to give some weight to its values. It's not like in the example of the gender, where both values are equal and differ primarily by the nominal and other context-related traits. Instead, this type of binary data clearly indicates that one value means something and the other means nothing.

In case of such distinction, can binary be considered ordinal? If yes, what are statistical tests that are usually used for such data? Also, are there any interesting books or papers on this case?

• Yes, it can be considered ordinal. Mostly in the domain of similarity measures and clustering. I've noticed that many times here. Please search the site for ordinal present absent. – ttnphns Sep 1 '15 at 8:38
• Just for instance, this post stats.stackexchange.com/a/15313/3277. Your notion of seems to give some weight to its values is relevant. – ttnphns Sep 1 '15 at 8:41
• Why should one blindly worship some authority (such as Stevens' typology) to refer to? You can invent your own. If you have ideas which you can substantiate (at least logically) - express them. – ttnphns Sep 1 '15 at 10:54
• There are only two possible orderings of binary data and they are equivalent, suggesting there isn't a meaningful question here. The interpretation that one value means "nothing" is surpassingly strange. I haven't seen any publication, statistical or not, that even remotely suggests (for instance) that "male" is meaningful while "female" is not. Each has meaning only in contrast to the other--and therein is the essence of all binary distinctions. – whuber Sep 3 '15 at 18:58
• Statistically, those situations are identical and can be analyzed in exactly the same ways. – whuber Sep 3 '15 at 21:02

Two is a paltry number, barely plural, & a two-point scale left to its own devices needs only to distinguish before it can put its feet up: it's otiose to muse on whether equal intervals or equal ratios are meaningful when there's only a single interval or ratio to consider, or on whether ranking is meaningful when there's only one sequence a pair can have; all the operations you might want to perform on the data are unaffected by its representation, as @Tim has explained.

It's only for the external relations of a binary variable that these things matter at all. The Jaccard index is a measure of similarity between two individuals each having several attributes represented by binary variables; you calculate the ratio of the number of attributes for which both have "1" to the number of attributes for which either have "1". Clearly the coding as "0" & "1" isn't arbitrary here (though we could swap it round for all variables at once & make a corresponding change to the calculation of the Jaccard index). This is the situation in which @ttnphns talks of "ordinal dichotomous variables", which seems fair enough. An example can be found in Faith et al. (2013), "The long-term stability of the human gut microbiota", Science, 341, 6141, where the Jaccard index is used to measure the similarity of the make-up of an individual's gut flora at different time points—the ratio of the number of bacterial strains in common over the total number of strains found. The choice of metric seems sensible—why take into account all the different strains absent at both time points? could an exhaustive list even be compiled?

A more hum-drum example might be found in the various ways variables are often combined into indices, scores, or whatever; to serve as, say, descriptive statistics, or predictors in regression. To calculate the Charlson comorbidity index you add up dichotomous variables that indicate conditions such as myocardial infarct & congestive heart failure. Many conditions are coded with "0" & "1"; but as hemilplegia contributes 2, & malignant tumor 6, to the total score, I'm tempted to propose these as interval-scale dichotomous variables.

Needless to say, how you align different binary scales in these kinds of situations depends on making decisions appropriate for the job at hand rather than somehow intuiting the true nature of each individual scale—an attribute coded "1" for the calculation of one Jaccard index might be coded "0" for the calculation of another.

The paragraph above exemplifies something that's always the case with this business of scale types. Stevens points out various relationships between which features of how you represent data need to be considered meaningful & the kinds of operations you perform during your analysis:

Scales are possible in the first place only because there is a certain isomorphism between what we can do with the aspects of objects and the properties of the numeral series. In dealing with the aspects of objects we invoke empirical operations for determining equality (classifying), for rank-ordering, and for determining when differences and when ratios between the aspects of objects are equal. The conventional series of numerals yields to analogous operations: we can identify the members of a numeral series and classify them. We know their order as given by convention. We can determine equal differences, as $8-6=4-2$, and equal ratios, as $\frac{8}{4}=\frac{6}{3}$. The isomorphism between these properties of the numeral series and certain empirical operations which we perform with objects permits the use of the series as a model to represent aspects of the empirical world.

This is an instance of an important general principle: you don't want arbitrary or conventional decisions about how to write things down to materially affect your conclusions.

The type of scale achieved depends upon the character of the basic empirical operations performed. These operations are limited ordinarily by the nature of the thing being scaled and by our choice of procedures, but, once selected, the operations determine that there will eventuate one or another of the scales listed in Table 1.1 [nominal, ordinal, interval, & ratio].

So you can't, for example, average scores on a five-point scale and claim that the interval between scale points doesn't matter: something's got to give (& note that it may well be the claim rather than the averaging—see e.g. here). It's a mistake to confuse this prohibition with the stipulation that first you need to determine the true scale type & then think about suitable methods of analysis. See Should types of data (nominal/ordinal/interval/ratio) really be considered types of variables?.

• +1 "Barely plural" and "otiose to muse on" are priceless--and right to the point. – whuber Sep 4 '15 at 17:32

The general idea of ordinal data is that there is some order or gradation of different categories and

exact numerical quantity of a particular value has no significance beyond its ability to establish a ranking over a set of data points (https://en.wikipedia.org/wiki/Ordinal_data)

With ordinal data your categories are ordered, e.g. $a < b < c$, so you are interested in the relations between categories, $a < b$ and $b < c$, so $a < c$. In this case ordering matters and if you re-assigned the labels in random order you would loose important information.

With binary data you have only two categories so knowing that $x > y$ provides you with the same information as knowing that $\neg(x^* < y^*)$, where $x^*$ and $y^*$ are $x$ and $y$ with reversed coding. In this case one category is compliment of another so their ordering does not matter.

For example, with changing the labels in logistic regression you just get reversed signs of coefficients and this is what we expect, for more see the recent question on logistic regression (check @Scortchi's comment for the linked question).

On the other hand, as @ttnphns noticed, there are similarity measures that make assumptions about coding of binary categories, like Jaccard index and in these cases it makes a difference how the categories are coded. Coding of the categories (e.g. as $0$ and $1$ or $-1$ and $+1$) in many cases could also make interpretation of the results easier (positive or negative influence). In both cases the difference concerns rather with coding of the variables rather than with information they carry.

• Tim, I would rather not concur with you, if to speak generally. Yes, as independent variables in regression binary variables behaves that peculiar way that you may thik of them as if interval or as ordinal or nominal - and it makes no difference. In other context (for example, clustering) it may have difference. The difference can appear in a multivariate context. – ttnphns Sep 1 '15 at 8:34
• @BillythePoet: The idea that data is essentially of a given type irrespective of what you might want to do with it is misguided. See Should types of data (nominal/ordinal/interval/ratio) really be considered types of variables? & especially the references in Glen_b's answer - the whole of Lord (1953) & Section 9 of Velleman & Wilkinson (1993). – Scortchi - Reinstate Monica Sep 1 '15 at 11:46
• @Tim: I had thought the same - see comments here. Calculating the Jaccard coefficient is a good example of when the coding for dichotomous variables needs to be non-arbitrary. – Scortchi - Reinstate Monica Sep 1 '15 at 12:26
• @BillythePoet ok, so I re-state my question: what would you like to learn form a binary ordered variable? What question you are asking about such variable? Maybe I am missing something... – Tim Sep 3 '15 at 16:40
• @BillythePoet You can always consider that 1 is higher than 0, but this does not change your analysis at any point since what you have is simply two categories, so the only thing that you could do is to count 0's and 1's, no matter of their meaning. The numbers do not carry (no matter if ordered or not) any additional information, it is only how you interpret them. You can consider them as ordinal and insist on some certain coding but you are still limited to the same math as with non-ordered binary data. Coding may help you with interpreting the results but that's all. – Tim Sep 3 '15 at 17:53