A method for statistical comparison of data sets and its uses in analysis of nuclear physics data