I have a search which returns the result as frequency table:
Basically, 6 users have uploaded 0 times, 4 users uploaded 1 time, and so on.
Now I want to compute stats such as the mean, median, and mode. Is there an easier way to compute stats directly on a frequency table such as this? (ie mean should be 0.916666, and mode is 0) This seems to be something that is required quite often, yet I haven't found a way to do it. I understand there's way to calculate stats on the data before I turn it into a frequency table, the problem is that the query is rather complex (because in order to include the asked 28 Jun '11, 14:55
jyzhang

If you're frequency table is generated by you running
or, to get back the above frequency table:
if you want, you can generate the subsearch into a file with outputcsv or outputlookup, then fetch it back in and append it. answered 28 Jun '11, 18:39
gkanapathy ♦
Note the above will let you calculate mean(), stdev(), count(), and any percentile, along with a few other functions. Adding max(), min(), first(), last(), etc aren't that hard, but left as an exercise.
(28 Jun '11, 18:47)
gkanapathy ♦

No easy way to compute all of these in a single simple query. mean:
mode:
median:
trickery to combine them:
answered 28 Jun '11, 16:24
gkanapathy ♦
If that's the case, I'm thinking of writing my own custom command to expand the frequency table... this way I can pipe the results to stats and do mean(..), median(..), p90(..), etc. Unless something like this already exists...
(28 Jun '11, 17:43)
jyzhang
