Empirically Deriving the Normal Distribution

Nov. 21, 2026

A few weeks back, while explaining how to calculate p-values using the slicing method, I off-handedly tossed out the fact that the density of the standard normal (Gaussian) distribution is given by…

[1/√(2π)] ⋅ e^(-x²/2)

As you might imagine, most people do not find this very intuitive.

In this post, we’re going to bypass the need for the formula altogether…

Briefly, the formula above is the probability density function (PDF) for the standard normal distribution. That just means it gives the height of curve at any location along the x-axis.

For example, this is what we get when we plug this formula into R, over the x range of -4 to +4…

> curve((1/sqrt(2*pi))*exp(-x^2/2),
+ -4,4,ylab='Density')

This curve is useful for a variety of HR analytic applications (e.g., evaluating adverse impact using a z-test for proportions).

But we don’t actually need the formula to derive this curve.

In fact, we can produce it from statistics that are completely unrelated to whatever our actual analytic context is.

The normal curve (or some transformation of it) describes how scores, measurements, and statistics commonly pile up.

As such, we can approximate this curve simply by piling up many such values (using simulation) and then checking the relative heights throughout the distribution.

It’s okay if that doesn’t make sense yet. Let’s walk through an example…

First, some context for our demonstration.

In one recent post, I showed how to calculate the p-value for a correlation coefficient (r) using an empirically derived null distribution.

Basically, I generated two columns of random data and correlated them. Random data don’t correlate with anything, so any finding other than r = 0 was due to randomness.

I did this 1 million times and piled up the resulting correlations into a null distribution. (Incidentally, the fabled “p-value” is the proportion of the distribution at least as extreme as the observed r calculated using real data.)

In the bonus section at the end of the post, I noted that the sampling distribution might have appeared normal (Gaussian), but it wasn’t, because there were floor and ceiling effects happening.

This is necessarily the case, because correlation coefficients are defined such that -1 ≤ r ≤ +1. This “crushes” the distribution in toward zero from both the left and right.

But what if there were no lower or upper bound?

There’s a solution involving Fisher’s z transformation, which essentially removes the floor and ceiling by stretching them out toward negative and positive infinity, respectively.

Instead, I’m going to use a method that I find even more intuitive: Simulate a sufficiently large number of correlations, each based on sufficiently large samples, so that the floor and ceiling effects become almost unnoticeable.

  1. The larger the samples (i.e., number of datapoints in each column), the narrower the sampling distribution becomes, which increases its distance from the floor and ceiling, thereby minimizing their crushing effect.
  2. And the more correlations we simulate overall, the more precisely the sampling distribution will converge on a normal distribution.

This time, I’m going to simulate the data using flat, uniform distributions (i.e., runif() rather than rnorm()), just to show that the normal curve isn’t emerging due to some “special case” like starting out with normal data.

I’ll use a sample size of n = 500, which is a bit of overkill, but that’s okay.

And I’ll run the simulation a million times (reps = 1e6), which is ALSO overkill.

What? I like overkill.

> # Setup
> n=500; SE=1/sqrt(n-1); reps=1e6
> set.seed(123)
> rs=replicate(reps,cor(runif(n),runif(n)))

^^Here’s the breakdown…

  • The standard error (SE) is the standard deviation of the sampling distribution, which is an index of spread. If the true correlation is 0 (which it is in this case), then the standard approximation is 1/√(n ‒ 1).
  • I’m arbitrarily setting the seed as “123” for reproducibility.
  • The replicate() line is simulating a million pairs of columns of random data (each with 500 values) and correlating them.

It took my device ~57 seconds to run that code. (A million times is a lot.) If you want to run this faster on your device, just use reps=1e5.

Next, let’s see what the histogram of simulated rs looks like.

> # Histogram Version
> (h=hist(rs,breaks=50,main='',
+ xlab='Simulated Correlations',col='#99CCFF'))
> curve(dnorm(x,0,SE)*1e6*diff(h$breaks[1:2]),
+ add=T,col='firebrick3',lty=2,lwd=2)

What do you know? The distribution of simulated correlations is nearly identical to a normal distribution!

A few technical comments on the code above…

  • I assigned the histogram to “h” and put that entire first snippet inside parentheses so that it would show me the plot AND save the histogram information for repeat use in the next few lines.
  • The second snippet plots the theoretical normal curve, scaling it vertically by the number of simulations (1e6) and the width of a given bar (diff(h$breaks[1:2])). In other words, this expresses the curve in terms of frequencies, NOT densities.

Finally, let’s move this into the realm of the standard normal distribution, which is where we would be working in a real-world application like evaluating adverse impact with a z-test for proportions.

> # Density Version
> d=density(rs/SE)
> plot(d,xlim=c(-4,4),ylim=c(0,.4),main='',bty='n',
+ xlab='Simulated rs (SE Units)',ylab='Density')
> curve(dnorm(x),add=T,col='firebrick3',lty=2,lwd=2)

This is the same as the histogram, except we’ve…

  1. Used kernel density estimation to smooth out the bars into a clean, pretty curve.
  2. Divided by the SE, which means the x-axis is now expressed in SE units. (This is the scale typically used to calculate p-values.)

Let’s run a few quick checks to make sure that we get approximately the same densities (i.e., curve heights) regardless of which method we use…

> # Comparisons
> z=c(-3,-2,-1,0,1,2,3)
> # Theory Prediction vs. Empirical Finding
> round(dnorm(z),3); round(approx(d$x,d$y,xout=z)$y,3)
[1] 0.004 0.054 0.242 0.399 0.242 0.054 0.004
[1] 0.005 0.054 0.243 0.396 0.241 0.054 0.004

^^Here, we have the heights of the curves for 7 different values (-3, -2, -1, 0, 1, 2, 3). The two methods match to within ~.003.

If we wanted them to match even more precisely, we could increase the number of simulated correlations (1e7? 1e10?). But that would take a long time on my device.

And besides, we’ve already demonstrated the point we wanted to.

A normal curve is just the way that particular values tend to pile up under certain conditions; the intimidating PDF formula is simply capturing how that piling occurs.

You can do anything you want (including calculating p-values and the like) without ever touching the formula. The same results can be produced to some satisfactory approximation using simulation.


Discover more from Osborn Learning & Analytics, LLC

Subscribe to get the latest posts sent to your email.