def pvariance(data, mu=None):
 if (iter(data) is data):
  data = list(data)
 n = len(data)
 if (n < 1):
  raise StatisticsError('pvariance requires at least one data point')
 (T, ss) = _ss(data, mu)
 return _convert((ss / n), T)

def pvariance ( data , mu = None ) : if ( iter ( data ) is data ) : data = list ( data ) n = len ( data ) if ( n < 1 ) : raise StatisticsError ( 'pvariance requires at least one data point' ) ( T , ss ) = _ss ( data , mu ) return _convert ( ( ss / n ) , T )
return the population variance of data .