VerifiedEvidence: highv1.0.0

Pseudo-Random Number

A number generated by a deterministic algorithm that approximates the statistical properties of true randomness, used because genuine randomness is hard to compute.

Last reviewedDarrin Baines IP Ltd

Concept Architecture

Concept

Theoretically, Pseudo-Random Number is a deterministically generated numerical value designed to approximate the statistical properties of a truly random number. Pseudo-random numbers are produced by mathematical algorithms that generate sequences with long periods and desirable statistical characteristics while remaining reproducible from an initial seed value. In health economics, they provide the foundation for stochastic simulation methods, including Monte Carlo simulation, microsimulation and probabilistic sensitivity analysis.

Mathematically, a pseudo-random number is generated recursively by a deterministic algorithm in which each value depends on the previous state and an initial seed. The generated sequence approximates independent samples from a uniform probability distribution over the interval (0,1), allowing transformation into other probability distributions through recognised sampling methods. The specific recurrence relation depends on the random number generator employed.

In practice, pseudo-random numbers are generated automatically by statistical software, programming languages and modelling platforms. They are used to sample transition probabilities, event times, costs, utilities and other uncertain model parameters. Setting the same seed value reproduces the identical sequence of pseudo-random numbers, enabling reproducible analyses, model validation and sensitivity testing.


Purpose

Used to generate reproducible stochastic samples for simulation models, probabilistic sensitivity analysis and numerical estimation in health economic evaluations.


Mathematical Formulae

Primary Formula

Linear congruential generator (classical example):

X??? = (aX? + c) mod m

U? = X? / m

where:

  • X? is the internal integer state
  • a is the multiplier
  • c is the increment
  • m is the modulus
  • U? is the pseudo-random number on the interval (0,1).

Supporting Formulae

Transformation to a standard normal variate (inverse transform method):

Z = �??(U)

where:

  • U is a pseudo-random uniform variate
  • �?? is the inverse standard normal cumulative distribution function.

Related Mathematical Methods

  • Random number generation
  • Linear congruential generators
  • Mersenne Twister
  • Inverse transform sampling
  • Acceptance-rejection sampling
  • Monte Carlo simulation
  • Probabilistic sensitivity analysis

Example

A probabilistic sensitivity analysis requires annual treatment costs to be sampled from a gamma distribution. A pseudo-random number generator produces:

U = 0.6732

This value is transformed using the inverse cumulative distribution function of the specified gamma distribution to obtain one sampled treatment cost for a single simulation iteration. Repeating this process over 10,000 iterations produces the empirical distribution of total costs used in the economic evaluation.


Excel Implementation

FunctionExample FormulaHealth Economics Application
RAND=RAND()Generate pseudo-random numbers for simulation.
RANDARRAY=RANDARRAY(1000,1)Generate multiple pseudo-random samples for Monte Carlo analyses.
NORM.INV=NORM.INV(RAND(),0,1)Transform uniform pseudo-random numbers into normally distributed values.
BETA.INV=BETA.INV(RAND(),2,5)Sample utility values or probabilities from a beta distribution.
GAMMA.INV=GAMMA.INV(RAND(),4,500)Sample positively skewed healthcare costs.

VBA (Optional)

Automate large-scale stochastic simulations by generating reproducible pseudo-random number sequences from a specified seed value.


Sources

  • Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press; 2006.
  • Robert CP, Casella G. Monte Carlo Statistical Methods. 2nd ed. Springer; 2004.
  • Gentle JE. Random Number Generation and Monte Carlo Methods. 2nd ed. Springer; 2003.
  • ISPOR-SMDM Modeling Good Research Practices Task Force. Modeling Good Research Practices. Value in Health. 2012.
  • National Institute for Health and Care Excellence (NICE). Health Technology Evaluation Manual. Latest edition.

Library

Tools & Resources

1
  • Other

    hesim — Health Economic Simulation Modeling and Decision Analysis (R package) — Devin Incerti & Jeroen P. Jansen, R package ed., 2024 (CRAN)

    A modular, computationally efficient R package for building and analysing health economic simulation models — cohort state-transition, partitioned survival, and individual-level continuous-time models — with fast individual-patient simulation and PSA via C++.

Frequently Asked Questions (6)

  • What is a pseudo-random number?

    A number generated by a deterministic algorithm that approximates the statistical properties of true randomness, used because genuine randomness is hard to compute.

    Source: Press et al. 2007

  • How does a pseudo-random number differ from a truly random one?

    A truly random number has no pattern and cannot be predicted or reproduced, whereas a pseudo-random number is produced by a fixed rule that only imitates randomness. Given the same starting point, the rule generates exactly the same sequence every time, so the numbers are not genuinely unpredictable. They are used because they pass statistical tests for randomness closely enough while remaining fast to compute and, importantly, reproducible. That reproducibility is a feature rather than a flaw for modelling. Press and colleagues (2007) explain the distinction.

    Source: Press et al. 2007

  • Why are pseudo-random numbers used instead of true random numbers?

    Pseudo-random numbers are used because true randomness is difficult and slow to obtain in a computer, whereas a deterministic algorithm can generate numbers quickly that behave, for statistical purposes, like random ones. The sequence, though reproducible from its algorithm, passes tests of randomness well enough for simulation and sampling. This makes pseudo-random numbers practical for the large volumes of random draws that Monte Carlo methods require, providing apparent randomness efficiently and, usefully, reproducibly.

    Source: Press et al. 2007

  • What properties should pseudo-random numbers have?

    Good pseudo-random numbers should be uniformly distributed, statistically independent, and free of detectable patterns, passing tests of randomness, and the generator should have a very long period before the sequence repeats. Poor generators can show correlations or short periods that bias results. Because simulations may draw enormous quantities of numbers, the quality of the generator matters, so well-tested algorithms are used to ensure the pseudo-random numbers adequately mimic true randomness for the computation.

    Source: Press et al. 2007

  • How are pseudo-random numbers used in Monte Carlo simulation?

    In Monte Carlo simulation, pseudo-random numbers provide the random draws needed to sample values from probability distributions, so that inputs can be varied across many iterations and the distribution of outputs examined. Each sampled value is derived from pseudo-random numbers transformed to follow the required distribution. Because such simulations, including probabilistic sensitivity analysis, may require millions of draws, pseudo-random numbers supply the randomness efficiently, making the method practical while their reproducibility allows results to be repeated exactly.

    Source: Metropolis & Ulam 1949

  • What are the limitations of pseudo-random numbers?

    Because pseudo-random numbers are produced deterministically, they are not truly random and repeat after their period, and poor generators can contain hidden correlations or patterns that bias simulations relying on independence. A generator with too short a period or subtle regularities can distort results, particularly in large simulations. These limitations mean the generator must be well tested and suited to the scale of use, so that the pseudo-random numbers behave sufficiently like true randomness for the analysis to be valid.

    Source: Press et al. 2007

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 8 Oct 2025

Content version: 1.0.0

Canonical Identity

Term code
HE-EM-MS-007

Stable URI · Machine-readable · Resolvable · CC BY 4.0