Why the Formula Works
The formula is basically a method for calculating the area under the
normal curve. If the mean and standard deviation of the sampling
distribution of a statistic are known, it is easy to calculate the
probability of a statistic being greater than or less than a specific
value. That is what is done in hypothesis testing.