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/(12
k²) 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/(3
n); 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.)