# Maple and probabilities

1. Apr 27, 2006

Gday,
I am trying to write some code in Maple involving probabilities. Here is an example of what I want to do:
with probability $$\frac{\sqrt{3}}{4}$$
y:=3
with probability $$\frac{\sqrt{3}}{4}$$
y:=4
with probability $$1-\frac{\sqrt{3}}{4}$$
y:=5
its easy enough for a probability of 1/2 since you can use a random number to generate either a 0 or 1, and if the random number is 0 then you do such and such and if the random number is 1 then you do something else. but with probabilities like $$\frac{\sqrt{3}}{4}$$ it has proven to be a bit difficult for me. hope someone can help

thanks,