Learning Science April 16, 2026 2 min read

Visualizing the Normal Distribution

A hands-on look at the normal distribution using an interactive canvas demo and KaTeX notation, rendered from the @s4mple/math study library.

The normal distribution shows up everywhere — in measurement error, in test scores, in sampled means. It is worth a careful look, because the shape of the curve controls the intuitions we form about uncertainty.

The density function

The probability density function is:

Two parameters control the shape. The mean μ\mu slides the peak left and right. The standard deviation σ\sigma stretches or tightens the curve around the peak.

−5−4−3−2−1012345μ1σ−1σ2σ−2σ3σ−3σx
μ 0.00
σ 1.20

Each animation here is a Svelte component from @s4mple/math, imported directly into the post. Dropping a new visualization into a post is a one-line affair.

Meet the contributors

Before we build up a normal from many samples, it helps to know the cast. The simulation below uses a handful of shapes, and each one is defined by only a couple of parameters. Try moving the sliders and watching the shape respond.

Beta — two dials for every shape

The Beta distribution lives on [0,1][0, 1] and is controlled by two shape parameters α\alpha and β\beta. Crank α\alpha up and the mass slides to the right; crank β\beta up and it pulls left. Set them equal and the curve is symmetric. Set them both below 1 and the mass flees to the corners.

0.00.20.40.60.81.0xμ1σ−1σ2σ3σ
α 2.00
β 5.00

Uniform — everything is equally likely

The uniform density puts equal weight on every point of its support. It is the simplest distribution with positive width, and it is a convenient stress test for the central limit theorem because even a flat input produces a bell-shaped sum.

−2.0−1.5−1.0−0.50.00.51.01.52.0xμ1σ−1σ
a 0.00
b 1.00

The central limit theorem, piece by piece

The demo below concatenates samples from a row of different-shaped distributions. Each colored stick is one sample. Press Sample and the stick endpoint drops into the histogram below. Keep sampling and a bell curve starts to emerge — no matter how jagged the input shapes. Add or remove contributors with the per-distribution counters to watch how N controls the convergence.

06.0

Notice what happens as you grow N. With a single contributor the histogram simply traces that distribution’s shape. Add a few more and the peaks round out. Past roughly N = 10 the bell fit (the blue overlay) glides right onto the histogram for almost any combination of contributing shapes.

S4mple is built on this research

Flashcards live inside your markdown notes so they stay in sync with your understanding. The scheduling algorithm handles interval timing. The hide-and-reveal system turns any part of your notes into a retrieval exercise.

Support: support@s4mple.com · Discord · © 2026 S4mple

Apple, the Apple logo, iPhone, iPad and Mac are trademarks of Apple Inc., registered in the U.S. and other countries. App Store is a service mark of Apple Inc.