Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using excel VBA to create th program: 4) Randomness! We've heard a lot about it this semester, not to mention the seemingly random events we

Using excel VBA to create th program:image text in transcribed

4) Randomness! We've heard a lot about it this semester, not to mention the seemingly random events we experience in our day-to-day lives such as the weather (and weather forecasts), squirrel sightings, and income taxes. Randomness plays a role in basic statistics in that a sample has a greater probability of representing a population when the samples are chosen at random from the population. This program will model the selection process. Create a dynamic array. Input the number of elements for this array from the worksheet. Populate the array with random numbers from a user defined range. This range is input from the "Highest value" and "Lowest value" cells in the worksheet. Output the index and value of each array element to the worksheet under the Raw Data heading. Pass the array to a Function. This Function will calculate the average of the values stored in the array, and return the average to the main procedure. Output the average to the worksheet under the Raw Data heading. No module variables are permitted for this problem. Create a second dynamic array to store the Sample data. Input the size of this array from the worksheet from the cell labelled Sample size in the figure. If the sample size is greater than the Raw data size (the number of elements in the Raw array) inform the user with a MessageBox. Populate the Sample array with randomly selected values from the Raw data array. An element can only be selected once from the Raw array Note in the figure that elements 6, 2 and 10 from the Raw array were randomly selected for the Sample array. Output the Sample array values with the corresponding index from the Raw data array under the Sample heading. Send the Sample array to the same function you created in part b) and have it return the average of the Sample array. Return the average to the main procedure. Output the average to the worksheet under the Sample heading

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Describe two ways to decrease the chance of contracting a cold.

Answered: 1 week ago

Question

4. Name three tourism organizations and describe their purpose.

Answered: 1 week ago

Question

=+Why were they effective? How could you continue the campaign?

Answered: 1 week ago

Question

=+Who's your primary audience?

Answered: 1 week ago

Question

=+What do they need to hear?

Answered: 1 week ago