'Expectation of expression over distribution'

def expectation(self, expr, var, evaluate=True, **kwargs):

    if evaluate:
        return summation((expr * self.pdf(var)), (var, self.set.inf, self.set.sup), **kwargs)
    else:
        return Sum((expr * self.pdf(var)), (var, self.set.inf, self.set.sup), **kwargs)
