From a logical point of view: an illuminating perspective in teaching statistical inference