Learn
Lesson · Simulation and Variance Reduction · Moving the covariance

Antithetic Variates

Take a draw U, take its opposite 1 − U, and average the two results. If the quantity is monotone in U the two move in opposite directions, the covariance is negative, and the variance of the pair mean falls — to exactly zero in the best case. If the quantity is symmetric about 1/2 the two are identical, the covariance is maximally positive, and the pair costs two draws to produce an observation no better than one.

pair U with 1 − U; the pair mean is (g(U) + g(1 − U))/2 Var(pair mean) = (Var A + Var B + 2 Cov(A, B))/4 the sign of Cov decides g monotone in U ⟹ Cov < 0; here exactly −1 correlation and Var = 0 g symmetric about 1/2 ⟹ g(1 − U) = g(U); correlation +1, and twice the work the honest comparison is against an INDEPENDENT PAIR, not against one draw inverse-transform sampling is monotone in U by construction
One pairing, and the two things it can do

Core ideas

What this lesson establishes

Three ideas. The first is the mechanism, the second is the condition, and the third is the accounting error that lets this technique take credit it has not earned.

1

A pair is one observation, not two draws

The estimator is the average of the pair means, and each pair mean is one observation of it. That is the whole of the accounting, and it is the only way to compare fairly: a pair consumes two draws, so it must be judged against an independent pair, which also consumes two.

2

Monotonicity is the condition, and it is a real one

If g is non-decreasing in U then g(U) and g(1 − U) move in opposite directions and their covariance is negative — that is the whole argument. Inverse-transform sampling is monotone in U by construction, which is why the technique is available at all on this path. Where monotonicity fails the covariance can be positive, and then the pairing costs rather than pays.

3

The variance of the pair mean has the covariance in the numerator

Var((A + B)/2) = (Var A + Var B + 2 Cov(A, B))/4. With A and B identically distributed this is (Var A + Cov)/2, against Var A/2 for an independent pair. The entire effect is the covariance term, and it can take the variance anywhere from zero to twice the independent value.

The material

A draw and its opposite, in the best case and in the worst

How pairing induces a covariance, what monotonicity has to do with its sign, and what the pair has to be compared against.

Definition · Antithetic pair

Given one uniform draw U, the antithetic pair is U and 1 − U. If U is uniform on [0, 1) then so is 1 − U, so each half of the pair is a legitimate draw and the estimator built on the pair mean is unbiased for the same quantity as the ordinary one.

Theorem · The variance of a pair mean

For A = g(U) and B = g(1 − U) with the same distribution, Var((A + B)/2) = (Var A + Cov(A, B))/2. An independent pair has Cov = 0 and therefore variance Var A/2, so the antithetic pair is better exactly when Cov(A, B) < 0 and worse exactly when it is positive.

Var((A + B)/2) = (Var A + Var B + 2 Cov(A, B))/4, which is the expansion of the variance of a sum divided by four.

A and B have the same distribution, because U and 1 − U do, so Var B = Var A and the expression is (2 Var A + 2 Cov)/4 = (Var A + Cov)/2. Setting Cov = 0 gives the independent-pair value Var A/2, and the comparison is the sign of Cov.

□

So the technique has no magic in it and no tuning: it is a choice about which second draw to take, and the choice is good or bad according to the sign of one number. The panel prints that number.

The best case, and it is exact

Example · A monotone quantity: g(U) = 1 when U is at least 1/2

Sixty-four pairs from the standard stream. Whenever U ≥ 1/2 the partner 1 − U is below 1/2, and conversely, so one of the two is always 1 and the other always 0: every pair mean is exactly 1/2. The sample variance of the pair means is exactly 0, the correlation within a pair is exactly −1, and an independent pair would have had variance 247/2016.

Look at what that does to the estimate. The sixty-four single draws came out 1 thirty-eight times, so an ordinary estimator on the same draws would report 19/32 = 0.59375 against a true value of 1/2. The antithetic estimator reports 1/2, exactly, because every pair mean is 1/2, exactly. The variance is not small here; it is zero, and the arithmetic says so rather than the picture.

The worst case, and it is exactly twice as bad

Example · A symmetric quantity: g(U) = the distance from U to 1/2

|(1 − U) − 1/2| = |1/2 − U|, so g(1 − U) is g(U) identically: the two halves of the pair are the same number. The correlation is exactly +1, the pair mean has exactly the variance of a single draw — both 0.022439, exact fractions shown to six places — and an independent pair would have had 0.011219. The ratio is exactly 2.

Two draws were consumed to produce one observation that is no better than one draw. That is not a mild disappointment; it is exactly double the work for exactly the same width, and it is what happens when the condition fails. A reader who has only ever seen the technique work cannot tell the condition from the conclusion, which is why both cases are on the page rather than one of them being mentioned in a footnote.

64 pairs, the same stream, the same seed monotone g symmetric g exact mean 1/2 1/4 Var of one draw 247/1008 0.022439 Var, independent pair 247/2016 0.011219 Var, antithetic pair 0 0.022439 Cov within a pair −247/1008 0.022439 squared correlation 1 1 antithetic / independent 0 2 same squared correlation, opposite sign, opposite result

The squared correlation is 1 in both columns, and that is the sharpest way to see why ρ² is not the whole story here. ρ² = 1 says the two halves of the pair determine each other; the sign of the covariance says whether that is worth nothing or worth everything. Later on this course ρ² is exactly the right summary, because there the sign has been optimised away; here it is not.

Why this is available at all on this path

Inverse-transform sampling returns the first value whose cumulative probability reaches U, so a larger U never gives a smaller value: the sampler is monotone in U by construction. Any quantity that is a non-decreasing function of the sampled values is therefore monotone in U, and the pairing is guaranteed to have a negative covariance. That is a property of the method built in the opening lesson of this course, not a lucky feature of the examples.

It stops being guaranteed the moment a run uses more than one draw in a way that is not monotone in each of them, which is most interesting simulations. The queue runs earlier on this course are not monotone in the service draws in any useful sense, which is why the pairing is demonstrated here on functions of a single draw, where the claim can be exact, rather than asserted on a system where it would have to be hoped for.

Interactive

Antithetic variates

Pair U with 1 − U: a negative covariance halves the width, and a positive one wastes the draw

Pair each draw with its oppositethe pair table, the pair mean, and the variance that follows from the sign of the covariance
the pair meanthe draw from Uthe draw from 1 minus Uthe exact expectation

Method

Pairing draws, and accounting for them

Four steps, and the last is the one that decides whether the technique is being measured or flattered.

1

Check that the quantity is monotone in the draw

Not “roughly increasing” — monotone. If a larger U can give a smaller output anywhere, the covariance is not guaranteed negative, and the technique becomes something to measure rather than something to rely on.

2

Use U for one half of the pair and 1 − U for the other

Both halves are uniform, so both are legitimate draws, and each half on its own is an unbiased sample. Nothing about the model changes; only the second draw's provenance does.

3

Average within the pair first, and treat the pair mean as the observation

The sequence of pair means is what the estimator is built from. Its length is half the number of draws, and that is the correct denominator for every variance computed afterwards.

4

Compare against an independent pair, never against a single draw

A pair costs two draws either way. Comparing an antithetic pair mean against one draw makes the technique look like a factor-of-two improvement even when the covariance is zero, which is how it is routinely credited with a reduction it did not make.

Pairs, signs and fair comparisons

Score 0 / 0

Sixty-four pairs, the best case and the worst, on the same draws

The two quantities are functions of a single uniform draw, which is what makes both claims exact rather than measured. g(U) = 1 when U ≥ 1/2 is monotone and has mean 1/2; g(U) = |U − 1/2| is symmetric about 1/2 and has mean 1/4.

monotone case: g(U) = 1 if U ≥ 1/2, else 0 pair U 1 − U g(U) g(1−U) pair mean (both exact fractions, shown to five places) 1 0.93425 0.06575 1 0 1/2 2 0.87963 0.12037 1 0 1/2 3 0.00891 0.99109 0 1 1/2 4 0.73728 0.26272 1 0 1/2 5 0.49863 0.50137 0 1 1/2 … sixty-four rows, every pair mean 1/2 … Var of the pair means 0 exactly Cov within a pair −247/1008 Var of one draw 247/1008 Var of an independent pair 247/2016 the single draws alone average 19/32 = 0.59375 the pair means average 1/2 exactly symmetric case: g(U) = |U − 1/2| every pair mean equals the draw itself Var of the pair mean 0.022439 Var of one draw 0.022439 the same number Var of an independent pair 0.011219 antithetic / independent 2 exactly

The 19/32 is the figure to keep. Thirty-eight of the sixty-four single draws landed above 1/2, which is a perfectly ordinary sixty-four-draw sample and would have produced an estimate of 0.59375 with a standard error of about 0.061. The same draws, paired with their opposites, produce 1/2 with no error at all — not a small error, none.

That happens because this g takes two values and the pairing balances them perfectly. On a monotone g with more values the covariance is still negative and the reduction is still real, but it is partial, and the number to report is the ratio of the two variances rather than the word “antithetic”.

For a faded rehearsal, halve the number of pairs from 64 to 32 in each case. The supplied first move is that in the monotone case nothing whatever happens to the variance of the pair mean: it is zero at every count, because every individual pair mean is 1/2. Say what happens to the symmetric case's ratio, and why that one is also insensitive to the count.

Common mistakes

1
Counting a pair as two independent observationsIt is one observation of the pair mean, and using 2n as the denominator of the variance of the estimator understates it by a factor that depends on the covariance. In the symmetric case it understates it by two, which turns a technique that doubled the cost into one that appears to have halved the width.
2
Assuming the pairing helps because it is called a variance reductionOn g(U) = |U − 1/2| it doubles the variance per unit of work, with the same estimator, the same unbiasedness and the same code. The name describes the intent; the covariance describes the result, and only one of them is printed by the panel.
3
Applying it to a run whose output is not monotone in the drawsA queueing run uses hundreds of draws and is not a monotone function of most of them. Pairing the whole stream with its complement is then a scheme whose covariance has no guaranteed sign, and it has to be measured on the model in hand rather than assumed from the name.

Check your understanding

✓
Finish when the first question about an antithetic scheme is the sign of its covariance.

You should be able to derive Var((A + B)/2) = (Var A + Cov)/2 for identically distributed halves, say why monotonicity in U makes the covariance negative, state the correct comparison and why it is an independent pair, produce the exact zero in the best case and the exact factor of two in the worst, and explain why ρ² is not sufficient to tell those two cases apart.

Note: Both techniques so far move a covariance that is already there for free. The next one pays for it: it brings in a second quantity whose mean is known, and chooses how much of it to subtract. “Control Variates” turns the variance into a quadratic in that choice, finds the vertex exactly, and shows what the wrong choice costs on either side of it.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.