code: def variance(self):
          
          _self = self._discard_value(None)
          if not _self.total():
              return 0.0
          mean = _self.mean()
          weighted_central_moment = sum(
              count * (value - mean)**2 for value, count in iteritems(_self)
          )
          return weighted_central_moment / float(_self.total())
docs: Variance of the distribution.