I have some code that calculates deviation from the mean for a series of univariate data. It calculates the mean and stddev for a window of data points, and compares the latest datapoint using $\mu$ and $\sigma$.
Pretty simple, my question is how do I extend this to higher dimensions. Basically if my datapoints are now vectors $(x1,x2,x3)$ say, how can I find how far a datapoint is from the mean?