Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I mainly need help on Task #2. I am not strong in coding and this needs to be coded in EXCEL please. Task #1: In
I mainly need help on Task #2. I am not strong in coding and this needs to be coded in EXCEL please.
Task #1: In class we have used the RND() function in Excel VBA to generate what we have called random numbers. We have not actually proven to ourselves that the numbers generated by this built-in function are actually random. So in this task, your job is to write a VBA macro that calculates a random integer number 10,000 times that is between 1 and 10. You then must display the number of times each number 1 though 10 has been chosen during those 10,000 selections. You should use an array variable named "HistogramData" that is defined using a Dim (.e. dimension) statement to have 16 data locations (i.e. HistogramData() through HistogramData(15)) to store the counts of the frequency of each integer 1 through 10 as it is chosen (i.e. is should appear as HistogramData(15) in your Dim statement). Your worksheet should contain a button named "Test Random Number Generator that when pressed performs these functions. When the 10,00 random number selections have been completed and classified, display the results in a table in your sheet so that it looks similar to the example below: B D E 1 Number Frequency 2 1 3 2 4 3 3 ### 5 4 ### 6 5 ### 7 6 8 7 ## 9 8 ### 10 9 ### 11 10 ### Task #2: A classic calculation done in statistics and probability, a topic that we will touch on later this semester in class and which is a topic you will need to understand as an engineer, is to perform rolls of two six- sided dice and to plot the frequency of occurrences of each sum of the dice that are possible, i.e. the frequency the dice sum generates the numbers 2 through 12. Build an Excel worksheet that contains a button that when pressed asks the user how many times they would like to roll a pair of simulated six-sided dice, then uses the Excel VBA random number generator function to simulate rolling two six- sided dice at the same time for number of rolls of the dice requested by the user. In a manner similar to that shown in Task #1 in this problem, report the number of times the sum of the two dice resulted in the numbers 2 through 12 in a table in the worksheet when the button that simulates the dice rolling is pressed Test your code by having it simulate rolling two six-sided dice: (a) 11 times, (b) 22 times, (c) 44 times, (d) 88 times, (e) 176 times. (1) 11,000 times. Report your results of this testing in your PDF by putting in the results tables into a PDF and also by creating bar charts (.e. histograms) that show the frequency of each number 2 through 12 found for each of the tests (a) through (e) and also reporting those charts in your PDF. Task #1: In class we have used the RND() function in Excel VBA to generate what we have called random numbers. We have not actually proven to ourselves that the numbers generated by this built-in function are actually random. So in this task, your job is to write a VBA macro that calculates a random integer number 10,000 times that is between 1 and 10. You then must display the number of times each number 1 though 10 has been chosen during those 10,000 selections. You should use an array variable named "HistogramData" that is defined using a Dim (.e. dimension) statement to have 16 data locations (i.e. HistogramData() through HistogramData(15)) to store the counts of the frequency of each integer 1 through 10 as it is chosen (i.e. is should appear as HistogramData(15) in your Dim statement). Your worksheet should contain a button named "Test Random Number Generator that when pressed performs these functions. When the 10,00 random number selections have been completed and classified, display the results in a table in your sheet so that it looks similar to the example below: B D E 1 Number Frequency 2 1 3 2 4 3 3 ### 5 4 ### 6 5 ### 7 6 8 7 ## 9 8 ### 10 9 ### 11 10 ### Task #2: A classic calculation done in statistics and probability, a topic that we will touch on later this semester in class and which is a topic you will need to understand as an engineer, is to perform rolls of two six- sided dice and to plot the frequency of occurrences of each sum of the dice that are possible, i.e. the frequency the dice sum generates the numbers 2 through 12. Build an Excel worksheet that contains a button that when pressed asks the user how many times they would like to roll a pair of simulated six-sided dice, then uses the Excel VBA random number generator function to simulate rolling two six- sided dice at the same time for number of rolls of the dice requested by the user. In a manner similar to that shown in Task #1 in this problem, report the number of times the sum of the two dice resulted in the numbers 2 through 12 in a table in the worksheet when the button that simulates the dice rolling is pressed Test your code by having it simulate rolling two six-sided dice: (a) 11 times, (b) 22 times, (c) 44 times, (d) 88 times, (e) 176 times. (1) 11,000 times. Report your results of this testing in your PDF by putting in the results tables into a PDF and also by creating bar charts (.e. histograms) that show the frequency of each number 2 through 12 found for each of the tests (a) through (e) and also reporting those charts in your PDFStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started