def Var(self, mu=None):
if mu is None:<EOL><INDENT>mu = self.Mean()<EOL><DEDENT>var = <NUM_LIT:0.0><EOL>for x, p in self.d.iteritems():<EOL><INDENT>var += p * (x - mu) ** <NUM_LIT:2><EOL><DEDENT>return var<EOL>
Computes the variance of a PMF.

        Args:
            mu: the point around which the variance is computed;
                if omitted, computes the mean

        Returns:
            float variance