Public Member Functions | |
def | do_test |
def | enough_filled_bins |
def | make_absolute |
Static Public Attributes | |
string | name = 'Chi2' |
Definition at line 344 of file utils_v2.py.
def utils_v2::Chi2Test::do_test | ( | self, | |
h1, | |||
h2 | |||
) |
Reimplemented from utils_v2::StatisticalTest.
Definition at line 364 of file utils_v2.py.
00365 : 00366 p_value = super(Chi2Test, self).do_test(h1, h2) 00367 if p_value is not None: 00368 return p_value 00369 00370 bin_count = self.get_N_bins(h1) 00371 00372 # Make histograms absolute. 00373 self.make_absolute(h1, bin_count) 00374 self.make_absolute(h2, bin_count) 00375 00376 # Check if there is enough filled bins in bouth histograms. 00377 if not self.enough_filled_bins(h1, bin_count) or\ 00378 not self.enough_filled_bins(h2, bin_count): 00379 return 1 00380 00381 if h1.InheritsFrom("TProfile") or (h1.GetEntries() != h1.GetSumOfWeights()): 00382 return h1.Chi2Test(h2, 'WW') 00383 return h1.Chi2Test(h2, 'UU') 00384
def utils_v2::Chi2Test::enough_filled_bins | ( | self, | |
h, | |||
bin_count, | |||
more_than = 3 |
|||
) |
Definition at line 355 of file utils_v2.py.
def utils_v2::Chi2Test::make_absolute | ( | self, | |
h, | |||
bin_count | |||
) |
Definition at line 347 of file utils_v2.py.
string utils_v2::Chi2Test::name = 'Chi2' [static] |
Reimplemented from utils_v2::StatisticalTest.
Definition at line 345 of file utils_v2.py.