statistical analysis on uncertainty for autocorrelated ... · statistical analysis on uncertainty...

25
Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan Zhang National Institute of Standards and Technology Gaithersburg, MD 20899, USA

Upload: others

Post on 27-Sep-2020

7 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Statistical Analysis on Uncertainty for Autocorrelated Measurements and its

Applications to Key Comparisons

Nien Fan ZhangNational Institute of Standards and

TechnologyGaithersburg, MD 20899, USA

Page 2: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Outlines

1. Introduction

2. Stationary processes

3. Uncertainty of a sample mean for stationary measurements

4. Confidence intervals for the mean value

5. Applications to key Comparisons

6. Discussions and conclusions

Page 3: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

1. Introduction

In metrology, for given repeated measurements, of size

of

Here we assume that have same mean and variance and are

uncorrelated. However the condition of uncorrelatedness does not

always hold. In many cases measurements are autocorrelated or self-

correlated. Here are two examples.

1{ ,..., }nX X

nX

XSu

n=

1{ ,..., }nX X

Page 4: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

The figure shows 400 linewidth measurements for a nominally 500 nm line by a SEM.

Page 5: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

This shows the ACF plot of the linewidthmeasurements with a 95% confidence band for WN.

Page 6: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

The ACF plot is a plot for the sample autocorrelations, which measures the autocorrelation of the data.

The confidence band is centered at zero and with limits of

with The confidence band is for the autocorrelations of an uncorrelated sequence or white noise. Namely, if the data are statistically independent, then its sample autocorrelation has a mean of zero and an approximate standard deviation of

Obviously, the linewidth measurements are autocorrelated and thus

the uncertainty given in the above may not be appropriate to use.

1.96 n± 400n =

1 n

Page 7: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

High precision weight measurements with differences from the 1kg check standards.

Page 8: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan
Page 9: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

The ACF plot shows the autocorrelations and a 95% confidence band for white noise. Obviously, the measurements are autocorrelated and thus the traditional approach to calculate the uncertainty of the average of measurements is not appropriate.

If the mean is estimated by a weighted mean, then when the uncertainty of the weighted mean is calculated, the traditional approach

is also not appropriate. Thus, appropriate approaches are neededto calculate the corresponding uncertainties. For autocorrelatedprocesses, an important class is the one of stationary processes. We propose a practical approach to compute the uncertainty of the average of the measurements from a stationary process.

1

n

w i ii

X w X=

=∑

2

1w

n

i XXi

u w S=

= ∑

Page 10: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

2. Stationary processes

A discrete time series is (weakly) stationary if

(1)

(2)

(3)

is the autocovariance of at lag of .

The autocorrelation is defined as

When the measurements are from a stationary process, they have the

same mean and variance for all t.

{ , 1,2,...}tX t =[ ]tE X µ=

2r[ ]t XVa X σ= < ∞

[ , ] ( )t tCov X X Rτ τ+ =

( )R τ { }tX τ 2(0) XR σ=

( ) ( ) (0)R Rρ τ τ=

Page 11: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Examples of stationary processes

(1) White noise ---- mean=0 and for all

(2) First order autoregressive process (AR(1))

When the process is stationary. when

(3) Moving average process (MA(q))

when

( ) 0ρ τ = 0τ ≠

1( ) ( )t t tX X aµ φ µ−− = − +

1φ <

1 1 ...t t t q t qX a a aµ θ θ− −− = − − −

( ) kkρ φ=

0k ≥

( ) 0kρ = k q>

Page 12: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

3. Uncertainty of a sample mean for stationary measurements

For the sample mean when is stationary

where is the variance of . When the measurements are uncorrelated,

When is an AR(1) process

1 ... nX XXn

+ +=

1

21

2 ( ) ( )][ ] 1

n

i X

n i iVar X

n n

ρσ

=

⎡ ⎤−⎢ ⎥

= +⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

2Xσ { }tX

2

[ ] XVar Xnσ

=

{ }tX

2 12

2 2

2 2[ ](1 )

n

Xn nVar X

nφ φ φ σ

φ

+− − +=

{ }tX

Page 13: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

The uncertainty of the sample mean is given by

where

1

22 1

ˆ2 ( ) ( )]1

n

i XX

n i iSu

n n

ρ−

=

⎡ ⎤−⎢ ⎥

= +⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

2 2

1

1 ( )1

n

X kk

S X Xn =

= −− ∑

1

2

1

( )( )ˆ ( )

( )

n i

k k ik

n

kk

X X X Xi

X Xρ

+=

=

− −=

Page 14: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Two issues in using the above estimator:

(1) When is close to the number of product in the numeratoris small and the estimate will not be good.

(2) Since when we need to consider if any

is statistically significant from zero.

For (1), a rule of thumb: can only be used when and

Thus, we only use these with

For (2), by Wold Decomposition Theorem, a realization of a

stationary process can be approximated by a finite order MA

process

i nˆ ( )iρ

ˆ ( ) 0iρ → i →∞ ˆ ( )iρ

ˆ ( )iρ 50n ≥

4i n≤ ˆ ( )iρ

1

q

t t k t kk

X a aµ θ −=

− = −∑

4i n≤

Page 15: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Based on that, for a set of time series data, the order of the corresponding MA model, q needs to be found to have all in the uncertainty formula significantly different from zero.

For an MA(q) process and a sufficiently large n, for is approximately normally distributed with a mean of zero and a variance of

In particular, when is an uncorrelated sequence with same mean and variance,

which was used to build a confidence band of ACF for white noise.

ˆ ( )iρ

ˆ ( )iρ i q>

2

2 1ˆ ( )

1 2 ( )q

ki

k

ρσ =

+≈

{ }iX

2ˆ ( )

1i nρσ ≈

Page 16: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

In practice for an estimator of is

Since are asymptotically normally distributed with

for

is evidence against MA(q) at the level. Namely, if an MA(q) is to be considered, should remain within the limits for

i q> 2ˆ ( )iρσ

2

2 1ˆ ( )

ˆ1 2 ( )ˆ

q

ki

k

ρσ =

+=

ˆ ( )iρ ˆ[ ( )] 0E iρ ≈

i q>2

1

ˆ1 2 ( )ˆ ( ) 1.96

q

kk

in

ρρ =

+>

0.05α =ˆ ( )iρ

i q>

Page 17: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Thus, a cut-off lag is given by

Thus, the upper limit in the summation in the uncertainty formula is replaced by

To warranty that only reasonable good are included. Thus, the uncertainty of the average of measurements from a stationaryprocess can be calculated by

A factor or a ratio is

ˆ ( )ˆ ˆmax{ || ( ) | 1.96 }c in i i ρρ σ= >

min{ ,[ 4]}r cn n n=

ˆ ( )iρ

22 1

ˆ2 ( ) ( )]1

rn

i XX

n i iSu

n n

ρ=

⎡ ⎤−⎢ ⎥

⎢ ⎥≈ +⎢ ⎥⎢ ⎥⎣ ⎦

1

ˆ2 ( ) ( )]1

rn

in i i

=

−= +

∑n

Page 18: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

4. Confidence intervals for the mean value

Central Limit Theorem: When are statisticallyindependent and identically distributed with and when n is large enough

For a stationary process, CLT still holds when some regular conditions are met. Thus, when n is large enough, the 95% confidence limits are

For the first example, n = 400 and the which is much larger than 0.0964, the uncertainty based on independence assumption. R, the ratio = 3.9.

1{ ,..., }nX Xµ 2

2

( , )XX Nnσµ≈

1.96 XX u±

13rn = 0.3776Xu =

Page 19: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

ACF plot of linewidth measurements with a 95 % confidence band

Page 20: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

Since a 95 % confidence band of the mean is

For the second example of the weights measurements, n=217.

which is much larger than 0.0024, the uncertainty based on independence assumption. R, the ratio is 2.8. A 95 % confidence band is given by

450.62X =

450.62 1.96 0.38 450.62 0.74± × = ±

17r cn n= =

0.0067Xu =

19.4645 1.96 0.0067 19.4645 0.0131− ± × = − ±

Page 21: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

ACF plot of the weights measurements with a 95 % confidence band

Page 22: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

5. Applications to Key Comparisons

For a Key Comparison, if the measurements by any lab are autocorrelated, then the Type A uncertainty for the lab should be determined based on the autocorrelations assuming the data are from a stationary process.

If there are more than one traveling standard and the measurements by any lab are autocorrelated, then the Type A uncertainty for this standard and this lab needs to be determined based on the corresponding autocorrelations.

If the Type A uncertainty of any lab is obtained by combining all traveling standards, then the calculation should be based on the autocorrelation structures of measurements for all standards.

Page 23: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

6. Discussions and conclusions

When repeated measurements are autocorrelated, it is not appropriate to use the traditional approach to calculate the uncertainty of the average of the measurements. We propose a practical approach to calculate the uncertainty when the data are from a stationary process.

(1) The result can be extended to the case of a weighted mean.

When is stationary, it can be shown that

The corresponding uncertainty can be calculated.

1

n

w i ii

X w X=

=∑

{ }tX

12 2

1 1 1[ ] { 2 ( )[ ]}

n n n i

w X i j j ii i j

Var X w i w wσ ρ− −

+= = =

= +∑ ∑ ∑

Page 24: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

(2) We assume that time series data were collected at equally spaced (time) interval. However, in practice a time series dataset often contains more or less missing values. In time series analysis, various attempts have been made to deal with such a kind of case. Therefore, in metrology once the measurements are determined to be autocorrelated, it is very important to make sure the data are collected at equal time interval.

Page 25: Statistical Analysis on Uncertainty for Autocorrelated ... · Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons Nien Fan

(3) An autocorrelated process or a time series can be non-stationary such as a ransom walk:

with and white noise. It is obvious that

Thus,

If measurements are from a non-stationary process using the average value and the corresponding variance to characterize themeasurement standard may be misleading.

1t t tX X a−= +

0 0X = { }ta

1

t

t ii

X a=

=∑

2[ ]t aVar X t σ=