[EMAIL PROTECTED] writes:
> On Tue, 26 Oct 2004 13:38:21 +0200 (CEST), [EMAIL PROTECTED] wrote :
>
> >
> >Dear all,
> >
> >it looks like rhyper() gives wrong results compared to theory and compared
> >to sample() and rghyper(SuppDists).
>
> I agree, these results look wrong. The mean also seems high:
Yup, and inconsistent with phyper and dhyper (which is a good thing I
suppose)
> mean(rhyper(1e5,100,60,50))
[1] 31.47707
> sum(phyper(0:50,100,60,50,lower=F))
[1] 31.25
> sum(0:50*dhyper(0:50,100,60,50))
[1] 31.25
Looks like the effect is not due to the choice of random number
generator:
> RNGkind("Super-Duper")
> mean(rhyper(1e5,100,60,50))
[1] 31.45755
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel