Pick f and refine the grid. The stochastic integral alone (the naive chain rule) misses the ½f″ dt term; adding it closes the gap to f(W_T) − f(0).
Path
1.00
0.255
Random seed: 7
The second term is a drift that ordinary calculus would drop. For f = x² it is exactly T.
Both sides of Itô's lemma
On one Brownian path: the left side is f(W_t) − f(0); the right side is the Itô sum Σ f′(W)ΔW (evaluated at the left point) plus the correction ½Σ f″(W)Δt. Increase n: the corrected sum sticks to the left side, the uncorrected one does not.
f(W_t) − f(0)Σ f′(W)ΔW + ½Σ f″(W)ΔtΣ f′(W)ΔW (no correction)
Drag the time cursor (or focus it and use the arrow keys) to read the values at t.
f(W_t) − f(0), at t = 0.500
0.6120
Σ f′(W)ΔW + ½Σ f″(W)Δt, at t = 0.500
0.5438
Σ f′(W)ΔW (no correction), at t = 0.500
0.0438
f(W_t) − f(0) (T)
0.0558
Σ f′(W)ΔW + ½Σ f″(W)Δt
-0.1325
Error with correction
-0.1883
Σ f′(W)ΔW (no correction)
-1.1325
Error without correction
-1.1883
Mean |error| at T over 200 paths
Error with correctionError without correction
The corrected error falls as n grows; the uncorrected one levels off at the size of the correction.