4

I am trying to do some symbolic statistics. Is there a way to get the Domain of a distribution? Like this

Domain[UniformDistribution[]]
>> 0<=x<=1

Domain[BinomialDistribution[n,p]] >> 0 <= x <= n && x [elem] Integers

I assume that some kind of function like this is used by Expectation and other descriptive statiscal function.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
meneken17
  • 500
  • 2
  • 8
  • 2
    Use DistributionDomain[...]. It's lacking documentation apparently but it does what you need. The proper term for this is the 'support' of a random variable. See this answer here too: https://mathematica.stackexchange.com/a/46310/72682 – flinty Jun 21 '20 at 23:25

1 Answers1

7

Use DistributionDomain[]. It's lacking documentation apparently:

DistributionDomain[TriangularDistribution[{a, b}]]
(* Interval[{a, b}] *)

DistributionDomain[NormalDistribution[m, s]] (* Interval[{-∞, ∞}] *)

DistributionDomain[ParetoDistribution[a, 1]] (* Interval[{a, ∞}] *)

DistributionDomain[CategoricalDistribution[{"cow", "chicken", "potato"}]] (* {"cow", "chicken", "potato"} *)

flinty
  • 25,147
  • 2
  • 20
  • 86