# Questions tagged [mahalanobis]

The tag has no usage guidance.

31 questions
Filter by
Sorted by
Tagged with
1k views

### Is there a version of the Mahalanobis distance for matrices?

I'm working on a computer vision problem and I want to use the Mahalanobis distance to cluster image patches (2D matrices having the same dimensions). I haven't been able to find any generalisation up ...
242 views

### Something like Mahalanobis distance when the copula is not Gaussian

Mahalanobis distance accounts for different variances of the marginal variables and correlations between the marginal variables. However, there is an implicit (maybe explicit) assumption that ...
1k views

### What are the pros and cons of using mahalanobis distance instead of propensity scores in matching

I learned about this option of using mahalanobis distance instead of PS to do matching from the matchit() function in R. It seems a more nonparametric approach. Could you state its pros and cons and ...
183 views

### How to find the variance(s) of a bivariate normal density such that 95% of the mass is within a certain radius from the mean defined by a point A?

I would like to find the variance of a bivariate normal density (BND), centered at the mean M, such that 95% of its mass is within a certain radius, which depends on the position of a point, A. (Note: ...
107 views

### Why does this formula produce $p_{2}$ probabilities for Mahalanobis distances?

At the IBM website it is written that The p1 probabilities are standard probabilities of an observation from a multivariate normal distribution being that far or further from the centroid, ...
887 views

### Understanding the R stats mahalanobis() function's Output

An acquaintance recommended I use the Mahalanobis distance on my data instead of Euclidean, Manhattan, etc. I tried using the mahalanobis() function in the R stats package on a data matrix with N ...
55 views

### How to determine an appropriate "closeness" threshold when matching for causal inference?

Say I have a [yes/no] treatment variable (e.g. the customer complained about their order) and I want to estimate the causal impact of this "treatment" on the average customer's future spend. ...
6k views

### Mahalanobis Distances Critical Values (Chi-Squared?)

Say I work out the mahalanobis distance 'D' to measure the separation between two objects (which aren't normally distributed). Say I now want to use 'D' against some critical values to decide if it's ...
2k views

### the Chi-squared distribution and Mahalanobis

I'm doing some simulations in C++ and OpenGL (2D and 3D) for navigating a robot in unknown environment known as SLAM. I'm using Extended Kalman filter as an optimal estimator. In SLAM problem, once ...
25 views

### Mahalanobis Distance question in r

I have a question when calculating Mahalanobis Distance using R. For the Mahalanobis distance function below: mahalanobis(x, center, cov, inverted = FALSE, ...) The center in the function above should ...
48 views

### Is there an intuition about the matrix operations in the exponent of the multivariate normal distribution?

In the exponent of the multivariate distribution, there are 2 vectors and a square matrix multiplied together to get a scalar result: $$(\mathbf{x} - \mu)^{\text{T}}\Gamma^{-1}(\mathbf{x} - \mu)$$ ...
280 views

### Anomaly detection using Mahalanobis distance

I am using Mahalanobis distance to identify outliers. I am training using kind of one class classification,by training only on positive samples and trying to predict negative samples using distance ...
29 views

### Detect outliers / detect classes

Currently I have a dataset that contains several products with different prices and quantities. My goal is to detect if the given product was sold as a package or as a unit and I have used the ...
439 views

### Mahalanobis distance between 2 points doesn't work when covariance matrix has values close to 0 [duplicate]

I am working on a project where I am trying to replicate a randomized experiment from an observational study data, using Mahalanobis distance matching to ensure that the control and treated groups are ...
99 views

### How can I use factor analysis to identify variables that contribute most to Mahalanobis distance?

I have 400 samples chemically analysed for 48 elements. Some elements are correlated. My goal is to identify outliers in a multivariate space, samples that are unique in their composition. I compute ...
974 views

### Distribution of the Mahalanobis distance between two samples from a Gaussian distribution

Let $\mathbf{X}=(X_1,\dots,X_p)\sim\mathcal{N}(\mu,\Sigma)$ be a Gaussian random vector. We all know that $$d^2(\mathbf{X},\mu) = (\mathbf{X}-\mu)^T\Sigma^{-1}(\mathbf{X}-\mu)$$ has a $\chi^2_p-$...
953 views

### assumptions to compute mahalanobis distance

Which are the assumptions to compute the Mahalanobis distance between two groups? Do all the variables of the two groups be normal distributed?
44 views

### When running a multiple regression, are both dependent and independent variables scanned for outliers?

I want to run a multiple regression analysis using SPSS. I have used the Mahalanobis d square method to find outliers. However my question is, do I add the dependent variable to the list of ...
251 views

### Mahalanobis Distance for Continuous and Ordinal Covariates

My dataset of home sales includes covariates such as square_feet which are continuous and others like num_bedrooms which are in <...
84 views

### Discordance between various methods of multivariate outliers detection

Here is a small "toy example" dataset, with 15 individuals described by 6 variables (this is R language): ...
24 views

### How to find 'influential points' in multivariate data with weak covariance

Part-1: I have used PCA and Mahalanobis distance to find outliers. But in both cases, only the highest or lowest values are detected as outliers. I am looking for a way that any data point that does ...
14 views

### Calculating Mahalanobis distance using SPSS

I am a doctoral student who is still learning programming and statistics. I am really struggling with a problem and need help from this community help in calculating a new variable using Mahalanobis ...
27 views

10 views

### Alternative way of solving Mahalanobis distance

Mahalanobis distance is given by: $(x-\mu)^T \Sigma^{-1}(x-\mu)$ Apparently the solution to the above formula is equivalent to: $Trace(\Sigma^{-1} (x-\mu)(x-\mu)^T)$ How can you prove that the two are ...