private void computeMoments() {
		if (valid) throw new IllegalStateException();
		centralMoments = new double[6];
		centralMoments[0] = 1.0;
		centralMoments[1] = 0.0;
		int n = isInt ? iArray.length : dArray.length;
		for (int i = 0; i < n; i++) {
			double x = isInt ? iArray[i] : dArray[i];
			x -= mean;
			double m = x;
			for (int j = 2; j < centralMoments.length; j++) {
				m *= x;
				centralMoments[j] += m;
			}
		}
		for (int i = 2; i < centralMoments.length; i++) {
			centralMoments[i] /= n;
		}
	}