CHIWEI: A code of goodness of fit tests for weighted and unweighted histograms in Fortran-77, C++, R and Python

Nikolay D. Gagunashvili*, Helgi Halldorsson

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Improved a program for goodness of fit tests for histograms with weighted entries as well as with unweighted entries which is presented in Fortran-77, C++, Python and R. The code calculates test statistics for histograms with either normalized or unnormalized weights of events. Program summary: Program Title: CHIWEI Program Files doi: http://dx.doi.org/10.17632/h54pdsnbtk.1 Licensing provisions: GPLv3 Programming language: Fortran-77, C++, Python, R Journal reference of previous version: Comput. Phys. Commun. 183 (2012) 418–421 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 [2] as in the previous version. Summary of revisions: An improved version of the chi-square test [3] was implemented. The new test generally had a size closer to the nominal value without having lower power. The algorithm has been implemented in four commonly used programming languages (Fortran-77, C++, Python and R). The new version calculates the Pearson's residuals along with the goodness of fit test statistics and degrees of freedom. There have also been made minor modifications in the algorithm that improve the time complexity of the common case. Nature of problem: The program calculates goodness of fit test statistics for weighted histograms. Solution method: A chi-square test statistic is calculated using the formulas for the new test statistic presented in Ref. [3]. References: [1] N. D. Gagunashvili, Comput. Phys. Commun. 183 (2012) 193. [2] N. D. Gagunashvili, Nucl. Instrum. Meth. A 596 (2008) 439. [3] N. D. Gagunashvili, J. Instrum. 10 (2015) P05004.

Original languageEnglish
Pages (from-to)245
Number of pages1
JournalComputer Physics Communications
Volume231
DOIs
Publication statusPublished - Oct 2018

Bibliographical note

Publisher Copyright:
© 2018 Elsevier B.V.

Other keywords

  • Chi-square test generalization
  • Comparison of experimental and simulated data
  • Monte Carlo method

Fingerprint

Dive into the research topics of 'CHIWEI: A code of goodness of fit tests for weighted and unweighted histograms in Fortran-77, C++, R and Python'. Together they form a unique fingerprint.

Cite this