HP Forums
Probability Functions: order of arguments insanity - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Probability Functions: order of arguments insanity (/thread-2118.html)



Probability Functions: order of arguments insanity - rkf - 09-12-2014 04:55 AM

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.


RE: Probability Functions: order of arguments insanity - parisse - 09-13-2014 08:31 AM

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.


RE: Probability Functions: order of arguments insanity - Primeoprime - 09-21-2014 05:14 PM

(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 !"


RE: Probability Functions: order of arguments insanity - Michael - 09-21-2014 09:23 PM

Keep on rocking, Naomi!


RE: Probability Functions: order of arguments insanity - parisse - 09-23-2014 06:45 AM

(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.


RE: Probability Functions: order of arguments insanity - rkf - 09-24-2014 05:52 AM

(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.


RE: Probability Functions: order of arguments insanity - parisse - 09-24-2014 07:21 AM

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.