The Logical Foundations of Statistical Inference