subject

Some random processes involve more than just two possible (dichotomous) outcomes. One example is rolling a normal die, which can result in integer outcomes from 1 to 6. Remember that in MATLAB, we can either use rounding or use the randi function (or randint for some versions of the software) in order to generate random integers. In this particular example, no further comparisons or decision-making are needed to simulate the event. Write a function roll that simulates the roll of a die, and returns the result as output argument (no input arguments). Call roll from the command line to see the result. In order to evaluate the relative frequency of the different rolls on the die, it is useful to create a histogram of the outcomes. Write a program that uses a for loop to call the roll function Nrolls times, and stores the result from each roll in a vector variable (so if you simulate 50 rolls, the vector will have 50 elements). After the loop, plot a histogram of the outcomes. Note that if hist(y) is called with a single vector input argument y, it uses a default value of 10 equally-spaced ‘bins’ for counting the values of y. One can specify the bins with a second vector input argument. For example, hist(y, 1:6) would use bins centered on 1, 2, …, 6 (one for each possibility).Run your program a number of times with Nrolls = 50. Is it possible to say for certain that all rolls have equal probability?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Idon’t understand the double8 coding problem. it is java
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
Some random processes involve more than just two possible (dichotomous) outcomes. One example is rol...
Questions