code: def Var(self, mu=None):
          
          if mu is None:
              mu = self.Mean()
  
          var = 0.0
          for x, p in self.d.iteritems():
              var += p * (x - mu) ** 2
          return var
docs: Computes the variance of a PMF.
  
          Args:
              mu: the point around which the variance is computed;
                  if omitted, computes the mean
  
          Returns:
              float variance