MCPcopy Create free account
hub / github.com/commonmark/cmark / stdev

Function stdev

bench/statistics.py:566–579  ·  view source on GitHub ↗

Return the square root of the sample variance. See ``variance`` for arguments and other details. >>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) 1.0810874155219827

(data, xbar=None)

Source from the content-addressed store, hash-verified

564
565
566def stdev(data, xbar=None):
567 """Return the square root of the sample variance.
568
569 See ``variance`` for arguments and other details.
570
571 >>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75])
572 1.0810874155219827
573
574 """
575 var = variance(data, xbar)
576 try:
577 return var.sqrt()
578 except AttributeError:
579 return math.sqrt(var)
580
581
582def pstdev(data, mu=None):

Callers

nothing calls this directly

Calls 1

varianceFunction · 0.85

Tested by

no test coverage detected