Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Common Random Numbers for Paired Comparisons

Exam ASTAM · Simulation Precision and Design · Tutorial 655 of 979

Common Random Numbers for Paired Comparisons

Use shared simulated scenarios to compare alternatives efficiently, calculate paired standard errors, and check whether the induced covariance actually reduces simulation error.

Intermediate 11 min read

What You'll Learn

  • Define common random numbers and paired output differences for comparing simulated alternatives.
  • Derive the variance of a paired estimator and contrast it with independent simulation.
  • Calculate the effect of positive covariance on standard errors and simulation precision.
  • Recognize why shared inputs do not guarantee a variance reduction.
  • Estimate uncertainty from the observed differences across independent simulation pairs.
  • Avoid common errors involving unmatched outputs and incorrectly calculated standard errors.

Why Pair Simulations?

Suppose an actuary must compare the expected cost of two hypothetical benefit designs. A simulation estimates each expected cost, but the quantities of interest are often not the two estimates separately; they are their difference. If the designs are evaluated on unrelated simulated scenarios, random variation in the scenarios can obscure the comparison. Evaluating both designs on the same scenarios can make their outputs move together, allowing much of that shared variation to cancel in the difference.

This technique is called common random numbers (CRN). It is a form of paired simulation: each simulated scenario produces one output under each alternative, and the comparison is made within each pair. The method is useful only if the pairing preserves the correct marginal distribution for each alternative. Whether it improves precision depends on the covariance between paired outputs. The method and calculations below are aligned with the SOA Exam ASTAM (Advanced Short-Term Actuarial Mathematics) syllabus.

Definition: In a common-random-numbers simulation, each replication uses the same underlying random inputs to generate outputs for two alternatives. For replication \(i\), write the outputs as \(Y_{Ai}\) and \(Y_{Bi}\), and define the paired difference \(D_i=Y_{Ai}-Y_{Bi}\). The estimator of the difference in expected outputs is \(\bar{D}=\frac{1}{n}\sum_{i=1}^n D_i\).

The shared input may be one uniform random variable or a vector of inputs representing, for example, claim counts, severities, weather conditions, or policy characteristics. The alternatives need not use those inputs in the same way. They do need to be evaluated on corresponding scenarios, and the scenarios must be independently generated from one replication to the next for the standard independent-pairs variance calculation.

Variance of a Paired Comparison

Assume the \(n\) replication pairs are independent and identically distributed, with finite output variances. Within a pair, \(Y_{Ai}\) and \(Y_{Bi}\) may be dependent. The estimator \(\bar{D}\) is unbiased for \(E[Y_A]-E[Y_B]\), since expectation is linear. Its variance depends on the covariance created by pairing.

$$ \operatorname{Var}(\bar{D}) = \frac{\operatorname{Var}(Y_A)+\operatorname{Var}(Y_B)-2\operatorname{Cov}(Y_A,Y_B)}{n}. $$

The equation follows from applying the variance rule to one difference and then averaging independent replication differences. In particular, \(\operatorname{Var}(Y_A-Y_B)=\operatorname{Var}(Y_A)+\operatorname{Var}(Y_B)-2\operatorname{Cov}(Y_A,Y_B)\). Independence across pairs makes the variance of their average the variance of one difference divided by \(n\).

1
Define one paired difference.
For a replication, \(D=Y_A-Y_B\), so \(\operatorname{Var}(D)=\operatorname{Var}(Y_A-Y_B)\).
2
Expand the variance.
Using \(\operatorname{Var}(X-Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)-2\operatorname{Cov}(X,Y)\), obtain the variance of one paired difference.
3
Average independent pairs.
Because the \(D_i\) are independent with the same variance, \(\operatorname{Var}(\bar{D})=\operatorname{Var}(D)/n\).

For comparison, if the alternatives are estimated using independent samples of size \(n\), the estimator \(\bar{Y}_A-\bar{Y}_B\) has variance \(\{\operatorname{Var}(Y_A)+\operatorname{Var}(Y_B)\}/n\). Thus, when the paired design leaves the two marginal output distributions unchanged, its variance differs from the independent-simulation variance by \(-2\operatorname{Cov}(Y_A,Y_B)/n\). Positive covariance reduces variance; zero covariance gives no variance change; negative covariance increases it.

Theorem: Common random numbers reduce the variance of a simulated difference relative to independent simulations of the same size if and only if the covariance of the two outputs within a pair is positive. Sharing inputs alone does not establish that this condition holds.

In practice, the variance of the paired estimator is estimated from the observed differences, not by treating the two columns of outputs as independent. If \(s_D^2=\frac{1}{n-1}\sum_{i=1}^n(D_i-\bar{D})^2\), the estimated Monte Carlo standard error is \(s_D/\sqrt{n}\). This calculation accounts for the observed within-pair relationship.

Worked Comparisons

Worked Example: Shared Uniform Input for Two Benefit Designs

A hypothetical insurer compares two payment rules for a single simulated claim. Let \(U\sim\operatorname{Uniform}(0,1)\). Design A pays \$100 when \(U\geq 0.50\), and otherwise pays \$0. Design B pays \$50 when \(U\geq 0.25\), and otherwise pays \$0. Use the same \(U\) for both designs. Find the expected payment difference \(E[Y_A]-E[Y_B]\), and compare the variance of the paired estimator with that of independent simulations, using \(n=1{,}000\).

Method. Partition the range of \(U\) at both payment thresholds. In each interval, record both outputs and their difference \(D=Y_A-Y_B\).

Range of \(U\)Probability\(Y_A\)\(Y_B\)\(D\)
\(0\leq U<0.25\)0.25\$0\$0\$0
\(0.25\leq U<0.50\)0.25\$0\$50\(-\$50\)
\(0.50\leq U<1\)0.50\$100\$50\$50

The marginal means are \(E[Y_A]=0.50(100)=\$50\) and \(E[Y_B]=0.75(50)=\$37.50\). Therefore, \(E[D]=\$50-\$37.50=\$12.50\). The paired-difference second moment is \(E[D^2]=0.25(0^2)+0.25(50^2)+0.50(50^2)=\$1{,}875\). Hence \(\operatorname{Var}(D)=1{,}875-(12.50)^2=\$1{,}718.75\) (in squared dollars).

For the independent design, \(\operatorname{Var}(Y_A)=0.50(100^2)-50^2=2{,}500\), and \(\operatorname{Var}(Y_B)=0.75(50^2)-37.50^2=468.75\). Its difference variance per replication is \(2{,}500+468.75=2{,}968.75\). Equivalently, the paired covariance is \(E[Y_AY_B]-E[Y_A]E[Y_B]=0.50(100)(50)-(50)(37.50)=625\), giving \(2{,}968.75-2(625)=1{,}718.75\).

With \(1{,}000\) pairs, the paired standard error is \(\sqrt{1{,}718.75/1{,}000}=\$1.31\), rounded to the nearest cent. Independent simulations of \(1{,}000\) outputs per design give standard error \(\sqrt{2{,}968.75/1{,}000}=\$1.72\), also rounded to the nearest cent. Check: the paired mean difference is \$12.50, matching the difference between the two marginal means. The positive covariance reduces the estimated difference's variance.

Common mistake avoided: using the sum of the marginal variances for the paired design would omit the covariance term and incorrectly report the independent-simulation standard error.

Worked Example: Comparing Two Capped Claim Payments

For a hypothetical policy, the claim loss \(X\) is \$0, \$200, or \$600 with probabilities 0.25, 0.50, and 0.25, respectively. Under Plan A, the insurer pays the loss above a \$100 deductible, subject to a maximum payment of \$300. Under Plan B, it pays the loss above a \$200 deductible, subject to a maximum payment of \$250. Use the same simulated loss for both plans. Calculate the expected difference \(E[Y_A]-E[Y_B]\), and compare the standard errors for \(n=400\).

Method. For a deductible \(d\) and maximum payment \(u\), the payment is \(Y=\min(\max(X-d,0),u)\). Apply this formula separately to each plan for each possible loss.

Loss \(X\)ProbabilityPlan A paymentPlan B paymentDifference \(D\)
\$00.25\$0\$0\$0
\$2000.50\(\min(100,300)=\$100\)\(\min(0,250)=\$0\)\$100
\$6000.25\(\min(500,300)=\$300\)\(\min(400,250)=\$250\)\$50

The expected payments are \(E[Y_A]=0.25(0)+0.50(100)+0.25(300)=\$125\) and \(E[Y_B]=0.25(0)+0.50(0)+0.25(250)=\$62.50\). Thus \(E[D]=\$62.50\). The second moment of the paired difference is \(E[D^2]=0.25(0^2)+0.50(100^2)+0.25(50^2)=\$5{,}625\). Its variance is \(5{,}625-(62.50)^2=\$1{,}718.75\).

For a direct covariance check, \(E[Y_A^2]=0.50(100^2)+0.25(300^2)=27{,}500\), so \(\operatorname{Var}(Y_A)=27{,}500-125^2=11{,}875\). Also, \(E[Y_B^2]=0.25(250^2)=15{,}625\), so \(\operatorname{Var}(Y_B)=15{,}625-62.50^2=11{,}718.75\). Since both payments are positive together only at \(X=\$600\), \(E[Y_AY_B]=0.25(300)(250)=18{,}750\), and \(\operatorname{Cov}(Y_A,Y_B)=18{,}750-(125)(62.50)=10{,}937.50\). Therefore the paired variance is \(11{,}875+11{,}718.75-2(10{,}937.50)=1{,}718.75\), as calculated from \(D\).

At \(n=400\), the paired standard error is \(\sqrt{1{,}718.75/400}=\$2.07\), rounded to the nearest cent. The independent-simulation variance per replication is \(11{,}875+11{,}718.75=23{,}593.75\), giving standard error \(\sqrt{23{,}593.75/400}=\$7.68\), rounded to the nearest cent. Check: the paired difference has mean \$62.50, equal to \$125 minus \$62.50.

Common mistake avoided: applying the deductible or payment cap inconsistently can create incorrect outputs before any variance calculation begins. Here each plan has its own deductible and cap, but both are applied to the same underlying loss.

Worked Example: When Shared Inputs Increase Variance

Consider two hypothetical designs whose costs respond in opposite ways to a simulated operating condition \(U\sim\operatorname{Uniform}(0,1)\): \(Y_A=100U\) dollars and \(Y_B=100(1-U)\) dollars. Evaluate both using the same \(U\). Find the variance per replication of the paired difference and compare it with the variance under independent inputs.

Each output has mean \(100(1/2)=\$50\). Since \(\operatorname{Var}(U)=1/12\), each output has variance \(100^2/12=833.3333\) squared dollars. With shared \(U\), \(D=Y_A-Y_B=100(2U-1)\), whose mean is zero. Also, \(\operatorname{Var}(2U-1)=4\operatorname{Var}(U)=1/3\), so \(\operatorname{Var}(D)=100^2/3=3{,}333.3333\) squared dollars.

Under independent inputs, the variance of the difference is \(833.3333+833.3333=1{,}666.6667\) squared dollars. The shared-input covariance is negative: \(\operatorname{Cov}(100U,100(1-U))=-100^2/12=-833.3333\), so the paired variance is \(833.3333+833.3333-2(-833.3333)=3{,}333.3333\). Check: pairing doubles the variance here, and multiplies the standard error by \(\sqrt{2}\). The negative covariance makes common random numbers counterproductive for this comparison.

Common mistake avoided: assuming that pairing always improves precision. In this example, the shared input is valid for both marginal models, but the outputs move in opposite directions.

Practical Checks and Common Traps

A useful implementation begins by deciding what one replication represents and how its inputs are shared. The aim is not to force the alternatives to have identical outputs; it is to make each pair represent the same simulated circumstances. After running the simulation, calculate the differences \(D_i\) and examine their sample variance. A lower variance of differences means a smaller estimated Monte Carlo standard error for the same number of pairs.

  • Do not change either alternative's marginal model. Reusing a uniform variate is appropriate only when each alternative's transformation of that variate produces the intended output distribution.
  • Do not pair unrelated scenarios after simulation. Pairing is meaningful when the outputs in a pair arise from deliberately shared inputs, not merely because they happen to occupy the same row in a data table.
  • Do not calculate the paired standard error from the two sample variances alone. Use the sample variance of \(D_i=Y_{Ai}-Y_{Bi}\), which includes the empirical covariance.
  • Do not assume the benefit is guaranteed. Positive covariance is helpful; negative covariance can make the paired comparison less precise than independent simulation.
  • Keep replications independent across pairs. The variance formula above assumes independent pairs. If the simulation design creates dependence between different pairs, that formula does not apply without adjustment.

The key diagnostic is the variance of the paired differences, not whether the simulated outputs look similar and not whether the same random-number seed was used. A correct comparison keeps each alternative's model intact, aligns scenarios deliberately, and evaluates the resulting differences.

Key takeaway: For \(n\) independent simulation pairs, estimate the difference in expected outputs by averaging the within-pair differences. Common random numbers improve precision exactly when they induce positive covariance between the paired outputs, and the standard error should be calculated from the differences themselves.

Check Your Understanding

For each question, assume independent replications across pairs. Answers are provided so you can check both the pairing calculation and its interpretation.

  1. Paired outputs have variances 64 and 36, and covariance 12. With \(n=100\), find the estimated variance and standard error of the paired difference if these values are treated as the replication variance and covariance. (Answer: variance \(0.76\); standard error \(0.8718\).)
  2. Let \(U\sim\operatorname{Uniform}(0,1)\). Alternative A pays \$20 if \(U\geq0.40\), otherwise \$0. Alternative B pays \$30 if \(U\geq0.30\), otherwise \$0. Using shared \(U\), find \(E[Y_A-Y_B]\). (Answer: \(-\$9.00\).)
  3. For paired outputs, \(\operatorname{Var}(Y_A)=9\), \(\operatorname{Var}(Y_B)=16\), and \(\operatorname{Cov}(Y_A,Y_B)=5\). With 25 pairs, calculate the paired standard error and the standard error for independent simulations with 25 outputs per alternative. (Answer: paired \(0.7746\); independent \(1.0000\).)
  4. Two outputs have variances 100 and 80, with covariance \(-10\) under a proposed pairing. For \(n=50\), compare the paired and independent estimator variances. State whether the pairing helps. (Answer: paired variance \(4.00\); independent variance \(3.60\); pairing increases variance.)
  5. A paired difference has replication variance 144. What is the smallest integer number of pairs needed for a Monte Carlo standard error no greater than 0.60? (Answer: \(400\) pairs.)
Clinical Biostats