AI Glossary / Probabilistic machine learning / Intermediate

Common random numbers

Definition

Common random numbers is a simulation technique that deliberately shares random inputs between alternatives being compared. The aim is to reduce uncertainty in an estimated performance difference by making both alternatives experience corresponding random conditions.

What it means

A warehouse simulation may compare two staffing plans. If one plan happens to encounter an easy day and the other a difficult day, random circumstances obscure the staffing difference. Sharing simulated arrivals and workload conditions can make the comparison more informative.
Each alternative must still receive inputs with its intended probability distribution. What changes is the relationship between the two simulated runs. The method is especially useful when a difficult simulated circumstance tends to make both alternatives perform worse, so part of that common fluctuation cancels in their difference.

How it works

Define the quantity to compare, such as expected cost under plan B minus expected cost under plan A. Generate paired simulation runs with appropriately shared randomness. Repeat with fresh random inputs across independent pairs, then analyze the differences within pairs.
For outputs A and B, Var(B − A) = Var(B) + Var(A) − 2 Cov(A, B). Positive covariance lowers the variance of the difference relative to independent simulations with the same marginal distributions; negative covariance raises it.
Synchronization matters. Corresponding arrivals, customers, or environmental events should use corresponding random inputs. Simply resetting one seed may fail if the alternatives consume random numbers in different orders. Separate streams or event-indexed randomness can help maintain the intended pairing.

Three practical examples

  • Staffing: compare two service schedules against the same simulated arrival patterns, estimating the change in waiting time across paired days.
  • Inventory: compare reorder policies using corresponding simulated demand and delivery disturbances, while preserving each policy's operational rules.
  • Model-based optimization: evaluate nearby parameter settings using shared simulated disturbances, reducing noise in a finite-difference estimate when the outputs respond similarly.

Think of it this way

Think of testing two umbrellas in the same rain shower. Their difference is easier to judge than if one is tested in drizzle and the other in a storm. The analogy has limits: a simulation must define precisely which inputs correspond, and the two designs may respond differently enough that sharing conditions does not improve the statistical comparison.

Worked example

Consider an original mathematical simulation. Let U be uniform between 0 and 1. Alternative A produces A = 10 + 2U, while B produces B = 12 + 3U. Their expected outputs are 11 and 13.5, so the expected difference is 2.5.
Using common U, the paired difference is D = B − A = 2 + U. Since Var(U) = 1 / 12, Var(D) = 1 / 12.
If A instead uses U and B uses an independent V, the difference is 2 + 3V − 2U. Its variance is 9 / 12 + 4 / 12 = 13 / 12. In this constructed example, sharing randomness makes the difference variance thirteen times smaller.
For illustration, U values 0.1, 0.5, and 0.9 yield differences 2.1, 2.5, and 2.9. These three chosen values demonstrate the arithmetic; they are not evidence from a random experiment. For n independent pairs, the variance of their mean difference is the single-pair variance divided by n.

Illustrative case study

Fictional case: Harbour Scheduling evaluates two dispatch policies in a simulator. Initially, both runs start from the same seed, but one policy schedules additional inspections and therefore draws extra random values. Subsequent demand events no longer match.
The analysts assign demand randomness by simulated day and customer, while giving inspections a separate stream. They verify each policy's input distributions and compare paired differences across independent replications. They also run an independent-input comparison to assess whether pairing actually helps. Harbor records the design and uncertainty before selecting a policy; no real-world improvement is claimed here.

Common misconceptions and mistakes

Using the same seed is not sufficient proof of useful synchronization. Shared randomness is not a license to force identical outputs or suppress variation within each alternative.
Do not treat the two members of a pair as independent when calculating uncertainty. Conversely, repeatedly reusing one scenario does not create independent replications. Common random numbers also does not always reduce variance: the sign and size of output covariance matter. A more precise simulation difference does not establish that the simulator represents the real business accurately.

Business use

The business benefit is a potentially clearer comparison for a fixed simulation budget. This can help when the difference between plausible policies is small compared with variation between simulated days.
Ask for the paired estimate, its uncertainty, the replication design, and a description of shared inputs. Compare computational effort as well as variance reduction. Where decisions are sensitive to modeling assumptions, repeat the comparison under alternative demand or service models. Reducing simulation noise should make those assumptions easier to examine, not hide them.

People also ask

Does this change the expected difference?

Proper coupling preserves each alternative's marginal distribution, so it preserves their expected difference.

Is this the same as a control variate?

No. A control variate uses a variable with known expectation to adjust an estimator. Common random numbers coordinates competing simulations.

Can it make a comparison worse?

Yes. An unfavorable dependence structure can increase the variance of the difference.

Check your understanding

Two outputs each have variance 4. Their covariance under shared randomness is 3. What is the variance of their difference, and what would it be if independent?

Answer: With sharing, it is 4 + 4 − 2 × 3 = 2. With independence, covariance is zero and the variance is 8. The shared design reduces this variance by a factor of four.

Related terms

  • Monte Carlo simulation
  • Covariance
  • Control variates
  • Antithetic variates
  • variance reduction
  • paired comparison
  • control variate
  • pseudorandom number generator
  • simulation optimization

Learn next

Learn expectation and covariance, then reproduce the worked example with many independent pairs. Deliberately reverse one alternative's response to the shared input and observe when the variance benefit disappears. Next, study random-stream synchronization in simulations whose event order can change.

  • Covariance

More in Probabilistic machine learning

  • Classifier guidance - Classifier guidance is a technique for steering diffusion-model generation using gradients from a separate classifier.
  • Cluster assumption - The cluster assumption is a semi-supervised learning assumption that examples within the same meaningful high-density cluster tend to share a class.
  • Collapsed Gibbs sampling - Collapsed Gibbs sampling is a Markov chain Monte Carlo method that integrates some unknown variables out of a probability model, then repeatedly samples the...
  • Compact-support kernel - A compact-support kernel is a kernel that is exactly zero outside a bounded neighborhood.
  • Compactly supported kernel - A compactly supported kernel is a kernel whose nonzero values are confined to a bounded neighborhood.
  • Conditional diffusion model - A conditional diffusion model is a generative model that uses a diffusion-style noise-removal process to produce outputs in response to supplied information.

Sources

Glasserman and Yao, “Some Guidelines and Guarantees for Common Random Numbers,” original paper, introduction and synchronization discussion: https://business.columbia.edu/sites/default/files-efs/pubfiles/4261/glasserman_yao_guidelines.pdf Independent source review: Glasserman and Yao’s original variance identity, covariance dependence and synchronization discussion were read.

Previous: Common noun Next: Common source bias

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer