N-dimensional statistics structure.
Well, actually four-dimensional, but set up to handle arbirary dimensions if necessary (really, we just want to get the 2,3,4-d cases into one shared piece of code).