[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kolmogorov_smirnov_test
From: |
Olli Saarela |
Subject: |
Re: kolmogorov_smirnov_test |
Date: |
Wed, 11 Jun 2008 19:33:33 +0300 |
User-agent: |
Thunderbird 2.0.0.14 (Windows/20080421) |
But still I am very suspicious about this test.
When I run
p = kolmogorov_smirnov_test(rndnorm, "normal", 0.47977, 0.34159)
I get p=0 and it is ok with me.
But when I change mean and var to any random numbers I get exactly the
same result!!!
In statistical testing, the more data points you have, the smaller
deviations are found statistically significant. Earlier you wrote the
rndnorm vector has 1e5 values that are most likely normally distributed.
This is such a large number, that even relatively small changes in the
distribution are statistically significant.
Simulating your case:
> x = sqrt(0.34159) * randn(1e5, 1) + 0.47977;
> kolmogorov_smirnov_test(x, "normal", 0.47977, 0.34159);
pval: 0.958304
> kolmogorov_smirnov_test(x, "normal", 0.475, 0.34159);
pval: 0.0318814
> kolmogorov_smirnov_test(x, "normal", 0.47, 0.34159);
pval: 1.27959e-005
Unless your "random mean and var values" are both very close to the
actual values in the data AND the distribution of the data is very close
to normal, the answer p=0 is a good approximation.
Cheers,
Olli