Esempio n. 1
0
 def pop_stats(it, key):
     """Get the population statistics for a key."""
     values = list(gen_values_by_key(it, key))
     num_values = len(values)
     total = sum(values)
     mean = total / num_values
     std_dev = stats.population_standard_deviation(values)
     return mean, std_dev, values
Esempio n. 2
0
 def pop_stats(it, key):
     """Get the population statistics for a key."""
     values = list(gen_values_by_key(it, key))
     num_values = len(values)
     total = sum(values)
     mean = total / num_values
     std_dev = stats.population_standard_deviation(values)
     return mean, std_dev, values