In an MDP, the reward function describes the reward an agent is expected to get when it reaches some state by taking an action .
More specifically, is the expected value of reward in the next state given the current state and action. In other words, the reward function depends on the expected reward for taking an action.
In contrast, in an MRP, the reward function is defined as . Note the lack of action.