Here are my first steps with the Maple Package "Statistics". This is Maple 2023 on Mac Intel.
I am trying to figure out what's wrong in the following code ... If someone can help, thank you very much !
with(Statistics);
law := EmpiricalDistribution([1, 2, 3], 'probabilities' = [1/3, 1/2, 1/6]);
X := RandomVariable(law);
Y := RandomVariable(law);
Probability(X = 1);
--> outputs 1/3 : ok
Probability({X = 1, Y = 1});
--> outputs 1/9 : ok
Probability(X + Y = 2);
--> outputs 0 : ** Not ok !**
Now, if I don't use EmpiricalDistribution but for example :
X := RandomVariable(Binomial(1, 1/2));
Y := RandomVariable(Binomial(1, 1/2));
it works well :
Probability(X + Y = 2);
--> outputs 1/4 : ok
Did I find a bug ? Or did I miss something ?
I tried to read the appropriate documentation, but EmpiricalDistribution is not enough documented IMHO, or maybe, as I wrote before, there is a bug in this function.