The syntax description is here:
http://www.jsoftware.com/jwiki/Addons/stats/base/distribution#binomialdist

A simple working example:

load 'statdist'
binomialdist 0.5 5
NB. 0.03125 0.15625 0.3125 0.3125 0.15625 0.03125

   binomialprob 0.5 5 4 4     NB. what are the odds of getting 4 successes
out of 5 trials with success of 0.5 in any individual trial
NB. 0.15625

The same in R or RStudio:

dbinom(4, 5, 0.5)[1] 0.15625

------------------------------------
Now some unexpected results:

First in RStudio:

> dbinom(41, 2872, 0.0143281399120119)[1] 0.06260893


And now in j602a:
binomialprob 0.0143281399120119 2872 41 41
NB. 0

x: binomialprob 0.0143281399120119 2872 41 41
NB. 0

I also get weird results with this:
binomialdist 0.07 280

And this:
   binomialprob 0.075 280 20 20
NB. _

The last one in RStudio gives this result:

> dbinom(20, 280, 0.075)[1] 0.08980949
--------------------


Is this a bug in j602a statdist package?
My Package Manager shows stats/distribs version as 1.0.2, which is
indicated as the latest.

Regards,
Tarmo Veskioja
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to