diff options
author | Robert Kern <robert.kern@gmail.com> | 2008-08-12 22:01:42 +0000 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2008-08-12 22:01:42 +0000 |
commit | c05d81d020f93edfc4fe1295c40b69174f62be4f (patch) | |
tree | c89ef36e3524c0b9a84e3e5a059d961669af43ae | |
parent | 31b18be11e48894738aa58620ac2d2307c8b4932 (diff) | |
download | numpy-c05d81d020f93edfc4fe1295c40b69174f62be4f.tar.gz |
BUG: F distributions need the appropriate scale factor.
-rw-r--r-- | numpy/random/mtrand/distributions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c index 0e64913b7..a4eaff66e 100644 --- a/numpy/random/mtrand/distributions.c +++ b/numpy/random/mtrand/distributions.c @@ -225,7 +225,8 @@ double rk_noncentral_chisquare(rk_state *state, double df, double nonc) double rk_f(rk_state *state, double dfnum, double dfden) { - return rk_chisquare(state, dfnum) / rk_chisquare(state, dfden); + return ((rk_chisquare(state, dfnum) * dfden) / + (rk_chisquare(state, dfden) * dfnum)); } double rk_noncentral_f(rk_state *state, double dfnum, double dfden, double nonc) |