average of given number of Math.random() vars