Changeset 1618 for trunk/test/kolmogorov_smirnov_test.cc
 Timestamp:
 Nov 6, 2008, 4:58:08 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/kolmogorov_smirnov_test.cc
r1617 r1618 78 78 double p = ks.p_value(n); 79 79 double p_correct = 2.0/11.0; 80 double margin = 5*std::sqrt(n*p_correct)/n;80 double margin = 10*std::sqrt(p_correct*(1p_correct)/n); 81 81 if (p>p_correct+margin  p<p_correctmargin) { 82 82 suite.err() << "Error: pvalue: " << p << "\n" … … 95 95 ks.add(i+0.5, i<2); 96 96 suite.add(suite.equal(ks.score(), 1.0)); 97 size_t n=1000 ;97 size_t n=100000; 98 98 double p = ks.p_value(n); 99 99 double p_correct = 0.2; 100 double margin=10*std::sqrt( n*p_correct)/n;100 double margin=10*std::sqrt(p_correct*(1p_correct)/n); 101 101 if (std::abs(pp_correct)>margin) { 102 102 suite.add(false);
Note: See TracChangeset
for help on using the changeset viewer.