Forskjell mellom versjoner av «ATLAS hints»
(→Mean or average of two partially correlated measurements) |
(→Mean or average of two partially correlated measurements) |
||
Linje 1: | Linje 1: | ||
=== Mean or average of two partially correlated measurements === | === Mean or average of two partially correlated measurements === | ||
− | See | + | 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> | 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> | ||
Linje 55: | Linje 55: | ||
and the variance of m<br> | and the variance of m<br> | ||
− | dm = (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 | + | 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> | <br> | ||
Linje 67: | Linje 67: | ||
<br> | <br> | ||
− | Here is a sample output from the program for some (almost) randomly chosen measurement results:<br> | + | Here is a sample output from the program for some (almost) randomly chosen measurement results:<br> |
− | <pre> | + | <pre>******************************************* |
− | ******************************************* | ||
* * | * * | ||
* W E L C O M E to R O O T * | * W E L C O M E to R O O T * | ||
Linje 83: | Linje 82: | ||
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 | CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 | ||
− | Type ? for help. Commands must be C++ statements. | + | Type ? for help. Commands must be C++ statements. |
Enclose multiple statements between { }. | Enclose multiple statements between { }. | ||
root [0] | root [0] |
Revisjonen fra 19. mar. 2011 kl. 10:13
See this article for background material.
Use the root macro to perform an average of two measurements:
x1 +- dx1s (statistical) +- dx1u (uncorrelated systematic) +- dx1c (correlated systematic)
x2 +- dx2s (statistical) +- dx2u (uncorrelated systematic) +- dx2c (correlated systematic)
resulting in mean m +- dmstat +- dmsyst. 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
dx1s2 + dx1u2 |
0 |
0 |
dx2s2 + dx2u |
and a non-diagonal covariance matrix for the correlated uncertainties with correlation coefficient rho=1
dx1c2 |
dx1c * dx2c |
dx1c * dx2c |
dx2c2 |
. From the form of the covariance matrix C
dx12 |
rho * dx1 * dx2 |
rho * dx1 * dx2 |
dx22 |
we can identify dxi2 = dxis2 + dxiu2 + dxic2 and rho = dx1c * dx2c / (dx1 * dx2).
Minimizing the generalized chi-squared XTC-1X, where X is a column vector
x1 - m |
x2 - m |
, we get for the minimum variance estimate of m
m = (x1/dx12 + x2/dx22 - rho * (x1 + x2) /(dx1 * dx2)) / (1/dx12 + 1/dx22 - 2 * rho/(dx1 * dx2))
and the variance of m
dm2 = (1-rho2) / ( 1/dx12 + 1/dx22 - 2 * rho/(dx1 * dx2). We decompose the variance into statistical and systematic components by subtraction in quadrature of the statistical uncertainty dmstat2 = 1/(1/dx1s2 + 1/dx2s2), dmsyst2 = dm2 - dmstat 2.
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.
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.
Here is a sample output from the program for some (almost) randomly chosen measurement results:
******************************************* * * * 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