[ 
https://issues.apache.org/jira/browse/MATH-437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932361#action_12932361
 ] 

Mikkel Meyer Andersen commented on MATH-437:
--------------------------------------------

The last part of the roundedK kan be replaced with
{{
double pFrac = Hpower.getEntry(k - 2, k - 2);

for (int i = 1; i <= n; ++i) {
        pFrac *= (double)i / (double)n;
}

return pFrac;
}}
to get even better running time and still precise results:
{{
F(n, x) = F(200, 0.02):
                                 Lecuyer (3.0 ms.) = 5.151982014280042E-6
   KolmogorovSmirnovDistribution exact (760.0 ms.) = 5.15198201428005E-6
   KolmogorovSmirnovDistribution !exact (16.0 ms.) = 5.151982014280049E-6
-------------------------


F(n, x) = F(200, 0.031111):
                                 Lecuyer (2.0 ms.) = 0.012916146481628863
 KolmogorovSmirnovDistribution exact (51902.0 ms.) = 0.012149763742041911
    KolmogorovSmirnovDistribution !exact (9.0 ms.) = 0.012149763742041922
-------------------------


F(n, x) = F(200, 0.04):
                                 Lecuyer (0.0 ms.) = 0.1067121882956352
  KolmogorovSmirnovDistribution exact (5903.0 ms.) = 0.10671370113626812
    KolmogorovSmirnovDistribution !exact (6.0 ms.) = 0.10671370113626813
-------------------------
}}

> Kolmogorov Smirnov Distribution
> -------------------------------
>
>                 Key: MATH-437
>                 URL: https://issues.apache.org/jira/browse/MATH-437
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Mikkel Meyer Andersen
>            Assignee: Mikkel Meyer Andersen
>            Priority: Minor
>         Attachments: KolmogorovSmirnovDistribution.java
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Kolmogorov-Smirnov test (see [1]) is used to test if one sample against a 
> known probability density functions or if two samples are from the same 
> distribution. To evaluate the test statistic, the Kolmogorov-Smirnov 
> distribution is used. Quite good asymptotics exist for the one-sided test, 
> but it's more difficult for the two-sided test.
> [1]: http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to