HP Forums

Full Version: Probability Functions: order of arguments insanity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A student in a German HP Prime forum came up with the reasonable question, why following inconsistency was implemented (cited via copy&paste from User_Guide_EN.pdf):

for the density function:

BINOMIAL(n,k,p)

for the cumulative distribution function:

BINOMIAL_CDF(n,p,k)

What the heck was the reason for swapping the order of 2nd and 3rd arguments? Please please HP, enlighten us!!

Kind regards,
Ralf.
The CAS accepts both syntax for binomial: binomial(n,p,k) and binomial(n,k,p), it checks whether the second argument is a real in 0..1 or an integer. The reason to accept both syntax is for compatibility with binomial(n,k)==comb(n,k) and binomial_cdf and icdf argument order consistency.
(09-13-2014 08:31 AM)parisse Wrote: [ -> ]The CAS accepts both syntax for binomial: binomial(n,p,k) and binomial(n,k,p),

Hallo Parisse,

mine doesn´t accept both.. it gives me error in that case:binomial(n,p,k) and also in that case: binominal_CDF(n,k,p) Shows "Fehler:ungültige Eingabe" (it knows German)

My Casio fx-cp 400 CAS, my Ti-nspire Cx CAS and my Casio fx-CG20 too accept in each case only one syntax (defenitely!) , but the same for binomial and binominal_CDF.

So I need no brain capacity to pay attention what biominal entry is asked and it´s so much easier for me to do math at school.

I guess Hp prime is not build for pupils and students. And I can`t recommened HP prime to other pupils in my school. Better they use Casio fx-cp 400 or Ti-nspire Cx CAS or Casio fx-CG20 , which are easier to understand by intuition.

Best regards!
und herzlichst!
Naomi

" All those who agree with me and believe in telekinetics raise my right arm now !"
Keep on rocking, Naomi!
(09-21-2014 05:14 PM)Primeoprime Wrote: [ -> ]
(09-13-2014 08:31 AM)parisse Wrote: [ -> ]The CAS accepts both syntax for binomial: binomial(n,p,k) and binomial(n,k,p),

Hallo Parisse,

mine doesn´t accept both.. it gives me error in that case:binomial(n,p,k) and also in that case: binominal_CDF(n,k,p) Shows "Fehler:ungültige Eingabe" (it knows German)
Make sure you enter the commandnames in lowercase. Also note that binomial_cdf and binomial_icdf take p as second argument, since binomial_[i]cdf(n,k) does not mean anything.
(09-13-2014 08:31 AM)parisse Wrote: [ -> ]The CAS accepts both syntax for binomial: binomial(n,p,k) and binomial(n,k,p), it checks whether the second argument is a real in 0..1 or an integer. ...

I suggest a look at this topic in a German discussion forum, where basically is shown my means of examples, that the statement above is true only in some special cases, but not in general.
It's of course true if p and k have values, not if they are symbolic. There is no good solution anyway, since users will expect p as an optionnal 3rd argument to binomial(n,k) and will expect argument order consistency with binomial_cdf/icdf, whatever it means since the third arg has nothing to do with the k of binomial(n,k,p), you should see this k as a disappearing argument.
Reference URL's