On this page
statistics.stdev
Prev: statistics.StatisticsError | Up: statistics | Next: statistics.variance
Rel: statistics.correlation, statistics.covariance, statistics.fmean, statistics.geometric_mean
Ref: docs.python.org — statistics.stdev
Tags: #public #python3 #stdlib #statistics
Import
import statistics
from statistics import stdev
Signature & Overview
statistics.stdev(data, xbar=None)
Return the square root of the sample variance.
Usage
import statistics
assert round(statistics.stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]), 4) == 1.0811
Gotchas
- Sample standard deviation ($N - 1$): Requires at least 2 data points.
REPL Inspect
from statistics import stdev
help(stdev)
Linked from
Related notes
- tuts/python3/stdlib_module/statistics/StatisticsError Linked here; links to this page; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/variance Linked here; links to this page; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/statistics/correlation Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/covariance Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/fmean Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/geometric_mean Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/harmonic_mean shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/kde shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/kde_random shared tags: #statistics, #stdlib