@vv , I am sand15 (now from home)
I understand your argument but disagree with it.
n! is the factorial function, defined for all strictly positive integers, while Gamma(x) is another function buid as an extension, to the complex plane, of the factorial function.
The quantities Prob(X=n | X ~Geometric(p)) make sense only for n >= 0 : unlike the Gamma function there is no extension to the real field. So the command
should return 0 from a pure mathematical point view.
Although correct, is it sufficient ?
I would prefer Maple returns 0 plus a warning to highlight that "n = 5.1" is an impossible event
Now, what about the answer 0.4215152817e-1 ?
Lets take the example of tossing a fair die : what do you think of a student who would answer a non null value when asked to the probability of getting Pi ?
Probably that he/she does not really understand the concept of random variable ?
I think the same thing with regard to " ProbabilityFunction(Geometric(1/3), 5.1) = 0.4215152817e-1 " ... no offense intended
(let us remark that Maple 2015.2 returns 1/6 when asked for ProbabilityFunction(DiscreteUniform(1, 6), Pi) , which is even more stupid))
When I say that discrete distributions are not correctly implemented in Maple, I do not say that all is wrong but that it is not satisfactory.
I think that many of the problems Markyian refers to, come from a mathematically incorrect specification of the Probability (Mass) Function for discrete random variable.
Truth is : if you are aware of this problem and have some basics in probability theory you can say "Oh, it is just a default I can live with" ; but the position "it is absolutely unforgivable" is equally admissible
A few years ago I was developping an algorithm for constructing optimized design of experiments. At some point the algorithm requires to ramdomly select one column of a matrix. If all colums are equally likely, a simple way to do this is randperm(...) ; another way is Sample(DiscreteUniform(..), 1) (which is conceptually more satisfactory)
The former method works well, not the later because Sample(DiscreteUniform(..), 1) returns a real, not an integer (as expected) and the column selection thus fails.
More generally, getting reals when you expect integers may be very annoying.