Sunday, October 08, 2006

Kolmogorov-Smirnov test

I was going to talk about this issue in 3rd session under title of "significant response". But as a brief answer to dear Ali I can say:
Kolmogorov-Smirnov test is a non-parametric test of distribution. If you use a one sample KS test you can find out that is there any significant difference between the data and a specific distribution (eg normal). Two sample KS test can catch the significant distribution difference of two data sets.
It is obvious that any kind of t-test can not catch the significant distribution difference in one or two set of data even though one of its preliminary conditions is the normal distribution of two data sets.
t-test if is used as a test for finding the significant response can only show you the mean firing rate of two window of spike trains are the same or not. And you should be careful. not all form of spike trains can satisfy the preliminary conditions of t-test which is normal distribution of data sets.
So, In terms of significant neural responses, KS test can be used in two ways: one sample KS test can find the significance level of a spike train. It can be used for finding the onset or offset latency, or such a significance crossing thresholds.
Two sample KS test can be used as a measure for comparing a window of response to another one in response or spontaneous activity.
Notice that because KS test examines the distribution is more stringent test and senses the small differences better. the other side of story is that even if the mean and variance of two distribution is the same, it dose not mean that you can nessesarilly get the non-significance difference.
You can use KS test in matlab by kstest for one sample and kstest2 for two sample.
We will work practically on both of these tests.

No comments: