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
To generate the numbers with the specified percentages you could use the randomchoices function from ... View full answer
Get step-by-step solutions from verified subject matter experts
