Gday,(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to write some code in Maple involving probabilities. Here is an example of what I want to do:

with probability [tex]\frac{\sqrt{3}}{4}[/tex]

y:=3

with probability [tex]\frac{\sqrt{3}}{4}[/tex]

y:=4

with probability [tex]1-\frac{\sqrt{3}}{4}[/tex]

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 [tex]\frac{\sqrt{3}}{4}[/tex] it has proven to be a bit difficult for me. hope someone can help

thanks,

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Maple and probabilities

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Maple probabilities | Date |
---|---|

Variable summation limits in Maple or similar programs | Apr 22, 2017 |

[Maple] Calculating the potential produced by a charge | Feb 27, 2017 |

Mathematica Can you tell me where can i download Maple? | Jan 6, 2017 |

Quick (probably easy) Latex Question | Nov 2, 2012 |

**Physics Forums - The Fusion of Science and Community**