CHICOM: Code for comparing weighted or unweighted histograms in Fortran-77, C++, R and Python

Improved a program that calculates test statistics to compare weighted and unweighted histograms. The program is presented in Fortran-77, C++, R and Python. The code calculates test statistics for histograms with either normalized or unnormalized weights of events. Program Title: CHICOM Program File...

Full description

Saved in:
Bibliographic Details
Published inComputer physics communications Vol. 245; p. 106872
Main Authors Gagunashvili, Nikolay D., Halldorsson, Helgi, Neukirchen, Helmut
Format Journal Article
LanguageEnglish
Published Elsevier B.V 01.12.2019
Subjects
Online AccessGet full text
ISSN0010-4655
1879-2944
DOI10.1016/j.cpc.2019.106872

Cover

More Information
Summary:Improved a program that calculates test statistics to compare weighted and unweighted histograms. The program is presented in Fortran-77, C++, R and Python. The code calculates test statistics for histograms with either normalized or unnormalized weights of events. Program Title: CHICOM Program Files doi:http://dx.doi.org/10.17632/424sd4fhj8.1 Licensing provisions: GPLv3 Programming language: Fortran-77, C++, Python, R Journal reference of previous version: CHICOM: A code of tests for comparing unweighted and weighted histograms and two weighted histograms, N. D. Gagunashvili, Comput. Phys. Commun. 183 (2012) 193-196 Does the new version supersede the previous version?: Yes Reasons for the new version: To use an improved version of the chi-square test with better statistical properties, instead of the median statistic [3] as in the previous version. Summary of revisions: An improved version of the test statistic [2] was used that uses an improved chi-square test [4]. The algorithm has been implemented in four commonly used programming languages (Fortran-77, C++, Python and R). Nature of problem: The program calculates test statistics for comparing weighted or unweighted histograms. Solution method: An improved test statistic for comparing weighted histograms is calculated using the formulas presented in Ref. [2]. In order to find the test statistic, we must find the probability that minimizes the sum of the goodness of fit test statistic of each histogram. To do so, the Polak–Ribière conjugate gradient method is used to converge to the minimum from an initial guess suggested in the article. References [1] N. D. Gagunashvili, Comput. Phys. Commun. 183(2012)193. [2] N. D. Gagunashvili, Eur. Phys. J. Plus (2017) 132: 196. [3] N. D. Gagunashvili, Nucl. Instrum. Meth. A 596(2008)439. [4] N. D. Gagunashvili, J. Instrum. 10(2015)P05004.
ISSN:0010-4655
1879-2944
DOI:10.1016/j.cpc.2019.106872