Inconsistent behavior of exstimators for null samples
Functions for estimation of various statistics have inconsistent behavior for samples of insufficient size. For example for empty sample
- mean returns NaN
- welfordMean returns 0
- Quantile.weightedAvg throws exception.
It's not clear what is correct behavior. One possibility is to simply return Maybe when estimate is impossible but that will require constant unwrapping of Maybes so I'm not sure it's good thing
was brought up in #94
I absolutely prefer returning Maybe.
Wrt unwrapping, are you talking about a performance issue? I don't see how this is a practical issue.
I lean towards this solution as well.
By unwrapping I mean that whenever we use mean we have to handle Nothing case. On one hand it's right thing on other it's annoying when you do quick and dirty data exploration. I wonder whether we should provide set of function which call error when encounter insufficient data