Why an Identifier Can Look Like a Measurement
A data table may contain a column of numbers that looks ready for calculation: student numbers, patient codes, or record IDs. But the appearance of digits does not tell us what the column means. A number can identify a case without measuring any characteristic of that case. Treating an identifier as a measurement can produce calculations that are precise-looking but meaningless.
The key question is what the recorded values represent. A measurement or count describes an amount or characteristic of an individual. An identifier names or distinguishes a particular case so that it can be recognized or matched with other information. An identifier is useful precisely because it points to a case; its numerical size need not say anything about that case.
This distinction is about the role of the variable, not its visual format. A student number such as 48217 may be stored as a numeric-looking string, but it does not mean the student has 48,217 units of some trait. Similarly, a record code that begins with a letter and ends in digits remains an identifier if it is used to locate a record rather than describe an amount.
What the Digits Do—and Do Not—Tell You
Earlier material on categorical and quantitative variables distinguishes labels from values on which arithmetic has a meaningful interpretation. An identifier belongs on the label side of that distinction. The digits may have been assigned in order, generated randomly, or assembled from several parts. Unless the assignment system gives those parts a defined meaning, the digits alone do not provide a scale of measurement.
Three tempting clues do not change an identifier into a measurement:
- It contains digits. Digits can be used as symbols. Their presence does not establish that addition, subtraction, or averaging is meaningful.
- It can be sorted numerically. Software can put codes in ascending order, but that is only an ordering of their representations. It does not imply that one case has more of a characteristic than another.
- Each value is unique. Uniqueness may make the code effective for distinguishing cases. It does not turn the code into a measured feature of those cases.
Sorting can still be practically useful. A clinic might sort record IDs to find a particular file, or a researcher might sort student numbers to check whether a record is present. The caution is about interpretation: after sorting, do not say that the case with the larger ID has more of the characteristic being studied.
Worked Example: Student Numbers and an Apparent Average
Suppose a hypothetical class roster contains three students with IDs 104, 207, and 315. A tutor proposes that the “average student number” describes the typical student in the class. Decide whether that summary is meaningful.
The IDs distinguish the three students; they are not measurements of student characteristics. If we mechanically calculate their arithmetic mean, we get
The arithmetic is correct, but the interpretation is not. An ID of 208.7 does not identify a student, and it does not describe a typical amount of any trait. It is simply a calculation on the codes.
The problem becomes clear if the same three students are assigned different IDs—say, 12, 40, and 91—without changing anything about the students. The new numerical mean would be
The class has not changed, yet the proposed “typical student number” has changed. That is a sign that the calculation reflects the coding scheme, not a characteristic of the students. A useful summary should answer a question about the cases, not merely summarize arbitrary labels.
A Short Justification: Relabeling Should Not Change Conclusions About Cases
The distinction can be made precise. Suppose three cases have identifiers 11, 12, and 13. If the codes are labels, we could replace them with 101, 900, and 250, provided each case still has a distinct code and the records are updated consistently. The identity and characteristics of the cases have not changed; only their labels have.
Yet the arithmetic mean of the original codes is 12, while the mean of the replacement codes is
Thus, arithmetic summaries of the codes are not preserved when the labels are changed. More generally, if a one-to-one relabeling maps each case to a new code, it preserves which records refer to the same case, but it need not preserve numerical differences, sums, or means. Those calculations depend on the chosen labels.
This gives a practical test: ask whether a conclusion about the size or spacing of values would remain meaningful if the codes were replaced by other unique labels. If not, the conclusion is about the code assignment, not a measured property of the cases. This test does not prohibit using the identifier to connect records; matching is a legitimate use precisely because the code's identity-preserving role remains intact after consistent relabeling.
Using Identifiers Properly
Identifiers are valuable in data work. Their purpose is not to summarize cases but to keep records organized. For example, a code can help check whether each case has one record, locate a case that needs correction, or match information collected in separate files. These uses depend on the code pointing consistently to the intended case, not on its numerical magnitude.
An identifier column should generally be kept distinct from the variables used to describe the cases. If a data table has columns for student ID, study group, and quiz score, the ID locates each student's record, the group records a category, and the score records a quantitative result. The fact that all three columns may contain numerals does not make their roles equivalent.
In analysis, an identifier may be needed to link or check records, but it ordinarily should not be included as a measured explanatory or outcome variable. A statistical pattern involving ID order can be an artifact of how codes were assigned. For example, if IDs were issued as people enrolled, a trend across IDs might reflect enrollment order rather than any meaningful progression in the people themselves. Investigators would need an independently defined variable for the characteristic or order they actually want to study.
Worked Example: Matching Records Without Analyzing the Code
Imagine a hypothetical research team has one file containing participant IDs and visit dates, and a second file containing the same IDs and blood-pressure readings. The IDs are A014, A015, and A016. Explain how the team should use the codes and what it should not infer from them.
Use for matching. If A015 appears in both files, the team can use that shared code to join the visit information with the reading for the corresponding participant. The code is functioning as a key that connects records. The team should verify that each code refers to the intended participant and that the files use the same coding convention.
Do not treat the suffix as a measurement. The difference between 015 and 016 is one in the written code. It does not establish that the participant with ID A016 is one unit higher in age, blood pressure, or any other characteristic. Nor does A014 necessarily represent a participant with a lower value of a study variable than A016.
Keep the measured value separate. If the question concerns blood pressure, analyze the blood-pressure readings, with their measurement units and the appropriate study context. The ID helps identify which reading belongs to which participant; it does not replace the reading.
When a Code Contains More Than a Label
Some systems build codes from components. A hypothetical record code might begin with a site letter followed by digits. It is tempting to interpret the first part as a site and the remaining digits as a sequence number. That interpretation is justified only if the coding rules document it. A code's structure should not be reverse-engineered from a few examples or assumed from its appearance.
If documentation confirms that a part of the code records a real category, it is often clearer to create a separate variable for that information. For instance, if the leading character officially identifies one of several collection sites, a data set can include a site variable as well as the full record ID. The full code can remain the identifier, while the documented site component can be analyzed as a category. The sequence portion still does not become a measurement merely because it increases.
This distinction also helps when a code appears to have an order. Some codes may be assigned consecutively, but consecutive assignment usually tells us about the administrative process—for example, the order in which records were created—not about a measured quantity in the cases. If creation order itself is the subject of interest, it should be represented and interpreted as such using a clearly defined variable, rather than quietly treating the entire ID as a numerical measurement.
Worked Example: A Code With a Documented Component
In a hypothetical data system, each clinic record has a code such as N-032 or S-118. The system manual states that N means the North clinic and S means the South clinic; the digits are a unique record sequence within the clinic. Determine which parts can be used to describe cases and which are only identifiers.
The full code, such as N-032, identifies a particular record. Its purpose is to distinguish that record and support record retrieval or matching. The sequence 032 does not indicate that the associated case has 32 units of a characteristic, nor that it is quantitatively smaller than the case coded S-118.
The documented letter has a different role: it encodes clinic membership. The team can represent clinic as a separate categorical variable with values North and South, because the manual defines what those values mean. This does not make the full record code a measurement. It separates the identity function of the whole code from the documented category carried in one part of it.
The conclusion depends on the stated documentation. Without the manual, the team could not safely assume what N, S, or the digit sequence meant. It could still use the complete code as a label if it reliably distinguished records.
Common Mistakes
- “It is numeric, so I can average it.” A calculator can average any list of numbers, but the result is interpretable only when the values represent a quantity on a meaningful scale. For an ID, the mean depends on arbitrary code assignments.
- “The larger ID belongs to the larger case.” Numerical order among codes does not imply order in height, score, severity, or another characteristic. Use an actual variable measuring that characteristic.
- “Every unique number is a measurement.” Unique values can be assigned specifically to make cases distinguishable. Uniqueness is a feature of the identification system, not evidence of a measured quantity.
- “The code appears to contain a category, so I can analyze it.” First check the coding documentation. If a component has a documented meaning, separate that information into its own variable rather than attributing meaning to the full identifier.
- “Identifiers are useless in analysis.” Identifiers can be essential for locating and matching records. The correction is not to discard them automatically, but to use them for identification rather than as measured outcomes or predictors.
Check Your Understanding
For each question, explain your reasoning in terms of what the recorded values represent.
- A roster contains ID values 25, 106, and 414. Why is their arithmetic mean not a meaningful description of the people on the roster?
- A data file uses the code R008 to locate a record. What is one legitimate use of this code, and what conclusion should not be drawn from the digits?
- A system manual says the first character of each code identifies a collection site. How should that documented information be represented separately from the full identifier?
- Why does the fact that every case has a unique code not make the code a quantitative variable?
- Two records have the same identifier in separate files. What can matching those records establish, and what does it not establish about the measured variables?