How can i roll a d4, d6, and d8 and take the maximum number from them and then compare it to a roll of a d10 to see which has the highest probability of rolling the highest number?
3 views (last 30 days)
Show older comments
I need to make a chart or be able to show a value or anything that will be able to tell which has the highest probability of having the highest value.
3 Comments
Walter Roberson
on 16 Jan 2018
(who else would require proof that a d10 has the highest chance of rolling a higher number...?)
In this situation, d10 has a less than 50% chance of being higher, if "higher" is strict inequality.
Answers (1)
Walter Roberson
on 16 Jan 2018
Edited: Walter Roberson
on 16 Jan 2018
hints:
d8 = randi(8,1,10000);
and if you have a 2D array then max() of the array operates along the first dimension, giving you a per-column maximum, suitable for comparing to rolls of d10.
And be careful about ties.
0 Comments
See Also
Categories
Find more on Language Fundamentals in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!