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)
| 564 | |
| 565 | |
| 566 | def 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 | |
| 582 | def pstdev(data, mu=None): |
nothing calls this directly
no test coverage detected