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

Function pstdev

bench/statistics.py:582–595  ·  view source on GitHub ↗

Return the square root of the population variance. See ``pvariance`` for arguments and other details. >>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) 0.986893273527251

(data, mu=None)

Source from the content-addressed store, hash-verified

580
581
582def pstdev(data, mu=None):
583 """Return the square root of the population variance.
584
585 See ``pvariance`` for arguments and other details.
586
587 >>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75])
588 0.986893273527251
589
590 """
591 var = pvariance(data, mu)
592 try:
593 return var.sqrt()
594 except AttributeError:
595 return math.sqrt(var)

Callers

nothing calls this directly

Calls 1

pvarianceFunction · 0.85

Tested by

no test coverage detected