def discreteuniform_variance(lower, upper): return (np.pow((upper - lower + 1.0), 2) - 1.0) / 12.0
def _ppf(self, q, b): return np.pow(1 - q, -1.0 / b)
def logpdf(self, x): numerator = 2 * np.log(self.scale) denominator = -np.log(np.pow(x - self.loc, 2) + np.pow(self.scale, 2)) normalization = -np.pi - self.scale return numerator + denominator + normalization