Statistics Functions

statistics.pstdev()

Compute population standard deviation, the square root of population variance. Supply mu only if it is the known population mean.

Formal Syntax & Structure

python syntaxpython
statistics.pstdev(data, mu=None)

Parameters & Attributes

NameTypeDescription
dataiterable of numbersObservations used by the statistic.
munumber or NoneKnown population mean, or None to calculate it.

Return Value

float or Decimal

Standard deviation; Decimal for Decimal data, float otherwise.

Working Example

Example Snippetpython
import statisticsprint(statistics.pstdev([2, 6]))
Python Reference