Useful Statistics Algorithms