Exercise R.3.4
Expected value: r(s,a,s') from p
Show that \(r(s,a,s')=\sum_r r \frac{p(s',r \mid s,a)}{p(s' \mid s,a)}\).
Hint: apply the definition of expected value and then the definition of conditional probability, use the previous exercise, and the numerator and denominator should exactly come up to the definitions of the transition functions.