You are on page 1of 3

DATA MINING

1) Find the inverse Matrix for the covariance matrix?


Solution:
Given covariance Matrix
=

0.3 0.2
0.2 0.3

Inverse of the given covariance is


Let us assume that

A
C

] [

B
D

0.3 0.2
0.2 0.3

Therefore A=0.3, B= 0.2, C =0.2, D= 0.3.


Inverse of matrix = 1 / AD - BC

D B
C A

Inverse of Covariance matrix = -1

]
[

=1/(0.3*0.3)-(0.2*0.2)

=1/0.09-0.04

= 1/0.05

0.3 0.2
0.2 0.3

0.3 0.2
0.2 0.3

0.3 0.2
0.2 0.3

0.3 /0.05 0.2/0.05


0.2/0.05 0.3/0.05

6 4
4 6

Therefore Inverse of Covariance matrix = -1 =

6 4
4 6

2) Describe in details how did we find the distance from (A, B) =5? And from A to C
which is Mahal (A, C) =4?
Solution:
Given

A= (0.5, 0.5)
B= (0, 1)
C= (1.5, 1.5)

The distance from A to B is


A B= [0.5 0.5] [0 1]
A B= [0.5 -0.5]
Therefore by
Mahal (A,B) = (p-q) -1 (p-q) T
= [0.5 -0.5] *

= [5 -5] *
= 2.5+2.5
=5

To find the distance from A to C


Given A= (0.5, 0.5), C= (1.5, 1.5)
So the distance from A to C is
So A C = [-1 -1]

6 4
4 6

0.5
[0.5
]

] [ ]
*

0.5
0.5

Mahal (A, C)

= [-1 -1] *

= [-2 -2] *

[1
1 ]

6 4
4 6

] [ ]
*

1
1

= 2+2
=4

3) Find the distance between B and C which is Mahal(B,C)?


Solution:
To find the distance from B To C
Given B= (0, 1), C= (1.5, 1.5)
The distance from B to C is
So B C = [-1.5 -0.5]
Mahal (B, C) = [-1.5 -0.5] *

= [-7 3] *
= 10.5 - 1.5
=9

6 4
4 6

[1.5
0.5 ]

] [ ]
*

1.5
0.5

You might also like