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 (최근 30일)
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
Bryced Fischer
Bryced Fischer 2018년 1월 16일
This is a homework question and I am struggling with it and i can absolutely understand that you do not like to hand out solutions. So far I have attempted to put them in a matrix and tried to use the "max" function to determine each roll what number was highest and so far haven't gotten that to work. I also tried to put each of the three smaller dice into a graph and attempting to take the most probable roll of those three compared to the D10 but that doesn't exactly work for the problem I am trying to solve.
Walter Roberson
Walter Roberson 2018년 1월 16일
(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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 1월 16일
편집: Walter Roberson 2018년 1월 16일
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.

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by