On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski <gillese...@gmail.com> wrote:

>
> >
> > 1. Remove the method
>
> +1


If we remove:

ContinuousDistribution.probability(double)

There is the option to rename

ContinuousDistribution.density(double)
ContinuousDistribution.logDensity(double)

To probability and logProbability. This would then match the names in the
DiscreteDistribution interface. Functions in Matlab use the term pdf for
both discrete and continuous distributions. Functions in R use the prefix
'p' for probability. So some libraries do use the same term for both types
of distribution.

The javadoc can be used to distinguish the PMF [1] (discrete distributions)
and PDF [2] (continuous distributions).

I am not convinced by this rename. The use of density does make it clear
that it is the probability density function and applies as the derivative
of the CDF. Integrating the PDF must be used to obtain a probability.
Wikipedia does state that the term probability function may be used in the
literature for other functions leading to confusion.

I would just reorder the method's occurrence in the interface to the top,
matching the occurrence in the DiscreteDistribution interface.

[1] https://en.wikipedia.org/wiki/Probability_mass_function
[2] https://en.wikipedia.org/wiki/Probability_density_function

Reply via email to