Computers and Technology

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?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:10, brylove603
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately. next, the program determines and prints the prime factorization of the product, listing the factors in increasing order. if a prime number is not a factor of the product, then it must not appear in the factorization. sample runs are given below. note that if the power of a prime is 1, then that 1 must appear in t
Answers: 3
image
Computers and Technology, 22.06.2019 13:30, ashleypere99
Jane’s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
image
Computers and Technology, 22.06.2019 20:40, wutdmgamerz
Assume that there is a 4% rate of disk drive failure in a year. a. if all your computer data is stored on a hard disk drive with a copy stored on a second hard disk drive, what is the probability that during a year, you can avoid catastrophe with at least one working drive? b. if copies of all your computer data are stored on three independent hard disk drives, what is the probability that during a year, you can avoid catastrophe with at least one working drive?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, evanwall91
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
Do you know the correct answer?
Some random processes involve more than just two possible (dichotomous) outcomes. One example is rol...

Questions in other subjects:

Konu
Mathematics, 19.09.2019 19:30
Konu
Mathematics, 19.09.2019 19:30
Konu
Mathematics, 19.09.2019 19:30