Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Variance of a strategy difference with and without common random numbers

v(sigma_f, sigma_g, rho, n, s_com, s_ind) = (Var_com, Var_ind, SE_com, SE_ind, VR, H_cut)

Maps the standard deviations of one simulated output under each of two strategies, the correlation between their paired outputs and the number of pairs to the variance and standard error of the estimated difference, once with both strategies on the same random inputs and once with each on its own. HE-FM-CRN-002 takes the standard deviations of the increment in test runs with and without the method and returns the shares removed from the variance and the interval half-width. HE-FM-ANTV-001 uses a correlation within the estimate of one output, and this record uses a correlation between two strategies. HE-FM-AN-004 and HE-FM-BSE-003 hold the same subtraction of a covariance term for a cost difference and an effect difference at a threshold lambda. The standard errors enter the Wald interval of HE-FM-AN-001, and the runs needed for a target standard error of a paired increment are in HE-FM-ABM-003, which computes them for agent-based model runs. Notation follows the Common Random Numbers article.

  • Sampling variance of a paired strategy difference under common random numbers

    Var_com = (sigma_f^2 + sigma_g^2 - 2 * rho * sigma_f * sigma_g) / n; Var_ind = (sigma_f^2 + sigma_g^2) / n; SE_com = sqrt(Var_com); SE_ind = sqrt(Var_ind)

    Gives the sampling variance of an estimated difference in mean output under the two designs Owen compares in equation 8.21. Var_com applies when both strategies run on the same n random inputs and the paired differences are averaged, and Var_ind when each strategy runs on its own n inputs and the two averages are subtracted. The two differ only by the covariance term, so with both standard deviations above zero the paired design has the smaller variance when rho is positive and the larger when rho is negative. Var_com takes the form of SE_INB squared in HE-FM-AN-004 and of Var_INMB in HE-FM-BSE-003 at lambda equal to 1 (derived), records that hold a cost difference and an effect difference and not the outputs of two strategies on shared inputs. Var_ind takes the form of the V_E step of HE-CF-NBA-001 at equal arm sizes, and the square roots give the standard errors that enter HE-FM-AN-001.

  • Variance reduction and half-width cut measured from test runs with and without matched draws

    VR = 1 - (s_com / s_ind)^2; H_cut = 1 - s_com / s_ind

    Expresses the gain measured when a model is run with and without common random numbers, the comparison Murphy and colleagues recommend because the value of the method is model specific. VR is the share of the variance of the incremental output removed, and H_cut is the share of the confidence interval half-width removed at the same number of simulated pairs and the same critical value. Murphy and colleagues print both measures in their Table 1, and both printed values follow from its standard deviation rows, so the algebra here is derived. Negative values show that the method has added variance. The runs needed without matching to reach the matched standard error take the form of HE-FM-ABM-003 (derived).

This set of formulae is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/common-random-numbers/formulae