[Rd] choose fails a fundamental property of binomial coefficients (PR#11035)

maechler at stat.math.ethz.ch maechler at stat.math.ethz.ch
Wed Mar 26 12:10:15 CET 2008


>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>     on Wed, 26 Mar 2008 11:02:37 +0100 (CET) writes:

>>>>> "JL" == Jerry Lewis <Jerry.Lewis at biogenidec.com>
>>>>>     on Wed, 26 Mar 2008 05:10:04 +0100 (CET) writes:

      JL> Full_Name: Jerry W. Lewis Version: 2.7.0 (2008-03-23
      JL> r44847) OS: Windows XP Professional Submission from:
      JL> (NULL) (71.184.230.48)


      JL> choose(n,k) = choose(n,n-k) is not satisfied if either

      JL> 1. n is a negative integer with k a positive integer
      JL> (due to automatically returning 0 for n-k<0)


      JL> 2. n is not an integer with k a positive integer (due to
      JL> rounding n-k to an integer, compounded by automatically
      JL> returning 0 if n<0 which implies n-k<0)


    MM> I think you have not really understood from help(choose)
    MM> that we have

    MM> choose(n,k) :=  n(n-1)...(n-k+1) / k!

    MM> defined for non-negative integer k and arbitrary real n

    MM> This definition has the very important property that it is used
    MM> in the 'binomial theorem' and everything depending on that
    MM> theorem,

    MM> (1 + x) ^ \alpha =  \sum_{k=0}^\infty  choose(x,k) x^k

Oops!  "Of course", I meant   'choose(\alpha,k)' , not 'choose(x,k)'

    MM> which holds   for all |x| < 1   for all \alpha \in \R

    MM> -------

    MM> Your "fundamental" property does only hold when  n is
    MM> non-negative integer.

    MM> Definitely no bug in R here!

Martin Maechler, ETH Zurich



More information about the R-devel mailing list