Skip to content
BIASED

Multivariate Gaussians

Block 1 of 8~2 min

One dimension: shift and scale

The topic What generative modeling is left two things to build: the Gaussian noise that most models start from, and a way to measure how far a model is from the data. This topic builds the first; the second is the next topic.

In one dimension a Gaussian, or normal distribution, has two parameters, a mean μ\mu and a variance σ2\sigma^2:

N(x; μ,σ2)=12πσ2 exp⁡ ⁣(−(x−μ)22σ2).\mathcal N(x;\, \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}}\, \exp\!\Big(-\frac{(x - \mu)^2}{2\sigma^2}\Big).

The second argument is always the variance, never the standard deviation: N(0,4)\mathcal N(0, 4) has σ=2\sigma = 2. The standard normal N(0,1)\mathcal N(0, 1) is the one with μ=0\mu = 0 and σ=1\sigma = 1.

Every Gaussian is a shifted and stretched standard normal. Standardizing sends x∼N(μ,σ2)x \sim \mathcal N(\mu, \sigma^2) to ε=(x−μ)/σ∼N(0,1)\varepsilon = (x - \mu)/\sigma \sim \mathcal N(0, 1), and the inverse map goes back:

x=μ+σε,ε∼N(0,1).x = \mu + \sigma\varepsilon, \qquad \varepsilon \sim \mathcal N(0, 1).

So one random number generator, for N(0,1)\mathcal N(0, 1), serves every 1-D Gaussian. With μ=2\mu = 2 and σ=1.5\sigma = 1.5 the draw ε=1\varepsilon = 1 becomes x=3.5x = 3.5: one standard deviation above its mean, just as ε\varepsilon was above its own.

Answers are saved on the server and tied to this browser until you sign in.