Variance of n-dimension data

51 Views Asked by At

I have a set of points in 3d space (x,y,z), and I'd like an indicator of how spread out they are. I'm thinking of using variance, but I've only seen it used for 1d data.

I assume that I would calculate the variance for each component then average it :

$$ \sigma^2(dataset) = mean(\sigma^2(dataset_{x}), \ \sigma^2(dataset_{y}),\ \sigma^2(dataset_{z})) $$

But, I'm probably wrong in my approach.

Any recommendations ? It doesn't necessarily have to be the variance (or standard deviation for that matter), I just need a scalar value indicator (so not a covariance matrix).

Thanks

Edit : After doing some research, I found here that the covariance matrix can be explained in scalar form by its trace ($tr(C)$). Do you this is correct ?