[R] choose(n, k) for k>n: An inconsistency?

Trenkler, Dietrich dtrenkler at nts6.oec.uni-osnabrueck.de
Wed Dec 13 16:56:39 CET 2000


It took me by surprise to find that  choose(4,5) delivers

[1] NaN
Warning message:
NaNs produced in: choose(n, k)

If we look at choose(4,5) as the number of ways of choosing 
5 objects from 4 I would have expected 0 as result.

Furthermore dhyper(5,4,6,5) does deliver 0 and this essentially 
equivalent to choose(4,5)*choose(6,0)/choose(10,5).
                                                               

I use R  for Windows, Version 1.0.1  (April 14, 2000)

   --- D.Trenkler ---

****************************************************************************
*****
   Dr. Dietrich Trenkler        (dtrenkler at nts6.oec.uni-osnabrueck.de)      
   Statistik / Empirische Wirtschaftsforschung
   Universitaet Osnabrueck
   Rolandstrasse 8                                Phone: +49(0) 541-969-2753
   D-49069 Osnabrueck                          Fax  : +49(0) 541-969-2744
   GERMANY
****************************************************************************
*****



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list