given the mahalanobis distance:
$D_M^2(x) = (x-\mu)^T S^{-1}(x-\mu)$
how can I obtain the probability of $x = ( x_1, x_2, x_3, \dots, x_N )^T$ belonging to the data set given by covariance matrix $S$ and mean vector $\mu = ( \mu_1, \mu_2, \mu_3, \dots , \mu_N )^T$? If sample count is needed this is denoted $m$.
I would like something I can use in a computer algorithm.
Related to this I could ask how to obtain the hyper-ellipsoid that defines the confidence interval for e.g. 95%?