see https://gist.github.com/1886960 for an algorithm to handle calculating standard deviation and variance across many servers.
Pull request mongo/pull/409
I'm assuming this is meant to be for $group.
Ideally any $group op should be usable in a $project against an array field, but that is a different issue.
I started this today. Here is the commit in github. https://github.com/base698/mongo/commit/2f9ab97ffb6f027faf4c503ba4a58e500eb6fb23
It needs tests and variance. It probably could be refactored to do average, variance and standard deviation in one motion since you have to do it incrementally.
Closed https://github.com/mongodb/mongo/pull/409 due to inactivity
Any idea if this will be picked up at all?
I opened a pull request for this today. https://github.com/mongodb/mongo/pull/464
This implements standard deviation and variance calculations using the algorithm listed in the description.
Message: Clean up AccumulatorAvg
Major change is not inheriting from AccumulatorSum
Prep for SERVER-5044 $stdDev accumulator
This is a must have.
Hey, It's a nice to have feature.
Any updates on this ?