From c05d81d020f93edfc4fe1295c40b69174f62be4f Mon Sep 17 00:00:00 2001 From: Robert Kern Date: Tue, 12 Aug 2008 22:01:42 +0000 Subject: BUG: F distributions need the appropriate scale factor. --- numpy/random/mtrand/distributions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy') 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) -- cgit v1.2.1