Question 5 of 6 Advanced Scenario
How do you handle unit changes without silently corrupting analyses?
Short answer
Attach machine-readable units to measurements, reject ambiguous values, convert explicitly into canonical units and log conversion provenance.
Why
A reported value of 10 is not interpretable without knowing whether it means ng/mL, micrograms/mL or another quantity. Define a schema with measurement name, unit, expected dimension, allowed range and source method, then validate it on ingestion. Convert into a canonical analysis unit using a tested conversion table or units library, preserving the raw number and raw unit for audit.
Compare distributions before and after conversions and trigger warnings on improbable jumps when upstream vendors change their export. Disallow implicit string stripping or silently assuming a default unit when documentation is missing. Some apparently similar values represent different measurands and cannot be converted by multiplication alone, such as mass versus molarity without molecular weight.
Common mistakes
- Changing a column label from mg/L to ng/mL without transforming and validating the numeric values
The interviewer might ask next
Which unit conversions require additional substance-specific information rather than a fixed factor?