The Foundations of Statistics: A Simulation-based Approach