Thank you! I would have never found it on my own. I was using this:
max = Maximize[{x, Probability[v ==x, v\[Distributed]w] > 0}, x, Integers]
min = Minimize[{x, Probability[v ==x, v\[Distributed]w] > 0}, x, Integers]
I noticed interesting thing, though -- Quantile[p, {0, 1}]
can return wider range than min/max above if distribution p
was defined via EmpiricalDistribution
with some zero entries. E.g. this:
p := DiscreteUniformDistribution[{1,6}]
fixd[dist_] := Module[{x,k},
EmpiricalDistribution[ Table[Probability[x==k, x\[Distributed]dist], {k,2,40}]->Table[k, {k, 2, 40}] ]
]
y := fixd[ TransformedDistribution[a + b, {a\[Distributed]p, b\[Distributed]p}] ]
max = Maximize[{x, Probability[v ==x, v\[Distributed]y] > 0}, x, Integers]
min = Minimize[{x, Probability[v ==x, v\[Distributed]y] > 0}, x, Integers]
Quantile[w, {0, 1}]
results:
Out[5]={12,{x->12}}
Out[6]={2,{x->2}}
Out[8]={2,40}
Is it normal?