|
|
(8 mellomliggende revisjoner av samme bruker vises ikke) |
Linje 1: |
Linje 1: |
− | === Mean or average of two partially correlated measurements ===
| |
| | | |
− | See this [http://dx.doi.org/10.1088/0026-1394/43/4/S14 article] for background material.
| |
− |
| |
− | Use the [http://root.cern.ch root] [http://folk.uio.no/read/stats/AverageMeasurements.C macro] to perform an average of two measurements:<br> x<sub>1</sub> +- dx<sub>1s</sub> (statistical) +- dx<sub>1u</sub> (uncorrelated systematic) +- dx<sub>1c</sub> (correlated systematic)<br> x<sub>2</sub> +- dx<sub>2s</sub> (statistical) +- dx<sub>2u</sub> (uncorrelated systematic) +- dx<sub></sub><sub>2c</sub> (correlated systematic)<br>
| |
− |
| |
− | resulting in mean m +- dm<sub>stat</sub> +- dm<sub>syst</sub>. The systematic errors in each channel are decomposed in uncorrelated and (100%) correlated components. The correlation matrix which appears in the solution is composed of the sum of a diagonal covariance matrix with elements given by the uncorrelated uncertainties summed in quadrature<br>
| |
− |
| |
− | {| width="200" cellspacing="1" cellpadding="1" border="1"
| |
− | |-
| |
− | | dx<sub>1s<sup></sup></sub><sup>2</sup> + dx<sub>1u</sub><sup>2</sup><br>
| |
− | | 0<br>
| |
− | |-
| |
− | | 0<br>
| |
− | | dx<sub>2s</sub><sup>2 </sup>+ dx<sub>2u</sub><br>
| |
− | |}
| |
− |
| |
− | and a non-diagonal covariance matrix for the correlated uncertainties with correlation coefficient rho=1<br>
| |
− |
| |
− | {| width="200" cellspacing="1" cellpadding="1" border="1"
| |
− | |-
| |
− | | dx<sub>1c</sub><sup>2</sup><br>
| |
− | | dx<sub>1c</sub> * dx<sub>2c</sub><br>
| |
− | |-
| |
− | | dx<sub>1c</sub> * dx<sub>2c</sub><br>
| |
− | | dx<sub>2c</sub><sup>2</sup><br>
| |
− | |}
| |
− |
| |
− | . From the form of the covariance matrix C<br>
| |
− |
| |
− | {| width="200" cellspacing="1" cellpadding="1" border="1"
| |
− | |-
| |
− | | dx<sub>1</sub><sup>2</sup><br>
| |
− | | rho * dx<sub>1</sub> * dx<sub>2</sub><br>
| |
− | |-
| |
− | | rho * dx<sub>1</sub> * dx<sub>2</sub><br>
| |
− | | dx<sub>2</sub><sup>2</sup><br>
| |
− | |}
| |
− |
| |
− | we can identify dx<sub>i</sub><sup>2</sup> = dx<sub>i</sub><sub>s</sub><sup>2</sup> + dx<sub>iu</sub><sup>2</sup> + dx<sub>ic</sub><sup>2</sup> and rho = dx<sub>1c</sub> * dx<sub>2c</sub> / (dx<sub>1</sub> * dx<sub>2</sub>).<br>
| |
− |
| |
− | Minimizing the generalized chi-squared X<sup>T</sup>C<sup>-1</sup>X, where X is a column vector <br>
| |
− |
| |
− | {| cellspacing="1" cellpadding="1" border="1" style="width: 55px; height: 49px;"
| |
− | |-
| |
− | | x<sub>1</sub> - m<br>
| |
− | |-
| |
− | | x<sub>2</sub> - m<br>
| |
− | |}
| |
− |
| |
− | , we get for the minimum variance estimate of m<br>
| |
− |
| |
− | m = (x<sub>1</sub>/dx<sub>1</sub><sup>2</sup> + x<sub>2</sub>/dx<sub>2</sub><sup>2</sup> - rho * (x<sub>1</sub> + x<sub>2</sub>) /(dx<sub>1</sub> * dx<sub>2</sub>)<sub></sub>) / (1/dx<sub>1</sub><sup>2</sup> + 1/dx<sub>2</sub><sup>2</sup> - 2 * rho/(dx<sub>1</sub> * dx<sub>2</sub>))
| |
− |
| |
− | and the variance of m<br>
| |
− |
| |
− | dm<sup>2</sup> = (1-rho<sup>2</sup>) / ( 1/dx<sub>1</sub><sup>2</sup> + 1/dx<sub>2</sub><sup>2</sup> - 2 * rho/(dx<sub>1</sub> * dx<sub>2</sub>). We decompose the variance into statistical and systematic components by subtraction in quadrature of the statistical uncertainty dm<sub>stat</sub><sup>2</sup> = 1/(1/dx<sub>1</sub><sub>s</sub><sup>2</sup> + 1/dx<sub>2s</sub><sup>2</sup>), dm<sub>syst</sub><sup>2</sup> = dm<sup>2</sup> - dm<sub>stat</sub> <sup>2</sup>.<br>
| |
− |
| |
− | <br>
| |
− |
| |
− | There is protection in the code against the very special case that there is only a 100% correlated uncertainty. If this is truely the case then the 2 measurements must be equal by construction and the uncertainty may be taken as the smaller of the 2.<br>
| |
− |
| |
− | <br>
| |
− |
| |
− | There is also code to show the results of a popular approximation that does not properly take into account the correlation between the 2 measurements.<br>
| |
− |
| |
− | <br>
| |
− |
| |
− | Here is a sample output from the program for some (almost) randomly chosen measurement results:<br>
| |
− | <pre>*******************************************
| |
− | * *
| |
− | * W E L C O M E to R O O T *
| |
− | * *
| |
− | * Version 5.28/00 14 December 2010 *
| |
− | * *
| |
− | * You are welcome to visit our Web site *
| |
− | * http://root.cern.ch *
| |
− | * *
| |
− | *******************************************
| |
− |
| |
− | ROOT 5.28/00 (trunk@37585, Dec 14 2010, 15:20:27 on linuxx8664gcc)
| |
− |
| |
− | CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
| |
− | Type ? for help. Commands must be C++ statements.
| |
− | Enclose multiple statements between { }.
| |
− | root [0]
| |
− | Processing AverageMeasurements.C...
| |
− | The measurements being averaged:
| |
− | -------------------------------
| |
− | x1 = 58.9 +- 3.4 (stat) +- 1.5 (uncorr syst) +- 2.4 (corr syst)
| |
− | = 58.9 +- 4.4238 (total)
| |
− |
| |
− | x2 = 68.7 +- 2.8 (stat) +- 0.3 (uncorr syst) +- 3.9 (corr syst)
| |
− | = 68.7 +- 4.81041 (total)
| |
− |
| |
− | Results for the generalized weighted average
| |
− | --------------------------------------------
| |
− | Correlation coefficient (rho) = 0.439844
| |
− |
| |
− | m = 63.0708 +- 2.1614 (stat) +- 3.24854 (syst)
| |
− | = 63.0708 +- 3.90188 (total)
| |
− |
| |
− | Generalized chi-squared = 4.00333
| |
− |
| |
− | Approximate, simple formulae
| |
− | ----------------------------
| |
− | m = 65.1253 +- 2.1614 (stat) +- 3.20753 (syst)
| |
− | = 65.1253 +- 3.8678 (total)
| |
− |
| |
− | Generalized chi-squared = 4.28057 (for the approximate minimum)
| |
− | Delta chi-squared with respect to exact minimum = 0.277241
| |
− | </pre>
| |