Not quite. The calculation is similar to what you've proposed except that centroids are expressed in n-dimensional space, in this case 3 dimensions. So, if your axes are x, y and z there would be three separate calculations: Centroid_X=(x1+x2+x3)/3 Centroid_Y=(y1+y2+y3)/3 Centroid_Z=(z1+z2+z3)/3 The centroid is then the mean of these points, a point that minimizes both the mean distance from the centroid and the mean squared distance...minimizing intra-cluster variance.
... View more