Reference no: EM13969025
This program is going to evaluate the quality of the random number generator in Python by simulating dice rolls and looking at the distributions of the values. A random number generator must be initialized with a seed value. Then random values can be computed using a fancy calculation. We will use the random module. The seed() function without any arguments will use the system clock to seed the calculations. The random(a,b) function call will return an integer in the range from a to b. We will use a=1 and b=6 to return values for a six sided die. Adding two of these together simulates a dice roll. If these rolls were truly random, the odds of getting a particular value are: 2 and 12 - 1/36, 3 and 11 - 2/36, 4 and 10 - 3/36, 5 and 9 - 4/36, 6 and 8 - 5/36, and 7 - 6/36.
You are going to determine how close to these probabilities we can get for different sample sizes of dice rolls. For each sample size you should roll the dice a particular number of times and keep track of how often each value occurs in a list. You should create a list of lists that holds the counts for a sequence of sample sizes that includes 100, 1000, 10000, 100000, 1000000 and 10000000. For each list corresponding to a particular sample size, you should compute the percentage of the rolls corresponding to each dice value. You should then compute the difference between each of these values and the ideal percentages given above.
You then should print a table of these percentage difference values, where the rows correspond to the dice values and the columns correspond to the sample sizes. If the random number generator is working well, these differences should get smaller as the sample sizes grow. Print out a final assessment of the generator's quality as good or bad. A good rating is given if the difference values for each dice value do decrease as sample size grows, otherwise a bad rating is given if for any dice value the differences between two sample sizes do not get smaller.
Make sure that you properly comment your program. Submit the source file along with sample output of your program showing the table of data.
Describe why this law or regulation causes these challenges
: Laws and regulations are put in place to serve a purpose and to protect the entities and organizations that can be affected by them. Which law or regulation appears to cause significant challenges for international management? Describe why this law o..
|
Describe how the organization was managed in the past
: Describe how the organization (Kaiser Permanente) was managed in the past. Compare the difference between management approaches in the past to those the organization currently uses. Ensure you identify relevant management theory both for past practic..
|
Culture of organization has impact on staffing decisions
: The culture of an organization has a major impact on staffing decisions. Many organizations consider the company's talent philosophy-how the company views its employees-as an influence on staffing strategies. What are the decisions that influence a c..
|
Force of attraction between mars and the satellite
: 1) What is the force of attraction between Mars and the satellite? 2) What speed should the satellite have to be in a perfectly circular orbit? 3) How much time does it take the satellite to complete one revolution?
|
Evaluate quality of the random number generator in python
: This program is going to evaluate the quality of the random number generator in Python by simulating dice rolls and looking at the distributions of the values.
|
Develop work for different types of crises
: When there is a crisis within your organization employees are going to need to be trained on how to communicate with the media. What media and multimedia tools might best help you develop training content and material for employees and managers of an..
|
Problem regarding the beat frequency
: The speed of sound is 343 m/s and the merry go round revolves once every 20s. What is the beat frequency that is detected by the listener when the speakers are both pointing at him from equal distances?
|
Explain the concept of future value
: Explain the concept of Future Value (FV) in your own words. Why is FV an important topic in money management? Why would you want to take $1000 today instead of waiting for a year
|
What would their total recruiting cost be
: The Digby's workforce complement will grow by 10% (rounded to the nearest person) next year. Ignoring downsizing from automating, what would their total recruiting cost be? Assume Digby spends the same amount extra above the $1,000 recruiting base as..
|