def variance(self):
        """Variance of the distribution."""
        _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())
Variance of the distribution.