'Expectation of expression over distribution'

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

    integral = Integral((expr * self.pdf(var)), (var, self.set), **kwargs)
    return (integral.doit() if evaluate else integral)
