Little java example for calculating variance