What the Numerical Test Measures
Ito’s formula for the square function says that Brownian motion accumulates a correction from its quadratic variation. A grid-based test can make that correction visible: from simulated increments, compare the terminal square \(B_T^2\) with the left-endpoint sum \(2\sum_k B_{t_k}\Delta B_k\), including the time correction \(T\). The difference between these quantities is not numerical roundoff alone. On a finite grid it is exactly the difference between the grid’s quadratic-variation sum and \(T\).
Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a standard Brownian motion \(B_t\) relative to \((\mathcal{F}_t)\). Fix \(T>0\) and a deterministic partition \(0=t_0<t_1<\cdots<t_n=T\). Write \(\Delta t_k=t_{k+1}-t_k\) and \(\Delta B_k=B_{t_{k+1}}-B_{t_k}\), for \(k=0,\ldots,n-1\). In a simulation on an equal grid, one generates independent increments with distribution \(N(0,T/n)\) and obtains path values recursively from \(B_{t_0}=0\) and \(B_{t_{k+1}}=B_{t_k}+\Delta B_k\).
The stochastic integral corresponding to \(S_n\) is the Ito integral \(\int_0^T B_s\,dB_s\). Its integrand \(H_s=B_s\) is adapted and progressively measurable, and it belongs to \(\mathcal{L}^2\) on \([0,T]\), since \(\mathbb{E}\int_0^T B_s^2\,ds=\int_0^T s\,ds=T^2/2<\infty\). Ito’s formula, applied to \(f(x)=x^2\), has \(f'(x)=2x\), \(f''(x)=2\), and correction \(\tfrac12 f''(B_t)\,d[B]_t=dt\), because \([B]_t=t\). Thus \(B_T^2=2\int_0^T B_s\,dB_s+T\). This uses the Ito integral, not the ordinary chain rule or the Stratonovich integral: the Stratonovich chain rule has no \(T\) correction for this function.
The Exact Grid Identity
Proof. For each grid interval, expand the difference of consecutive squares using \(B_{t_{k+1}}=B_{t_k}+\Delta B_k\):
Summing over \(k=0,\ldots,n-1\), the left side telescopes to \(B_T^2-B_0^2=B_T^2\). The two terms on the right sum to \(2S_n+Q_n\). Therefore \(B_T^2=2S_n+Q_n\), and subtracting \(2S_n+T\) from both sides gives \(R_n=Q_n-T\). This also shows why the identity is exact on the grid, even though its stochastic-integral counterpart is a limiting statement. \(\square\)
For the equal grid, the distribution of the residual gives a quantitative benchmark for a simulation. The increments are independent \(N(0,T/n)\) random variables. A centered normal variable of variance \(h\) has second moment \(h\) and fourth moment \(3h^2\). Consequently, each squared increment has mean \(T/n\) and variance \(3(T/n)^2-(T/n)^2=2(T/n)^2\). Independence lets us add these variances.
Proof. By the proposition, \(R_n=Q_n-T\). Put \(h=T/n\). Each \(\Delta B_k\) has distribution \(N(0,h)\), so \(\mathbb{E}[(\Delta B_k)^2]=h\) and \(\operatorname{Var}((\Delta B_k)^2)=3h^2-h^2=2h^2\). Adding the \(n\) means gives \(\mathbb{E}[Q_n]=nh=T\); adding the variances of the independent squared increments gives \(\operatorname{Var}(Q_n)=2nh^2=2T^2/n\). Hence \(R_n\) has mean zero and variance \(2T^2/n\). Since its mean is zero, \(\mathbb{E}[R_n^2]=\operatorname{Var}(R_n)\), and taking the nonnegative square root gives the stated root-mean-square size. This tends to zero, which is precisely \(L^2\) convergence of \(R_n\) to zero. \(\square\)
This theorem predicts the scale of a typical residual, not its value on every simulated path. Refining the grid reduces the root-mean-square residual across repeated simulations. It does not require the absolute residual on one particular path to decrease at every refinement.
Worked Grid Calculations
Worked Example: A Two-Interval Path and Its Refinement
Take \(T=1\). Consider first the two increments \(\Delta B_0=\tfrac12\) and \(\Delta B_1=-\tfrac12\). The path values are \(B_0=0\), \(B_{1/2}=\tfrac12\), and \(B_1=0\). The left-endpoint sum is
Thus \(2S_2+T=2(-\tfrac14)+1=\tfrac12\), while \(B_1^2=0\), so \(R_2=0-\tfrac12=-\tfrac12\). Checking by the proposition, \(Q_2=(\tfrac12)^2+(-\tfrac12)^2=\tfrac12\), and \(Q_2-T=\tfrac12-1=-\tfrac12\), as required.
Now refine each half-interval into two quarter-intervals, using increments \(\tfrac34,-\tfrac14,-\tfrac34,\tfrac14\). Their pairwise sums are \(\tfrac12\) and \(-\tfrac12\), so this is consistent with the coarser path. The refined path values are \(0,\tfrac34,\tfrac12,-\tfrac14,0\), and
Therefore \(2S_4+1=-\tfrac54+1=-\tfrac14\), and \(R_4=0-(-\tfrac14)=\tfrac14\). Independently, \(Q_4=\tfrac{9}{16}+\tfrac{1}{16}+\tfrac{9}{16}+\tfrac{1}{16}=\tfrac54\), so \(Q_4-1=\tfrac14\). Here the absolute residual falls from \(\tfrac12\) to \(\tfrac14\), but the sign changes. This one path illustrates the identity; it does not establish a monotone rule for refinement.
Worked Example: A Grid with Zero Residual
Again take \(T=1\), now with four increments \(\tfrac12,\tfrac12,-\tfrac12,-\tfrac12\). The path values are \(0,\tfrac12,1,\tfrac12,0\). Hence
It follows that \(2S_4+T=-1+1=0=B_1^2\), and the test residual is zero. The independent quadratic-variation check gives \(Q_4=4(\tfrac12)^2=1\), so \(Q_4-T=1-1=0\). A zero residual on one grid is possible; it does not imply that every increment square equals its time step.
Worked Example: The Root-Mean-Square Benchmark
For \(T=1\) and \(n=4\), the theorem predicts \(\mathbb{E}[R_4]=0\), \(\operatorname{Var}(R_4)=2(1)^2/4=\tfrac12\), and root-mean-square residual \(\sqrt{\tfrac12}=1/\sqrt{2}\). For \(n=16\), the corresponding values are \(0\), \(2(1)^2/16=\tfrac18\), and \(\sqrt{\tfrac18}=1/(2\sqrt{2})\). The latter root-mean-square value is half the former, as doubling the number of intervals divides the root-mean-square residual by \(\sqrt{2}\).
Check: squaring the two root-mean-square values gives \((1/\sqrt{2})^2=\tfrac12\) and \((1/(2\sqrt{2}))^2=\tfrac18\), exactly the two variances just computed. These are theoretical benchmarks over Brownian simulations, not promised residuals for any particular simulated path.
A Practical Simulation Procedure
For each chosen grid size \(n\), compute one path and its residual using the same increments throughout. In particular, generate the path values before forming the left-endpoint sum; using \(B_{t_{k+1}}\) in place of \(B_{t_k}\) changes the discretization. To compare grid sizes reliably, repeat the simulation over many independent paths and summarize the residuals at each fixed \(n\).
Set \(h=T/n\), draw independent \(Z_k\sim N(0,1)\), and set \(\Delta B_k=\sqrt{h}\,Z_k\) for \(k=0,\ldots,n-1\).
Start with \(B_{t_0}=0\), recursively add each increment, and accumulate \(S_n=\sum_k B_{t_k}\Delta B_k\) and \(Q_n=\sum_k(\Delta B_k)^2\).
Calculate \(R_n=B_T^2-(2S_n+T)\), then verify on that same path that \(R_n=Q_n-T\). Record \(R_n\), or its absolute value, for comparison across repetitions.
For many independent paths, the sample mean of \(R_n\) should fluctuate around zero, while the sample mean of \(R_n^2\) should approach \(2T^2/n\) as the number of paths grows. A finite Monte Carlo sample will not match the theoretical values exactly. Grid refinement and increasing the number of simulated paths address different sources of discrepancy: refinement reduces the theoretical residual variance, while more paths improve the precision of estimated averages.
Common Mistake: Dropping the Quadratic Correction
A tempting but incorrect calculation is to use \(B_T^2\approx2S_n\), omitting \(T\). For the four-increment path in the zero-residual example, this gives \(2S_4=-1\), even though \(B_1^2=0\). The resulting error \(B_1^2-2S_4=1\) is not the residual defined for the Ito test. The correction is to include \(T\): \(2S_4+T=-1+1=0\), which matches the terminal square. In general, the exact grid identity \(B_T^2=2S_n+Q_n\) shows the source of the correction; the limit \(Q_n\to T\) explains why Ito’s formula uses \(T\).
Another mistake is to demand that a single path’s absolute residual shrink at every refinement. The residual is \(Q_n-T\), and the quadratic-variation sum fluctuates. Its \(L^2\) convergence and decreasing variance are statements about the sequence of random variables, not a pathwise monotonicity guarantee. The useful numerical conclusion is statistical: at equal grid size \(n\), compare residuals across paths at that same \(n\), and compare their empirical mean-square size with \(2T^2/n\).
Check Your Understanding
Use the exact grid identity and, where relevant, the equal-grid residual theorem.
- For increments \(\tfrac13\) and \(-\tfrac13\) on \([0,1]\), compute the left-endpoint sum, the test residual, and \(Q_2-T\).
- For an equal grid on \([0,T]\), derive the variance of \(R_n\) from the second and fourth moments of a normal increment.
- Explain why a zero residual on one simulated path does not show that every squared increment equals its time step.
- For \(T=2\) and \(n=8\), compute the theoretical mean-square residual and root-mean-square residual.
- State the error produced by using \(B_T^2\approx2S_n\) instead of \(B_T^2\approx2S_n+T\), and identify the missing term.