Learn and Learn

Learn And Learn - great place for tutorials, references and how-to

How to Find or Calculate Population Standard Deviation in Python using pstdev() Function

pstdev() function exists in Standard statistics Library of Python Programming Language. The purpose of this function is to calculate the Population Standard Deviation of given continuous numeric data. The given data will always be in the form of sequence or iterator.

Population Standard deviation is the square root of population variance.

Population Standard Deviation Formulae

Population Standard Deviation Formulae

 

Syntax of pstdev() Function in Python

The syntax of pstdev() function in Python is as follows:statistics.pstdev(data, mu = None)

 

Parameters of pstdev() Function in Python

data – This parameter can be any sequence or iterator (lists, tuples, etc…)
mu – This parameter is an optional. It is the mean of given data. If this parameter is missing or None, the mean of data is automatically calculated.Note: If data is empty, pstdev() function raises a StatisticsError

 

Return Value of pstdev() in Python

Return value of pstdev() is a floating point number value after calculating Population Standard Deviation of given data in iterator (lists, tuples)

 

pstdev() Function Examples in Python


Output of pstdev() Function in Python
1.4947825928876748
13.184839779079608

 

Loading...
LearnAndLearn.com © 2018 - All rights reserved