compute expectation values of functions of parameters