cas/xcas implementation of Geometric PDF
05-09-2021, 06:40 PM
Post: #1
 Wes Loewer Senior Member Posts: 427 Joined: Jan 2014
cas/xcas implementation of Geometric PDF
I've been wondering about the Geometric PDF/CDF/ICDF functions on the Prime. The syntax for the PDF is:

GEOMETRIC(p,k) which gives the probability of the first success occurring on the kth trial, ie, (1-p)^(k-1) * p

On other implementations that I have seen, the Geometric PDF is a discrete PDF, requiring k to be a natural number. While the xcas help screen indicates that k is an integer, both xcas and Prime cas allow k to have any positive decimal value. In essence, this makes Geometric a continuous distribution.

My question is whether this was intentional? And if so, what would be an example application of using the Geometry PDF in such a continuous manner? Does a continuous Geometric PDF have a physical meaning?

The CDF version likewise allows decimals for k, applied to the usual 1-(1-p)^k. One side-effect of this is that the behavior differs from other continuous pdf's in that the cdf is no longer the area under the pdf curve.

chisquare_cdf(12,10) = ∫(chisquare(12,x),x,0,10)

but

GEOMETRIC_CDF(0.3,4) ≠ ∫(GEOMETRIC(0.3,x),x,0,4)

From this it would seem that the Geometric CDF/PDF's are really intended to be discrete.

Usually on discrete inverse functions, the returned value can only be a whole number, but no such rounding is done with GEOMETRIC_ICDF(), like a continuous function.

So the implementation has characteristics of both discrete and continuous pdf's. Maybe someone can shed some light on this.
 « Next Oldest | Next Newest »

 Messages In This Thread cas/xcas implementation of Geometric PDF - Wes Loewer - 05-09-2021 06:40 PM RE: cas/xcas implementation of Geometric PDF - parisse - 05-10-2021, 06:23 PM RE: cas/xcas implementation of Geometric PDF - Wes Loewer - 05-12-2021, 06:37 PM

User(s) browsing this thread: 1 Guest(s)