Units Have More Depth Than I Thought

Last week I stumbled over Dimensional Analysis which is not only useful for applied fields (physics, biology, economics), but also for math (Why did no one tell me that you can almost always think of df/​dx as having “the type of f”/​”the type of x”? The fact that exponents always have to be unit-less etc.? It had never occurred to me to make this distinction. In my mind, f(x)=x went from the reals to the reals, just like did.

One example of a question that before I would have had to think slowly about: What is the type of the standard deviation of a distribution? What is the type of the z-score of a sample?

Answer

The standard deviation has the unit of the random variable X, while the z-score is unitless

If you found the above interesting, I recommend reading (or skimming) this lecture, it’s excellent!

It had never occurred to me that I could use linear algebra to literally solve for an equation. Yes, avoiding type errors in a typed programming language is also great, but what’s different there is that often it really doesn’t matter if something is a dict or a list, it just has to fit with the rest of your code. Searching a type that correctly maps to the territory across scales is a more tricky business than efficient code for a simple programming problem. If you keep not being able to distinguish “weight” and “mass” you will keep getting lost. If you notice your confusion between the difference of the act of weighing and gravity, it might get you far.