On this page
To estimate an integral like ∫₀¹ f(x) dx, you can average f at N points spread over the interval. Ordinary Monte Carlo picks those points at random. Quasi-Monte Carlo picks them on purpose, so that they cover the interval as evenly as possible, and the payoff is a much smaller error for the same number of points.
What is quasi-Monte Carlo integration?
Random points clump and leave gaps. The error of plain Monte Carlo falls like 1/√N, while quasi-Monte Carlo has a rate of convergence close to 1/N, according to the overview of the quasi-Monte Carlo method. With a 1/√N rate, getting 10 times more accuracy costs 100 times more points; with a 1/N rate it costs about 10 times more.
How evenly the points are spread is measured by their discrepancy: for a low-discrepancy sequence, the share of points that fall in any box is close to that box's size. The Koksma–Hlawka inequality turns this into a guarantee: the integration error is bounded by the discrepancy of the points times a measure of how much the function varies (quasi-Monte Carlo method).
How do you build the van der Corput sequence?
The van der Corput sequence was first described in 1935 by the Dutch mathematician J. G. van der Corput. To get its n-th point, write n in binary, reverse the digits, and put them after the binary point:
1 = 1₂ becomes 0.1₂ = 1/2
2 = 10₂ becomes 0.01₂ = 1/4
3 = 11₂ becomes 0.11₂ = 3/4
4 = 100₂ becomes 0.001₂ = 1/8
5 = 101₂ becomes 0.101₂ = 5/8
6 = 110₂ becomes 0.011₂ = 3/8
7 = 111₂ becomes 0.111₂ = 7/8
1/2 cuts the interval in half, 1/4 and 3/4 split the halves, then 1/8, 5/8, 3/8 and 7/8 fill the quarters. After 2^m − 1 points you have exactly the fractions 1/2^m, 2/2^m, …, (2^m − 1)/2^m. Another sequence built from binary digits is the binary reflected Gray code.
Worked example: how close does it get to ∫₀¹ x² dx?
The exact answer is 1/3 ≈ 0.3333. Average x² over the first few van der Corput points:
N = 3 (1/2, 1/4, 3/4): (1/4 + 1/16 + 9/16) / 3 = 7/24 ≈ 0.2917, error 0.0417.
N = 7 (add 1/8, 5/8, 3/8, 7/8): (140/64) / 7 = 5/16 = 0.3125, error 0.0208.
N = 15: the points are j/16 for j = 1 to 15, and the average is 31/96 ≈ 0.3229, error 0.0104.
The error halves each time N roughly doubles. You can prove the pattern: with M = 2^m, the first M − 1 points are j/M, the sum of their squares is (M − 1)M(2M − 1)/(6M²), and dividing by M − 1 gives 1/3 − 1/(6M). So the error is exactly 1/(6(N + 1)), a 1/N rate. At N = 1023 it is 1/6144, about 0.00016.
Now compare random points. If x is uniform on [0, 1], x² has variance 1/5 − 1/9 = 4/45, so the typical error of a random average is √(4/45)/√N ≈ 0.30/√N. At N = 1023 that is about 0.0093, roughly 57 times the van der Corput error, in line with the two rates above.
The trapezoidal rule and Simpson's rule are efficient for smooth one-dimensional integrals, but their function evaluations grow exponentially with dimension (quasi-Monte Carlo method). That is where quasi-Monte Carlo earns its keep.
How do Halton points extend this to 2D?
J. H. Halton generalised the idea in a 1960 paper in Numerische Mathematik, "On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals". A Halton sequence uses a different coprime base for each coordinate: base 2 for x and base 3 for y. In base 3 the reversed digits give 1/3, 2/3, 1/9, 4/9, 7/9, …, so the first Halton points are (1/2, 1/3), (1/4, 2/3), (3/4, 1/9) and (1/8, 4/9).
There is a catch in high dimensions. The bound for quasi-Monte Carlo grows like (log N)^s/N in s dimensions, and a poorly chosen sequence can be much worse than Monte Carlo there (quasi-Monte Carlo method). Halton coordinates built from higher primes such as 17 and 19 are perfectly linearly correlated in their first 16 pairs, which is why people drop the first entries or use scrambled and leaped versions (Halton sequence). When random sampling is still the right tool, importance sampling is another way to cut its error.
How can you practise this in 20 minutes?
Write the first 15 base-2 points by hand and mark them on a number line.
Estimate ∫₀¹ x³ dx (exact 1/4) with N = 3, 7 and 15; check that the error roughly halves.
Repeat with calculator random numbers and compare.
Plot the first nine base-3 points against base 2.
If the Riemann sums or variance behind this feel shaky, the Fermi Concept Library gives every mathematics concept its own lesson and its place in the map.



