The Ops class currently has variance and standard deviation functions. It would be nice to have the two average deviation functions as well:
AvDev_mean = sum(abs(x_i - mean(x))) / N
AvDev_median = sum(abs(x_i - median(x))) / N
Numerical Recipies' chapter on stats gives a reason or two why these values can sometimes be more useful than the standard deviation.
For efficiency reasons, it would be nice if the functions could calculate and return both the average deviation and the mean/median at the same time, but that's just my inner IDL speaking.
I've added mad, and it puts the mean and number of points (n) in USER_PROPERTIES.
Last edit: Jeremy Faden 2019-05-10
I finally changed the name "mad" to "meanAverageDeviation". This had been bugging me because (1) I don't think a short name is really needed (it will be used in assignments but not expressions), because this is self-documenting, and last because I discovered there's also a medianAverageDeviation. (This is the median of the deviations, not the mean of the deviations from the median.)