Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 38 ยท Variance Reduction

Antithetic Variates

Pair each random draw with its mirror image to cancel noise. Learn antithetic variates, when they work, and measure the gain in Python.

A Monte Carlo estimate is only as good as its variance. The standard error of a sample mean shrinks like ฯƒ/โˆšN, so to halve the error you need four times the samples. That gets expensive fast. Variance reduction methods try a smarter route: keep the estimator unbiased but make each sample carry more information, so you reach a target accuracy with far fewer runs.

The first and simplest method is the antithetic variates trick. Instead of drawing independent random numbers, you draw them in pairs that are deliberately opposite. When one draw lands too high, its partner tends to land too low, and the errors cancel in the average.

The idea

Say you want E[f(U)] where U is uniform on [0, 1]. If U is uniform, so is 1 โˆ’ U. Both give valid samples, but they are perfectly negatively related: a big U means a small 1 โˆ’ U.

The antithetic estimator averages the pair:

Text
Y = ( f(U) + f(1 โˆ’ U) ) / 2

Y has the same expected value as f(U), so it is unbiased. Its variance, for two evaluations of f, is:

Text
Var(Y) = (ฯƒยฒ / 2) ยท (1 + ฯ)

Here ฯƒยฒ is Var(f(U)) and ฯ is the correlation between f(U) and f(1 โˆ’ U). Compare with two independent draws, whose average has variance ฯƒยฒ/2. The pair only helps when ฯ < 0. If f is monotone (always rising or always falling), then ฯ is negative, and the method helps. If f is symmetric about the midpoint, such as f(u) = (u โˆ’ 0.5)ยฒ, then f(U) = f(1 โˆ’ U), ฯ = 1, and you gain nothing; you even lose, since you pay for two draws to learn one value.

For normal variables the mirror of Z is โˆ’Z. The same reasoning applies: it works well for monotone functions of Z.

A first experiment

We estimate โˆซโ‚€ยน eแต˜ du = e โˆ’ 1 โ‰ˆ 1.71828. The function is increasing, so antithetic pairs should help. To be fair we give both methods the same number of function evaluations: N plain draws against N/2 antithetic pairs.

Python Plain vs antithetic estimate

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

One run proves little, because a single estimate can be lucky. To compare two estimators you must repeat each many times and look at the spread of the results.

Measuring the gain

Below we repeat both estimators 2,000 times with 1,000 function evaluations each, then compare standard deviations and variances.

Python How much variance did we save?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For this integrand the exact correlation is about โˆ’0.97, so the factor 1 + ฯ is only about 0.03: the pair average has roughly 3% of the variance of two independent draws. The variance ratio you see is huge because the function is smooth and increasing. Real problems rarely give such a dramatic win, but the trick is almost free to add.

Using it in practice

  • Always compare at equal cost. Count function evaluations or running time, not the number of random draws.
  • Works best for monotone functions of the inputs, such as payoffs that grow with the underlying price.
  • Many inputs. Flip every input in the pair: (Uโ‚, โ€ฆ, Uโ‚–) pairs with (1 โˆ’ Uโ‚, โ€ฆ, 1 โˆ’ Uโ‚–). Monotone in every input still gives ฯ < 0.
  • Combine with other methods: antithetic pairs are often layered on top of control variates or stratified sampling.

Do not treat the 2N values as independent when you compute a standard error. Average each pair first, then compute the standard error from the N/2 pair means.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. For which kind of function do antithetic variates reduce variance?

    A monotone function makes f(U) and f(1-U) negatively correlated, so their average has lower variance.
  2. 2. If rho is the correlation between f(U) and f(1-U), the pair-average variance is:

    Var((A+B)/2) = (Var A + Var B + 2 Cov)/4 = (sigma^2/2)(1 + rho).
  3. 3. Why must you compare estimators at equal cost?

    An antithetic pair costs two evaluations, so a fair test gives plain Monte Carlo twice as many draws.
  4. 4. What happens for f(u) = (u - 0.5)^2?

    The function is symmetric, so the mirror draw repeats the same value and rho = 1.

Summary

  • Antithetic variates pair each draw U with 1 โˆ’ U (or Z with โˆ’Z) and average the pair.
  • The estimator stays unbiased; the pair variance is (ฯƒยฒ/2)(1 + ฯ).
  • It helps when f is monotone, and does nothing for symmetric functions.
  • Compare against plain Monte Carlo using the same number of function evaluations, and repeat runs to see the spread.

Next: Control Variates