Question: Write a program to generate 1000 integers between 1 and 5 in a random fashion so that 1 occurs 22% of the time, 2 occurs

Write a program to generate 1000 integers between 1 and 5 in a random fashion so that 1 occurs 22% of the time, 2 occurs 15% of the time, 3 occurs 31% of the time, 4 occurs 26% of the time, and 5 occurs 6% of the time. Over what interval would you generate the random numbers? How do you decide which of the integers from 1 to 5 has been generated according to its specified chance of selection?

Step by Step Solution

3.32 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To generate the numbers with the specified percentages you could use the randomchoices function from ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related A First Course In Mathematical Modeling Questions!