Teaching or learning stats can be a challenging endeavor. In my experience, starting with concrete (as opposed to abstract) examples helps many a learner. What also helps (for me) is visualizing. As p-values are still part and parcel of probably any given stats curriculum, here is a convenient function to simulate p-values and to plot them. “Simulating p-values” amounts to drawing many samples from a given, specified population (eg., µ=100, s=15, normally …