diff --git a/src/BBS-Numerical-Statistics.adb b/src/BBS-Numerical-Statistics.adb index 54d9f1d..c6da9d2 100644 --- a/src/BBS-Numerical-Statistics.adb +++ b/src/BBS-Numerical-Statistics.adb @@ -91,7 +91,7 @@ package body BBS.Numerical.Statistics is begin if x > 0.0 then return (elem."**"(x, (f'Base(k)/2.0)-1.0)*elem.Exp(-x/2.0))/ - (elem."**"(2.0, (f'Base(k)/2.0)*funct.gamma2n(k))); + (elem."**"(2.0, (f'Base(k)/2.0))*funct.gamma2n(k)); else return 0.0; end if; diff --git a/test/test_stats.adb b/test/test_stats.adb index 0f1d68f..6d00fe3 100644 --- a/test/test_stats.adb +++ b/test/test_stats.adb @@ -46,9 +46,9 @@ begin Ada.Text_IO.Put(" "); float_io.Put(stat.normal_cdf(0.0, val, 20), 1, 5, 0); Ada.Text_IO.Put(" "); - float_io.Put(stat.chi2_pdf(val, 2), 1, 5, 0); + float_io.Put(stat.chi2_pdf(val, 1), 1, 5, 0); Ada.Text_IO.Put(" "); - float_io.Put(stat.chi2_cdf(0.0, val, 2, 20), 1, 5, 0); + float_io.Put(stat.chi2_cdf(0.0, val, 1, 20), 1, 5, 0); Ada.Text_IO.New_Line; end loop; end test_stats;