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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, manny2085
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, keviongardner
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
You know the right answer?
Some random processes involve more than just two possible (dichotomous) outcomes. One example is rol...

Questions in other subjects:

Konu
Mathematics, 15.03.2020 01:23
Konu
History, 15.03.2020 01:23