The logic of statistical inference is to compare data that we collect to expectations about what the data would be if the world were random in some particular respect. Randomness and probability are the cornerstones of all methods for testing hypotheses.