Having 2 sets, and only this data for each one, the running variance, the sum, the running mean and the count. How can I get the merged variance of the 2 sets?
EDIT:
The values of the sets are being updated each time with new ocurrences this ocurrences are not being stored.
The values of the sets are not equal.
I need to merge this 2 sets and get the new variance of this merged set.
EDIT 2:
I think that what I need is the pooled variance, am I correct?
In java would be something like this
Double variance = (((firstAggregate.count - 1) * firstAggregate.variance) + ((secondAggregate.count - 1) * secondAggregate.variance)) / ((otherAggregate.count + secondAggregate.count) - 2);