Compare Monte Carlo and TD(0) value estimation in terms of bias and variance. Given eight episodes, one (A, 0, B, 0), six (B, 1) and one (B, 0), with , what do batch Monte Carlo and batch TD(0) give for and ?
Reinforcement learning, Temporal-difference learning
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you understand bootstrapping, and can show with numbers that the two methods reach different answers on the same finite data.
Key idea
Monte Carlo updates towards the full return : unbiased, but high variance. TD(0) updates towards : biased while is wrong, but low variance because only one step is random. On a fixed batch, MC fits the observed returns, while TD fits the maximum-likelihood Markov model of the data.
Steps
- Write the updates. MC: . TD(0): .
- Bias and variance: sums many random rewards and transitions, so its variance grows with episode length. The TD target has one random step but inherits the error in .
- : B appears in all 8 episodes, with return 1 in six of them, so both methods give .
- : MC averages the single observed return from A, which is , so . TD uses the fact that A always moved to B with reward 0, so .
- Interpret: MC minimises squared error on the training returns. TD gives the certainty-equivalence estimate: the answer you get by fitting a transition-and-reward model to the data and solving it exactly. This usually generalises better when the environment is Markov. TD can also learn online from incomplete episodes; -step TD and TD() interpolate between the two.
Common mistakes
- Calling the TD target unbiased. It is biased whenever .
- Saying Monte Carlo has high bias. It is the unbiased one; its problem is variance.
- Forgetting that Monte Carlo must wait for the episode to end before it can update.
How long your answer should be
About half a page: the two updates, the bias–variance sentence, and the A–B example.
Last checked on 4 December 2026.
Read this
- Sutton and Barto, Reinforcement Learning: An Introduction (2nd ed.), Sections 6.2–6.3: Free PDF. Sections 6.2–6.3 (pp. 124–128), including Example 6.4 ‘You are the Predictor’: exactly this A/B batch example, with the certainty-equivalence explanation.
- David Silver, UCL RL Course, Lecture 4: Model-Free Prediction: Slide 17 on the bias–variance trade-off of the TD target, and slides 22–24 on the AB example and certainty equivalence.
- NPTEL: Reinforcement Learning (IIT Madras, Prof. Balaraman Ravindran): Week 5, Monte Carlo, and Week 6, TD(0), which cover the two estimators side by side.
Previous in Reinforcement learning: Derive the Bellman expectation equation for . How does the Bellman optimality equation for differ, and why can the first be solved as a linear system but not the second?
Next in Reinforcement learning: In the cliff-walking gridworld (reward per step, for stepping off the cliff), an -greedy SARSA agent learns a safe path away from the edge, while Q-learning learns the path along the edge yet earns less reward per episode during training. Why?