Why a uniform has variance a²/3: stack the squares

The variance of a zero-mean W is its average square, E[W²]. For W uniform on [−a, a], the sign doesn't change the square, so we need the average of w² for w spread evenly over [0, a]. The answer is a third of the biggest square, a²/3, and here is the picture of why.

1. Stack the squares into a pyramid (drag the 3D figures to turn them)

Left: k values spread evenly over zero to a, each the side of a square anchored at zero, drawn nested. Right: the same squares in 3D, lifted into a stack with the largest at the bottom, forming a staircase pyramid inside an a by a by a box.
k squares 8

2. Three such pyramids fill the box

Three congruent square pyramids, violet, blue and orange, each with a face of the cube as its base and all sharing the cube's back top corner as their apex, sliding together to fill the cube.

3. The same thing in algebra

The stacked pyramid in part 1 is exactly the violet one in part 2: at height z its cross-section is the square of side a − z, which is the set of points whose distance to the back wall in both directions is at most a − z. The blue and orange pyramids are the same shape turned onto the cube's other two faces, and every point of the cube lands in one of the three, according to whether a − z, x, or y is the largest of the three. So each is a third of the cube, and the average square is a²/3. With k evenly spaced values the stack is a staircase, a little bigger than the pyramid at every step, and its average is 1/3 − 1/(12k²) of a²; the sum and the integral agree in the limit. For initialization this is the whole story of the 1/3: the standard init takes a = 1/√n, so Var(W) = 1/(3n); see standard vs. normalized init. (Archimedes' version of the same fact: the area under a parabola y = w² is a third of its bounding box.)