Nominal Data
Nominal data is categorical data whose categories have no inherent order — color, country, blood type, payment method — distinguishing it from ordinal data, where a ranking like "poor, fair, good" exists even if the gaps between ranks aren't equal. The name comes from the Latin nomen, "name," and the term is well chosen: a nominal category is purely a label, carrying no information beyond group membership, and any arithmetic, ranking, or distance calculation applied to it is invalid regardless of how the categories happen to be encoded or stored.
Nominal data sits at the bottom of the classical measurement-scale hierarchy proposed by psychologist Stanley Smith Stevens in his influential 1946 paper "On the Theory of Scales of Measurement," which ranked scales as nominal, ordinal, interval, and ratio in order of increasing mathematical structure. Stevens's framework still underlies how most statistics curricula teach data types today: nominal data permits only the operations of equality and counting (is this the same category as that one, how many fall into each category), with every operation beyond that — ordering, subtracting, averaging — requiring a scale with more structure than nominal data actually has. The practical value of the hierarchy is that it gives a clean rule for catching misuse: if an operation isn't licensed by the scale a variable sits at, applying it anyway produces output that looks like a number but isn't actually measuring anything coherent.
The mode — the most frequently occurring category — is the only measure of central tendency that's rigorously valid on nominal data, because computing a median requires an order that nominal categories don't have, and computing a mean requires both an order and a meaningful distance, neither of which nominal data provides. A dataset of customer payment methods (credit card, PayPal, bank transfer) can validly report "credit card is the most common method" but cannot validly report an "average payment method," even though nothing technically stops someone from assigning numeric codes to the categories and running the calculation anyway — the output would compute without error and still mean nothing.
Encoding nominal data for machine learning models is where the no-order property has its clearest downstream consequence: one-hot encoding, representing each category as its own binary column, is the standard approach precisely because it avoids implying an order or distance that integer label encoding would introduce. Label-encoding a nominal variable (assigning credit_card=0, paypal=1, bank_transfer=2) risks a model learning that "bank_transfer is greater than paypal," a relationship that doesn't exist in the underlying data — a subtle bug because the model will often still achieve reasonable accuracy despite learning a false structure, which is what makes this encoding mistake common and hard to catch through performance metrics alone.
The chi-square test of independence is the standard statistical tool for testing whether two nominal variables are associated — whether purchase category is independent of region, for example — by comparing observed category-combination counts against the counts expected under independence. This is the nominal-data analog to correlation for numerical variables: a different mathematical approach built specifically for frequency comparisons across unordered groups, since Pearson correlation (built for ordered, numerical relationships) has no valid application to data that carries no order to correlate.
Read nominal data as the purest case of a label carrying no structure beyond group membership: Stevens's 1946 hierarchy places it at the floor of what a variable can support, which is why the mode is its only valid central-tendency statistic, why one-hot encoding rather than integer labeling is the correct way to feed it into a model, and why testing its relationships requires the frequency-based chi-square test rather than any correlation method built around order or distance.