Minimum and maximum for OnlineStats.OrderStats

Would these definitions make sense for OnlineStats.OrderStats from OnlineStats.jl?

Base.minimum(o::OrderStats) = minimum(o.ex)
Base.maximum(o::OrderStats) = maximum(o.ex)
Base.extrema(o::OrderStats) = extrema(o.ex)

Not meaning to be rude but the package’s GitHub is probably a better place to ask, isn’t it? You could simply open a PR and let the maintainers decide.

Or am I missing the point of your post?

I think this may be a more general statistics question. Does the concept of extrema make sense in terms of order statistics or is that an implementation detail?

I’m not a statistician and this concept is relatively new to me.

I did submit a pull request to OnlineStats.jl:

1 Like

Implementation detail (kinda). OrderStats is one of several types OnlineStats provides to help you understand what your data looks like. The 1st and n-th order statistics are biased estimates of the min and max, respectively. I think I added the extrema in there because 1) plotting it will show the actual min/max, and 2) in real life you probably don’t care about these biased quantities, you want the actual min/max.

1 Like

Should we add a note about this to explain why these statements might be false?

maximum(os::OrderStats) == quantile(os::OrderStats, 1.0)
minimum(os::OrderStats) == quantile(os::OrderStats, 0.0)

Is it strictly true that the following will hold?

maximum(os::OrderStats) >= quantile(os::OrderStats, 1.0)
minimum(os::OrderStats) <= quantile(os::OrderStats, 0.0)