Algorithms for calculating variance articles