# Normal Distribution

Wave · y = f(x, t)

`y = ∫_(−∞)^x exp(−(u − sin(t))²/2) du/sqrt(2 · π)`

[Open in the app](https://www.wavelace.com/app#p=105) · [This page](https://www.wavelace.com/presets/normal-distribution)

### What it draws

The curve is an integral, computed at every point: `y = ∫ e^(−(u − μ)²/2) du / √(2π)`, from `−∞` up to `x`, with `μ = sin t`. The integrand is the bell curve of the normal distribution with mean `μ` and standard deviation `1`, and the divisor makes its whole area `1`. Integrating from the far left up to `x` gives the area under the bell so far, the probability that a normal draw falls below `x`. That is the cumulative distribution function, `Φ(x − μ)`. The far end is integrated numerically out to a fixed reach, far enough that nothing is lost.

The curve rises from `0` on the left to `1` on the right, through `0.5` at the mean. Its slope there is the bell's peak, `1/√(2π) ≈ 0.399`, the steepest point of the S. The mean slides between `−1` and `1` every `2π ≈ 6.28` seconds at `Speed` 1, and the whole S slides with it, rigid.

### Reading the S

One standard deviation right of the mean the curve reads `0.841`, one to the left `0.159`, and the difference, `68.3%`, is the probability of a draw within one σ. Two standard deviations either side hold `95.4%`. At the edge of the plot, three σ from the mean's farthest position, the curve is within `0.0014` of its limits. The upper quartile sits `0.674` above the mean, where the curve reads `0.75`.

The integral has no closed form in elementary functions, which is why it is drawn here as an integral. A calculator writes it with the error function, `Φ(x) = (1 + erf(x/√2))/2`, itself evaluated by a series. The bell is the derivative of the S, and the S is the running total of the bell.

### History

Abraham de Moivre found the bell curve in 1733 as the limit of the binomial distribution, counting heads in many coin tosses. Carl Friedrich Gauss used it in 1809 as the law of errors in astronomical measurement, and Laplace proved in 1810 that a sum of many independent errors tends to it, the central limit theorem. The name Gaussian stuck, and so did the shape.

### Try

- Draw the density, `exp(−(x − sin(t))²/2)/sqrt(2π)`: the bell itself, peak `0.399` at the mean, sliding the same way.
- Halve the standard deviation, `integral(exp(−(u − sin(t))²/0.5), u, −inf, x)/sqrt(0.5π)`: the S is twice as steep, slope `≈ 0.80` at the mean, and reaches `0.977` one unit above it.
- Swap the limits, `integral(exp(−(u − sin(t))²/2), u, x, inf)/sqrt(2π)`: the survival function `1 − Φ`, the same S mirrored, falling from `1` to `0`.
- Raise `Span of x` to 10: the flats take over, since all but `0.3%` of the rise happens within three units of the mean.

### Read more

- [Normal distribution](https://en.wikipedia.org/wiki/Normal_distribution)
- [Cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function)
- [Error function](https://en.wikipedia.org/wiki/Error_function)
- [Central limit theorem](https://en.wikipedia.org/wiki/Central_limit_theorem)
