Forums

Regarding probability of Gaussian distribution

Started by Roshan Martis December 26, 2006
Hi Everybody,

I am working on pattern matching of EEG signals. Also I am new to this area. First I segmented the EEG. Each segment is of 200 samples. I have such 64 vectors. I made two templates. One is normal EEG and the other one is abnormal EEG. All the 64 vectors cluster around these two patterns. The probability of a vector belonging to a cluster is Gaussian distributed. The probability is given as
p(x) = (1/(2*pi)^d/2 |C|^1/2)exp(-1/2*(x-m)inv(C)(x-m)
d-dimension
C-covariance matrix of the model
m-mean of the model
x-random variable representing the model

I have attached the program below

I am getting absurd result. That is sum of the probabilities of a vector belonging to two different clusters is not equal to 1.
I request you if any one of you know this please let me know.

% There are 64 vectors in the data
% Two templates normal and abnormal

%Initialization
normala(1,:);
abnormala(2,:);

pp1=[];
pp2=[];p1=0;
p2=0;
currenta(3,:);
m1=mean(normal);
m2=mean(abnormal);
c1=cov(normal);
c2=cov(abnormal);
p1=1/(((2*pi))*c1^0.5)*exp(-0.5*((current-m1))*(current-m1)'/c1);
p1=1/(((2*pi))*c2^0.5)*exp(-0.5*((current-m2))*(current-m2)'/c2);

Yours Sincerely,

ROSHAN JOY MARTIS
1st Year M. Tech Student
Manipal Institute of Technology
Manipal, South India.