octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #39636] nbinpdf has floating point error


From: anonymous
Subject: [Octave-bug-tracker] [bug #39636] nbinpdf has floating point error
Date: Wed, 31 Jul 2013 23:42:12 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0

Follow-up Comment #2, bug #39636 (project octave):

The PMF for negative binomial should be for my example

  nbinpdf(0,3,.5)

((0+3-1) choose 0) * (.5)^3 * (.5)^0 = .125

see http://en.wikipedia.org/wiki/Negative_binomial

Since 1/(1-2/3) = 1/(1/3) = 3, this should also give the same answer, but it
gives .18110 instead.

   nbinpdf(0,1/(1-2/3),.5) 

Perhaps the implementation needs to round the second argument to an exact
integer?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39636>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]