Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Note of minor disagreement: there are large classes of quantities with units that the article claims are unitless. It’s a question of ability to describe the units. You need more components to your unit algebra to describe ratios and percentages, this lets you ascribe units to (and check units of) statistical operations and much more sophisticated expressions.

You definitely need a way to describe counts of identities too, which takes you into the land of ontologies as well. Happy to discuss with anyone who geeks out on this stuff as well.



I make distinction between dimensionless and unit-less.

Radians are a unit, but are dimensionless. You'll end up in a world of trouble if you got rad/s and rpm mixed up.


I actually (embarrassingly) got tripped up by that a bit.

So, you're saying that radians/degrees _are_ a unit because we can use them to describe a count of something, but they're still in fact dimensionless?

Is that because 2*pi or degrees never refer to an actual physical length? I think that's what trips me up because I generally have thought of degrees and radians as essentially units of length around a circle. But I suppose that since we're working with circles of arbitrary rather than specified diameter, they're still unitless.

I think I got to it on my own at the end there ha but I'm happy to be corrected!


One way to think about radians is "feet (of perimeter) per feet (of radius)" -- the dimensional units cancel and you're left with a dimensionless unit.

Taxes are a familiar dimensionless unit -- dollar owed to the government, per dollar spent on snacks. The dollars cancel and you're left with a raw percentage. (actually, to convert to a percentage you multiply by 100 percent per whole; another dimensionless conversion)


If they are truly dimensionless, when is it meaningful to multiply a non-currency value by them? There’s still a semantic that attaches the rate to dollars obtained in a transaction.


Correct, the arbitrary length is the reason they're dimensionless.

A singular mathematical point can still rotate, but the arc length will always be zero.


So we can discuss precisely: how do you define dimensionless? There are well-accepted definitions, I’m just asking you to lay it out so we can refer to it specifically.

Ratios in which the numerator and the denominator have the same unit are only dimensionless if you decide to apply the division and cancel the common unit. If you do this cancellation, and you forget/hide the semantic role of numerator and denominator, you will indeed get mistakes.

Part of the issue is being able to capture enough semantic role to be useful. That’s usually ignored in units discussions.


Since both are angle per time duration, which aspect causes the trouble?


I'd certainly be interested to hear how quantities where dimensions would normally divide out should be modelled and some concrete statistical examples how this really helps avoiding likely errors.


I spent some time a while back looking at it from an algebra point of view, and I would like to make connections to specific analyses. The challenge for me is finding mistakes.

One example area is percentages, which seem dimensionless. Grams per gram yield a percentage. Like grams of sodium per gram of cheese. Or grams of potassium per gram of cheese. I can sum these percentages to get grams of alkali per gram of cheese ONLY if these come from the same or “sufficiently similar” sample.

Looking only at the unit of the measurement, without also looking at the set of measurements, can quickly go awry. “Dimensionless” values can be used as multipliers/scalars only when the context makes sense.

Here’s a subtle one: let’s say I have an additive quantity that I’m measuring, like gallons of paint in various buckets. What are the units for the total paint across all buckets, and what’s the units for the mean quantity of paint per bucket? If these truly have the same units, I could sum averages and sums together. Heck, we could meaningfully sum averages alone. But we know that’s not the case.


How do you propose to encode the additional information that is needed to detect these mistakes though?


The unit expressions need more information. Some of it is simply extending with more operator: For example, logarithms and exponents can be carried through and track that the units resulting from log(e, height in cm) are log(e, height in cm) by allowing the log() function to be used in a unit expression. This allows validation that if we add log(x) to log(y) and we raise the base to the power later we expect units of x * y.

For sums vs means, we need to include count of samples in the mean. If we forget it and it becomes a free variable N, we lose the ability to combine by addition, but other operations may still hold. The unit expression for a sum of count quantities is therefore different from the unit expression for average. You can derive unit expressions for std. deviation and other expressions as well.

Ultimately you also need a subjective ontology as well. Your usual unit system says it’s fine to add mass to mass and mass per volume to mass per volume. That misses the semantics of mass of what per volume of what? Mass of sodium per liter of water and mass of potassium per liter of water, maybe. Mass of sodium per liter of water and mass of hydrogen per km3 of star, I don’t think so.

Unit tracking is all about validation of the sensibility of performing math, and the more detail you need the closer the unit expressions become to a signature for the math + objects being quantified.

Time permitting from my day job, I’ve been trying to flesh this out for a while and could use interested parties to poke at it, give me a spur to flesh out and refine more. Counts of objects, linear measurements and rational combinations work out pretty well in this, plus stats and transforms like log and exp. Angular units are a TBD, I think they’ll be tractable, just a little different than conventionally expected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: