Calculating statistics for randomly generated series