7

I am trying to get all Discrete Univariate Distributions with symbolic arguments from any place in Wolfram Language system. For example this guide:

http://reference.wolfram.com/language/guide/DiscreteUnivariateDistributions.html

or maybe some information in WolframLanguageData. The final form of output should be a list

{ZipfDistribution[ρ], ZipfDistribution[n,ρ], LogSeriesDistribution[θ], ...etc.}

giving complete set of all Discrete Univariate Distributions. Perhaps this might be useful, but this mixes in continuous distributions which I do not need and it also does not give symbolic arguments:

EntityList[
    EntityClass["WolframLanguageSymbol",
    {"FunctionalityAreas"->EqualTo[{"StatisticalDistributionSymbols"}]}]]

This might be useful too:

Entity["WolframLanguageSymbol", "ZipfDistribution"]["PlaintextUsage"]
Entity["WolframLanguageSymbol", "ZipfDistribution"]["TypesetUsage"]
  • ZipfDistribution[ρ] represents a zeta distribution with parameter ρ.
  • ZipfDistribution[n, ρ] represents a Zipf distribution with range n.
user64494
  • 26,149
  • 4
  • 27
  • 56
Vitaliy Kaurov
  • 73,078
  • 9
  • 204
  • 355
  • Probably DistributionDomain will help. DistributionDomain[ZipfDistribution[\[Rho]]] results in 1 ;; \[Infinity] and DistributionDomain[NormalDistribution[]] results in Interval[{-\[Infinity], \[Infinity]}]. – JimB Apr 23 '23 at 21:48
  • Related: https://mathematica.stackexchange.com/questions/46309/determining-the-dimension-of-a-probability-distribution/46310#46310. A list of the library functions (?StatisticsLibrary*) finds a function namedDiscreteDistributionQ` but I can't get it to work. (Nor can I get the previous text to format properly.) – JimB Apr 24 '23 at 23:03

1 Answers1

4

Generating a list of the discrete univariate distributions in Mathematica is difficult for me not only because after all these years I'm still not great at Mathematica programming but because there are "issues" with defining what constitutes a discrete univariate distribution.

For example, there is the CompoundPoisson distribution which can be discrete or continuous depending on whether the user-selected "jump size" distribution is discrete or continuous. There are also an additional assortment of "helper" distribution functions which can work on discrete or continuous distributions with the result being a distribution but not necessarily having a recognized name: CensoredDistribution, MarginalDistribution, MixtureDistribution, OrderDistribution, ParameterMixtureDistribution, SplicedDistribution, and TransformedDistribution.

Fortunately, there is a function that will return True or False for if a distribution is (always) a discrete univariate distribution. For example:

Statistics`Library`DiscreteUnivariateDistributionQ[PoissonDistribution[μ]]
(* True *)

(See Determining the dimension of a probability distribution for more details.)

Using the listing code provided by @VitaliyKaurov the following will produce a list of the (always) discrete univariate distributions:

(* Get the list of StatisticalDistributionSymbols *)
sds = EntityList[
   EntityClass[
    "WolframLanguageSymbol", {"FunctionalityAreas" -> 
      EqualTo[{"StatisticalDistributionSymbols"}]}]];

(* Now extract the name of the distributions along with some "default"/standard parameter symbols which are essential *) distributions = EntityValue[#, "PlaintextUsage"] & /@ sds; distributions = StringTake[#, StringPosition[#, "]"][[1, 1]]] & /@ distributions

(* Now the list of discrete univariate distributions *) (discreteUnivariateDistributions = Select[distributions, StatisticsLibraryDiscreteUnivariateDistributionQ[ToExpression[#]] &])//Tableform

List of always discrete univariate distributions

JimB
  • 41,653
  • 3
  • 48
  • 106