Logo

Programming-Idioms

History of Idiom 203 > diff from v12 to v13

Edit summary for version 13 by Oldboy:
New Python implementation by user [Oldboy]

Version 12

2019-11-02, 17:43:45

Version 13

2019-11-04, 18:52:07

Idiom #203 Calculate mean and standarddeviation

Calculate the mean m and the standard deviation s of the list of floating point values data.

Idiom #203 Calculate mean and standarddeviation

Calculate the mean m and the standard deviation s of the list of floating point values data.

Extra Keywords
avg average variance
Extra Keywords
avg average variance
Imports
import statistics
Code
m = statistics.mean(data)
sd = statistics.stdev(data)