Dealing with prior knowledge about the measurand

Dealing with prior knowledge about the measurand

Accepted Manuscript Dealing with prior knowledge about the measurand Ignacio Lira PII: DOI: Reference: S0263-2241(15)00473-X http://dx.doi.org/10.101...

382KB Sizes 4 Downloads 202 Views

Accepted Manuscript Dealing with prior knowledge about the measurand Ignacio Lira PII: DOI: Reference:

S0263-2241(15)00473-X http://dx.doi.org/10.1016/j.measurement.2015.08.042 MEASUR 3562

To appear in:

Measurement

Received Date: Revised Date: Accepted Date:

17 March 2015 24 June 2015 18 August 2015

Please cite this article as: I. Lira, Dealing with prior knowledge about the measurand, Measurement (2015), doi: http://dx.doi.org/10.1016/j.measurement.2015.08.042

This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

Dealing with prior knowledge about the measurand Ignacio Lira Department of Mechanical and Metallurgical Engineering, Pontificia Universidad Cat´ olica de Chile, Vicu˜ na Mackenna 4860, Santiago, Chile. Email: [email protected]

Abstract Suppose a measurand can be computed by two different but consistent measurement models. Then, the output of one of the models would serve as prior knowledge to the other. In this paper, two alternative methods to produce a PDF for the measurand that take into account both models are presented. The first method proceeds by propagating the PDFs for the input quantities through the corresponding models in the usual way and then merging the resulting PDFs using the logarithmic or linear pooling techniques. The result is a kind of ‘compromise distribution’ of the pooled PDFs. The second method starts by propagating the PDFs for all input quantities except one, say X1 , through the model that relates the former quantities to the latter. In this way the PDF for X1 is obtained, which is then updated using its likelihood. The resulting PDF, which encodes all information available, is finally propagated through the model that relates X1 to the measurand. This second method is the preferred way of analysis, because it results in a PDF that is narrower than the one obtained with the first method. Keywords: Prior knowledge, Measurement models, Bayesian statistics, Propagation of distributions, Information types

1. Introduction Let a measurand Y be modeled as Y = F1 (X1 , Z1 ),

(1)

where for simplicity we consider just two input quantities, X1 and Z1 . As is well known, the GUM [1] proposes to obtain the best estimates and standard uncertainties of the input quantities from the information associated with them, and then use the so-called law of propagation of uncertainties to derive the standard uncertainty associated with the best estimate of Y . A better evaluation procedure, however, is to encode the state of knowledge about the input quantities by means of probability density functions (PDFs), which can then be propagated through the measurement model to obtain the PDF for Y , either analytically or numerically.

Preprint submitted to Measurement

September 9, 2015

But suppose the measurand can also be modeled in terms of another pair of input quantities as Y = F2 (X2 , Z2 ). (2) Then, the state of knowledge about Y acquired from having evaluated one of the models would serve as prior knowledge for the other. Situations such as these are not uncommon, but they cannot be dealt with the GUM method nor with that of propagating PDFs. In what follows two possible approaches are proposed for treating cases like the one described. 2. Available information To a certain extent, the solution approaches to the problem above depend on the available information about the input quantities. We shall assume that (1) (2) information Iz and Iz for the quantities Z = {Z1 , Z2 } is of type B, that is, (1) (2) such that their PDFs fZ1 (z1 | Iz ) and fZ2 (z2 | Iz ) can be obtained directly. Clause 6.4 of Supplement 1 to the GUM [2] gives typical examples of such kind of information, leading e.g. to Gaussian, rectangular, curvilinear trapezoid, or exponential PDFs. In turn, it will be assumed that the information for the other two input quantities, X = {X1 , X2 }, is of type A. Typically, this kind of information arises when, for both quantities, repeated observations are collected. The two sets of observations are usually assumed to consist of ni samples from corresponding Gaussian frequency distribution of unknown means Xi and unknown standard deviations Si . If the arithmetic means of these data sets are xi and their sample standard deviations are si , the likelihoods are [3, eq. 1.4.2] [ ] 1 (ni − 1)s2i + ni (xi − xi )2 ℓ(xi , σi ; Ix(i) ) ∝ ni exp − , (3) σi 2 σi2 (i)

where the symbol Ix stands for the triplet {ni , xi , si }, with i = 1, 2. From Bayes’ theorem we then have fXi ,Si (xi , σi | Ix(i) ) ∝ ℓ(xi , σi ; Ix(i) ) fXoi ,Si (xi , σi ),

(4)

where fXoi ,Si (xi , σi ) is the prior to be used when there is no previous information on Xi and Si . This prior is usually taken as proportional to the inverse of σi , in which case integration over this variable results in a t-distribution for Xi with √ ni − 1 degrees of freedom, location parameter xi and scale parameter si / ni [3, p. 97]. Finally, we shall assume that, before having evaluated the two models, the information about any one input quantity is independent from that about all others.

2

3. Checking consistency In order to decide whether or not it is reasonable to produce a single PDF for the measurand that encodes all available information, it is convenient to start by checking if that information is indeed consistent. One way of carrying out (i) (i) this operation is to propagate the input PDFs fXi (xi | Ix ) and fZi (zi | Iz ) (i) (i) through the corresponding models so as to obtain PDFs fY (y | Ix,z ). This first step results in ∫ ∂ Gi (i) (i) fX (Gi | Ix(i) )fZ (zi | Iz(i) ) dzi , fY (y | Ix,z ) = (5) i ∂y i where the Gi ’s are the functions derived from models (1) and (2) that express the values of the quantities Xi in terms of those of Y and Zi , that is, xi = Gi (y, zi ). Naturally the results for each model will be different in general. For example, if the models are Z1 Y = (6) X1 and Y =

√ Z2 X23 ,

we would obtain (1) (1) fY (y | Ix,z )

1 = 2 y

(

∫ z1 fX1

and (2) (2) fY (y | Ix,z )

1 = 3 y 2/3



1 1/6

z2

) z1 (1) | Ix fZ1 (z1 | Iz(1) ) dz1 y

( fX2

(7)

y 1/3

| Ix(2) 1/6 z2

(8)

) fZ2 (z2 | Iz(2) ) dz2 .

(9)

In writing these expressions it has been assumed that all input quantities are positive and that the left tails of the t-PDFs for the Xi ’s can be truncated at zero with negligible effects. Are these PDFs rather similar or are they highly discrepant? Of course, the answer to this question depends on the data. Let us then assume that the PDFs (1) (2) for Z1 and Z2 are both Gaussian with Iz = (1.1, 0.14) and Iz = (4.1, 0.48), where the first number of each pair is the mean and the second is the standard (1) (2) deviation. For Ix let us use n1 = 5, x1 = 0.90 and s1 = 0.33, while for Ix assume n2 = 7, x2 = 0.84 and s2 = 0.27. This information results in the PDFs depicted in Fig. 1. Units have been omitted for simplicity, but of course they must all be compatible. The most common test of consistency proceeds by taking the PDFs in Fig. 1 as being approximately Gaussian, calculating the value of χ2 =

∑ (yw − y (i) )2 , v (i) i=1,2 3

(10)

1.4 1.2 1.0 0.8 0.6 0.4 0.2

0.5

1.0

1.5

2.0

2.5

3.0

Figure 1: PDFs for Y obtained from Eqs. (8) (solid line) and (9) (dotted line).

where yw is the weighted mean, and regarding the test as failing if χ2 is greater than the 0.95 quantile of the chi-square distribution with 2 degrees of freedom, which is 5.99. Since in our case χ2 is much less than 1, information for the two models can be taken as consistent. In practice, this means that no mistakes in the construction of the measurement models are apparent and that the effect of a possible systematic bias between them can be assumed to be negligible in comparison with the two standard deviations. Thus, it makes sense to try to derive a single PDF for Y that encodes all information available. As described next, a straightforward procedure for doing that is to merge the PDFs (5). 4. The pooling method (1)

(1)

(2)

(2)

The merging of PDFs fY (y | Ix,z ) and fY (y | Ix,z ) can be done by either the logarithmic or linear pooling techniques, as described in [4], where a summary description of their advantages and drawbacks is given. For our purposes, it suffices to consider just the former one. It gives [ ]w1 [ ]w2 (1,2) (1) (2) (1,2) (1) (2) fY (y | Ix,z ) ∝ fY (y | Ix,z ) fY (y | Ix,z ) , (11) where the weights w1 and w2 should add up to one. In general these weights have to be selected on the basis of subjectively judging the reliabilities of the different pieces of information The dashed line in Fig. 2 illustrates the resulting PDF for the example above, for which we chose to assign equal weights w1 = w2 = 0.5. Note that this method can be applied to any number of PDFs, irrespective of whether or not they encode the state of knowledge about the same or different quantities. In other words, inconsistent information is allowed in principle. But if this is the case, the resulting PDF would be useless for making decisions involving the measurand.

4

1.5

1.0

0.5

0.5

1.0

1.5

2.0

2.5

3.0

Figure 2: The dashed line illustrates the result of logarithmic pooling the two PDFs in Fig. 1 with w1 = w2 = 0.5.

5. The updating method There is, however, a second possible approach that might be called the updating method. It is strictly based on the assumption of consistency, which allows setting Y = F1 (X1 , Z1 ) = F2 (X2 , Z2 ). From the last two equations we can solve for the values of X1 and X2 in terms of each other and of the values of Z, that is x1 = H1 (x2 , z) (12) and x2 = H2 (x1 , z).

(13)

The updating method starts by propagating the PDFs for X2 and Z through model (12) to get ( ) ∂H2 fX2 H2 | Ix(2) fZ (z | Iz(1,2) ) , fX1 ,Z (x1 , z | Ix(2) , Iz(1,2) ) = (14) ∂x1 where fZ (z | Iz(1,2) ) = fZ1 (z1 | Iz(1) ) fZ2 (z2 | Iz(2) ).

(15) (2)

(1,2)

The missing information for X1 is added by updating fX1 ,Z (x1 , z | Ix , Iz ) (1) o with the likelihood ℓ(x1 , σ1 ; Ix ) and the non-informative prior fS1 (σ1 ) ∝ 1/σ1 , i.e. (1)

(1,2) fX1 ,Z,S1 (x1 , z, σ1 | Ix,z )∝

ℓ(x1 , σ1 ; Ix ) fX1 ,Z (x1 , z | Ix(2) , Iz(1,2) ). σ1

(16)

Integrating out σ1 we obtain (1,2) fX1 ,Z (x1 , z | Ix,z ) ∝ fX1 (x1 | Ix(1) ) fX1 ,Z (x1 , z | Ix(2) , Iz(1,2) ),

5

(17)

(1)

where fX1 (x1 | Ix ) is again a t-distribution. From this expression we de(1,2) rive fX1 ,Z1 (x1 , z1 | Ix,z ) by integration over z2 and then propagate it through (1,2) (1,2) model (1). The final result is the PDF fY,Z1 (y, z1 | Ix,z ), from which fY (y | Ix,z ) is found by marginalization. Note that all available information is thus encoded in this PDF for Y . Alternatively, one may propagate PDF (17) through model (13) to obtain (1,2) (1,2) fX2 ,Z (x2 , z | Ix,z ), from which z1 can be integrated out to produce fX2 ,Z2 (x2 , z2 | Ix,z ). (1,2) This PDF is propagated in turn through model (2). The final result for fY (y | Ix,z ) is the same as before. Let us illustrate by applying this procedure to models (6) and (7) with the same information as in Sec. 4. The result is ( ) ∫ 1 z1 (1,2) fYa (y | Ix,z ) ∝ 2/3 fX1 | Ix(1) fZ1 (z1 | Iz(1) ) dz1 × y y ( ) ∫ 1 y 1/3 (2) f | Ix fZ2 (z2 | Iz(2) ) dz2 , (18) 1/6 X2 1/6 z2 z2 which is shown as a solid line in Fig. 3. Superscript a has been added to differentiate this PDF from the one obtained using the variant of this procedure explained below. For comparison, the PDF obtained with the pooling method is also shown in Fig. 3 as a dashed line.

1.5

1.0

0.5

0.5

1.0

1.5

2.0

2.5

3.0

Figure 3: PDFs for Y incorporating all available information, obtained by the updating method (solid line) and the pooling method (dashed line).

A mirrored way of applying the updating method is to start by propagating (1) (1,2) the PDFs for X1 and Z through model (13) to get fX2 ,Z (x1 , z | Ix , Iz ), (2) which is updated using the likelihood ℓ(x2 , σ2 ; Ix ) and the non-informative (1,2) prior fSo2 (σ2 ) ∝ 1/σ2 . In this way we obtain fX2 ,Z (x2 , z | Ix,z ), from which we (1,2)

derive fX2 ,Z2 (x2 , z2 | Ix,z ) and then propagate that PDF through model (2). Application of this variant of the updating method to models (6) and (7) 6

results in (1,2) fYb (y | Ix,z )∝

1 y2

(

∫ z1 fX1

) z1 | Ix(1) fZ1 (z1 | Iz(1) ) dz1 × y ( ) ∫ y 1/3 (2) fX2 | Ix fZ2 (z2 | Iz(2) ) dz2 , (19) 1/6 z2

which is shown as a dashed line in Fig. 4. For comparison, in the same figure the solid line depicts the PDF fYa (y | I1 , I2 ).

1.5

1.0

0.5

0.5

1.0

1.5

2.0

2.5

(1,2)

Figure 4: PDFs fYa (y | Ix,z ) obtained with the first variant of the updating method (solid line) and

fYb

(1,2) (y | Ix,z )

corresponding to the second variant (dashed line).

6. Conclusion In this paper, the case of a measurand Y that can be evaluated by two different measurement models has been considered. It was assumed that the two models involved input quantities (X1 , Z1 ) and (X2 , Z2 ), respectively, for which information is provided. It was also assumed that the PDFs for the quantities Z are derived directly from the information pertaining to them, and that the PDFs for the other two input quantities are the scaled-and-shifted tdistributions that follow from the straightforward application of Bayes’ theorem with Gaussian likelihoods and standard non-informative priors. Our goal was to propose two alternative procedures for producing a PDF for Y that takes into account all pieces of information. But since this makes sense only if these information pieces are judged to be somehow consistent, this matter was addressed first. It was shown that consistency can be checked by comparing the PDFs for Y that result from propagating the PDFs for the input quantities through the corresponding models in the usual way. Although these two PDFs cannot be expected to coincide, they should not be too far apart from each other, else the existence of a mistake somewhere in the construction of the 7

models or in gathering the data would be revealed. The regular chi-square test is one way of quantitatively performing the comparison. Straightforwardly merging the two independent PDFs for Y with the logarithmic or linear pooling techniques with selectable weights adding up to one is the first procedure that accomplishes the desired goal. Having chosen the technique and weights, the final result is a kind of ‘compromise distribution’ of the two merged PDFs, so it will always be wider than the narrower of them. One advantage of this procedure is that the weights can be assigned in accordance with the subjective reliability that one may attribute to the information used for constructing and evaluating the respective models. However, the alternative procedure, which was called the updating method, is the preferred way of analysis because it produces a PDF that is narrower than the one obtained with the pooling method. This second method starts by propagating the PDFs for Z and one of the X quantities, say X2 , through the model that relates these three quantities to X1 . In this way the PDF for X1 and Z is obtained, which is then updated using the likelihood for X1 and propagated through the model Y = F1 (X1 , Z1 ) to yield the PDF for Y . Of course, one can also apply the updating method by starting from the PDFs for Z and X1 and proceeding in the way just described with appropriate subscript changes. In general the resulting two PDFs for Y will have similar variances but will be slightly displaced with respect to each other. Since they are both based on all information available, it would not be appropriate to merge them. Their difference lies only in the non-informative prior used: for X2 in the former case and for X1 in the latter. It would be up to the user of these PDFs to decide which one serves better the decisions to be made once they become available. Acknowledgments I thank Dieter Grientschnig and the two anonymous reviewers for valuable comments and suggestions for improving the clarity of this paper. The financial support of the Chilean National Fund for Scientific and Technological Development (Fondecyt), research grant 1141165, is also gratefully acknowledged. References [1] BIPM, IEC, IFCC, ILAC, ISO, IUPAC, IUPAP, and OIML. Evaluation of measurement data – Guide to the Expression of Uncertainty in Measurement – GUM 1995 with minor corrections. JCGM 100:2008, Joint Committee for Guides in Metrology, 2008. [2] BIPM, IEC, IFCC, ILAC, ISO, IUPAC, IUPAP, and OIML. Evaluation of measurement data – Supplement 1 to the ‘Guide to the Expression of Uncertainty in Measurement’ – Propagation of distributions using a Monte Carlo method. JCGM 101:2008, Joint Committee for Guides in Metrology, 2008. 8

[3] G. E. P. Box and G. C. Tiao. Bayesian Inference in Statistical Analysis. Addison Wesley, Reading, Mass, 1973 (Reprinted 1992 Wiley Classics Library Edition). [4] I. Lira and D. Grientschnig. Deriving PDFs for interrelated quantities: what to do if there is ‘more than enough’ information? IEEE T. Instrum. Meas., 63:1937–1946, 2014.

9

    

A measurand that can be evaluated by two different measurement models is considered. Evaluating one of the models serves as prior knowledge to the other. For such situations the customary evaluation method in the GUM does not apply. Neither applies the method of propagating PDFs. Two possible approaches are proposed for treating cases like the one described.