You are on page 1of 3

Kardi Teknomo's Tutorial on

Mahalanobis distance between two groups of data


Each group contain 2 variables

Centered data
Group 1 Group 2 Group 1 Group 2
No x1 y1 x2 y2 x1 y1 x2
1 2 2 6 5 -1.90 -2.30 -0.20
2 2 5 7 4 -1.90 0.70 0.80
3 6 5 8 7 2.10 0.70 1.80
4 7 3 5 6 3.10 -1.30 -1.20
5 4 7 5 4 0.10 2.70 -1.20
6 6 4 2.10 -0.30
7 5 3 1.10 -1.30
8 4 6 0.10 1.70
9 2 5 -1.90 0.70
10 1 3 -2.90 -1.30

Mean 3.9 4.3 6.2 5.2

4 This worksheet is provided to


copyright © Kardi Teknomo
3
visit more complete tutorial in
2

0
0 1 2 3 4 5 6 7 8 9
Group 1 Group2
Covariance of Group 1
x1 y1
x1 3.89 0.13
y1 0.13 2.21
Group 2
y2 Covariance of Group 2
-0.20 x2 y2
-1.20 x2 1.36 0.56
1.80 y2 0.56 1.36
0.80
-1.20 Total data of group 1 10
Total data of group 2 5
Total data 15

Pooled Covariance Matrix Inverse Pooled Covariance matrix


x y x y
x 3.05 0.27 x 0.332 -0.047
y 0.27 1.93 y -0.047 0.526

mean difference (G1-G2)


-2.3
-0.9

Mahalanobis (G1, G2) 1.41

This worksheet is provided to accompany Similarity Measurement tutorial


copyright © Kardi Teknomo 2005-2010
visit more complete tutorial in http://people.revoledu.com/kardi/tutorial/Similarity/
ance matrix

You might also like