Question: Creating Random Variables and more

Dear Maple users

I could probably make the things happen in an ad hoc way myself, but I am pretty sure there is a smart and conceptual way to do it in Maple, which will make things much easier. That's why I am asking you. 

I am trying to create a Random Variable X build on the outcomes of throwing two dice, i. e. X is a function from the Sample Space consisting of all 36 different 2-tuples of the kind (x,y), onto the Real Numbers. Let's say the dice are colored: one green and one red. The outcome (3,2) means that the green die is displaying 3 dots and the red die is displaying 2 dots. The Random Variable can be any function on that Sample Space: The sum of the number of dots, the square of the number of dots on the green die plus the number of dots on the red die, or it could be something completely different. In this example X will have a finite number of possible values: x1, x2, ..., xn. Now I would like to create such a Random Variable in Maple in a convenient way. Afterward I would like Maple to throw dice by random a number of times, say 100,000 times and show me a Histogram or a list of how many times X got the result x1, x2, etc.

I hope someone can help me get going in a problem like the one described above. 

Kind regards,

Erik V.



Please Wait...