dist1=DiscreteUniformDistribution[{1,6}];(*rolling1die*)​​dist2=TransformedDistribution[Y=
x
1
+
x
2
,{
x
1
dist1,
x
2
dist1}];(*sumof2dice*)​​expr=PDF[dist2,y](*outputisaPiecewise[]expressioncontainingseveralEqual[]expressions*)
Out[]=
1
36
y2||y12
1
18
y3||y11
1
12
y4||y10
1
9
y5||y9
5
36
y6||y8
1
6
y7
0
True
For discrete distributions the shown output of PDF[dist,y] often contains Equal[y,val] expressions. I am interested in a sorted list of all those values vals. I was thinking that pattern matching on Equal[] should do the trick but my attempts failed.
Basically i am looking for a general way to produce a sorted list of all values vals, for which the transformed random variable Y has non-zero probability. Please could you show me a way/ways to get there:
{2,3,4,5,6,7,8,9,10,11,12}(*desiredoutput*)
Thanks for your help, appreciated!