New changes to get p-value and chi2 function to work with different
binnings and ranges