[Haskell-cafe] Testing for statistical properties

Tom Nielsen tanielsen at gmail.com
Fri Jan 8 05:59:11 EST 2010


Hi Greg,

Assuming this is a one-dimensional distribtution, you should use a
kolmogorov-smirnov test to test this:

http://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test

I've implemented to the KS distribution from the CERN code linked in
the wikipedia article, here:

http://github.com/glutamate/samfun/blob/master/Math/Probably/KS.hs

(warning, i wasn't able to verify the numbers coming out against
anything so just check that it makes sense)

So all you have to do is to find the maximal distance between your
samples and the cumulative density function, multiply by the sqrt. of
of the number of samples, and calculate kprob on that.

I don't think you can do this in a Bayesian way because you can't
enumerate all the other distributions your samples could come from?

Tom

On Thu, Jan 7, 2010 at 9:31 PM, Gregory Crosswhite
<gcross at phys.washington.edu> wrote:
> Hey everyone!  I have some computations that satisfy statistical properties which I would like to test --- that is, the result of the computation is non-deterministic, but I want to check that it is sampling the distribution that it should be sampling.  Is anyone aware of a Haskell library out there that does anything like this?
>
> Cheers,
> Greg
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list