Outline Copulas for Uncertainty Analysis GUM Antonio Possolo Refractive index Shortcomings GUM SUPPLEMENT 1 Change-of-Variables Formula Monte Carlo Method COPULAS Jun 21st, 2010 Definition & Illustrations GUM Example H.2 1 / 33 2 / 33 Refractive Index Refractive Index Partial Derivatives Apex angle α, refractive index n, immersed in medium with refractive index m Light enters prism at angle φ, traverses prism s body, and exits at angle ψ As prism rotates about light s entrance point, δ = 2(φ + ψ α) decreases, reaches minimum δ M, then increases ϕ α ψ sin(φ + ψ α/2) ƒ m (m, φ, ψ, α) = sin(α/ 2) cos(φ + ψ α/2) ƒ φ (m, φ, ψ, α) =m sin(α/ 2) cos(φ + ψ α/2) ƒ ψ (m, φ, ψ, α) =m sin(α/ 2) n = m sin((α + δ M)/2) sin(α/ 2) ƒ α (m, φ, ψ, α) = m cos(φ + ψ α 2 ) 2 sin( α 2 ) + sin(φ + ψ α 2 ) sin( α 2 ) tn( α 2 ) 3 / 33 4 / 33
Streamlining Computation Computation of standard uncertainty using GUM s Taylor approximation is tedious and error-prone, especially when measurement equation is non-linear or involves special functions Employ software capable of computing derivatives Analytically (for example, Maple) Numerically (for example, R) R is freely available, and its source code is open: http://www.r-project.org/ metrology package (LGC / NIST) GUM Approximation Shortcomings If some first order partial derivatives of ƒ are zero at values of input quantities, then GUM s approximation may be faulty Radiant power W = κ cos(a) GUM s approximation may be poor when ƒ is markedly non-linear in neighborhood of values of input quantities Need to study ƒ s curvature is extra burden If curvature is appreciable and influential, need higher-order approximation However, examples can be constructed where first-order approximation is better than second-order approximation Wang & Iyer (2005) 5 / 33 6 / 33 GUM Approximation More Shortcomings Expanded uncertainties and coverage intervals involve coverage factor whose value depends on generally unverifiable assumption that output quantity has Gaussian or Student s t distribution Even when Y t ν, Welch-Satterthwaite formula often yields inappropriate value for ν Example (GUM H.1) = S + d S (1 δα θ α S δθ) Welch-Satterthwaite formula yields ν eff = 16 GUM s 99 % coverage interval 17 % longer than it needs to be GUM Supplement 1 Problem Given Measurement equation Y = ƒ (X 1,..., X n ) Joint probability distribution of X 1,..., X n (with density φ) Determine Y s probability distribution Derive Y s density analytically Change-of-variables formula Sample Y s distribution 7 / 33 8 / 33
Change of Variables Formula Transformation τ = (ƒ, τ 2,..., τ n ) One-to-one, continuously differentiable Inverse has non-vanishing Jacobian Y = ƒ (X 1,..., X n ) Z 2 = τ 2 (X 1,..., X n )... Z n = τ n (X 1,..., X n ) Y has probability density ψ ψ(y) = Z 2... Z n φ τ 1 (y, z 2,..., z n ) J τ 1(y, z 2,..., z n ) dz 2... dz n GUM Supplement 1 Step 1 PROPAGATING DISTRIBUTIONS (MONTE CARLO) STEP 1: Select probability distribution to describe state of knowledge about input quantities If X 1,..., X n can be regarded as independent random variables, then assign probability distributions to each one of them separately Otherwise, assign multivariate distribution to all of them together... using a copula In either case, mean and standard deviation of each X j s distribution should be j and ( j ) 9 / 33 10 / 33 GUM Supplement 1 Steps 2 4 GUM Supplement 1 Refractive Index (CI) PROPAGATING DISTRIBUTIONS (MONTE CARLO) STEP 2: Choose suitably large number K for size of sample to generate from probability distribution of output quantity STEP 3: Simulate K vectors of values of input quantities, and compute y k = ƒ ( k1,..., kn ) for k = 1,..., K STEP 4: Assign to (y) (standard uncertainty of output quantity) the value of the standard deviation of y 1,..., y K Use sample {y 1,..., y K } to estimate probability density of prism s refractive index most complete characterization of uncertainty Shaded region includes 95 % of total area under curve: footprint on horizontal axis is a coverage interval for measurand with 95% confidence Probability Density 0 2 4 6 8 10 12 14 1.35 1.45 1.55 1.65 Refractive Index 11 / 33 12 / 33
GUM Example H.2 GUM Example H.2 INPUT QUANTITIES Amplitude V of sinusoidally-alternating potential difference across electrical circuit s terminals Amplitude of alternating current Phase-shift angle ϕ of alternating potential difference relative to alternating current OUTPUT QUANTITIES Resistance R = V cos ϕ Reactance X = V sin ϕ Impedance s magnitude Z = V V,, and ϕ are correlated 13 / 33 14 / 33 Problem & Solutions Copulas are not Cupolas PROBLEM Given probability distributions for input quantities, and correlations between them, how does one manufacture a joint probability distribution consistent with those margins and correlations? SOLUTIONS There are infinitely many joint distributions that are consistent with given marginal distributions and correlations Copulas join univariate probability distributions into multivariate distributions and impose dependence structure 15 / 33 Manufacturer mentioned solely to acknowledge image source, with no implied recommendation or endorsement by NIST that cupola portrayed is the best available for any particular purpose 16 / 33
Copula Definition Wassily Hoeffding, 1914 1991 A copula is the cumulative distribution function of a multivariate distribution on the unit hypercube all of whose margins are uniform Clayton copula inducing Kendall s τ = 0.6 17 / 33 18 / 33 Sklar s (1959) Theorem Copula Example: Definition If H is CDF of multivariate distribution whose margins have CDFs F 1,..., F n, then there exists copula C such that H( 1,..., n ) = C F 1 ( 1 ),..., F n ( n ) If F 1,..., F n are continuous, then C is unique C(p 1,..., p n ) = H F 1 1 (p 1),..., F 1 n (p n) Example (Gaussian Copula on Beta Margins) U BETA(3, 5) has CDF F V BETA(4, 2) has CDF G ρ = cor(u, V) = 0.7 Copula C such that C(p, q) = ρ F 1 (p), G 1 (q) for 0 p, q 1 19 / 33 20 / 33
Copula Example: Joint Density Influential Copulas Joint distributions with same Gaussian margins and same correlation v 0.1 0.3 0.5 0.7 0.9 0.1 0.3 0.5 0.7 0.9 u 0 5 10 15 v Gaussian Copula u 0 5 10 15 Clayton Copula 10 0 10 20 30 40 50 10 0 10 20 30 40 50 21 / 33 22 / 33 GUM Example H.2 GUM Example H.2 Data OUTPUT QUANTITIES Resistance R = V cos ϕ Reactance X = V sin ϕ Impedance s magnitude Z = V V (V) (ma) ϕ (rad) 5.007 19.663 1.045 6 4.994 19.639 1.043 8 5.005 19.640 1.046 8 4.990 19.685 1.042 8 4.999 19.678 1.043 3 23 / 33 24 / 33
GUM Example H.2 Evaluations GUM Example H.2 GUM Supplement 1 Input quantity values estimated by averages V,, and ϕ, of sets of five indications Uncertainties and correlations of input quantities assessed by Type A evaluations (V) = SD(5.007, 4.994, 5.005, 4.990, 4.999)/ 5 Similarly for () and (ϕ) cor(v, ), cor(v, ϕ), and cor(, ϕ) estimated by correlations between paired sets of five indications CHALLENGES Quality of estimates of (V), (), (ϕ), cor(v, ), cor(v, ϕ), and cor(, ϕ) limited by very small number of indications they are based on Marginal distributions must be chosen for V, and ϕ, and then linked using a copula that reproduces correlations between them 25 / 33 26 / 33 William Gosset, 1876 1937 GUM Example H.2 GUM Supplement 1 SOLUTION Employ Student t 4 distributions for V μ V (V), μ (), and ϕ μ ϕ (ϕ) Tune Gaussian copula using correlation supplicant Apply copula To sample correlation matrix To use sampled correlation matrix in turn to sample output quantities 27 / 33 28 / 33
Correlation Supplicant GUM Example H.2 GUM Supplement 1 Copula parameter θ determines dependence structure, in particular correlation matrix ρ(θ) Example STUDENT: θ comprises ν and CLAYTON: C(p, q) = p θ + q θ 1 1/θ, θ 1 RESULTS GAUSSIAN COPULA WITH GAUSSIAN MARGINS R (Ω) X (Ω) Z (Ω) AVE 127.7 219.8 254.3 0.0711 0.296 0.236 U 99% 0.18 0.76 0.61 Correlation Supplicant selects θ that minimizes difference between ρ and ρ(θ) Minimization with respect to θ done under constraint that ρ(θ) must be bona fide correlation matrix GAUSSIAN COPULA WITH STUDENT MARGINS R (Ω) X (Ω) Z (Ω) AVE 127.7 219.8 254.3 0.0828 0.289 0.232 U 99% 0.29 0.93 0.75 29 / 33 30 / 33 GUM Example H.2 Results GUM Example H.2 Limitation GAU GAU GAU STU All usual copulas fail to capture fact that joint distribution of (R, X, Z) is degenerate 126.5 127.5 128.5 218.5 219.5 220.5 221.5 253.0 254.0 255.0 Z 2 = R 2 + X 2 R X Z X 218.5 219.5 220.5 221.5 126.5 127.5 128.5 Z 252.5 253.5 254.5 255.5 126.5 127.5 128.5 Z 252.5 253.5 254.5 255.5 99% 95% 218.5 219.5 220.5 221.5 However, this is largely irrelevant in this case because relative standard uncertainties are very small all less than 0.1 % R R X 31 / 33 32 / 33
Conclusions & Reference When input quantities are correlated, and their joint distribution is not determined otherwise, copula must be used to apply Monte Carlo Method of GUM Supplement 1 Many different copulas can reproduce given correlations, yet lead to possibly very different uncertainty evaluations for output quantity A. Possolo (2010) Copulas for uncertainty analysis Metrologia, 47 (3): 262 271 33 / 33