The rand() function generates values on the basis of a distribution called the normal distribution. One of
Fantastic news! We've Found the answer you've been seeking!
Question:
The rand() function generates values on the basis of a distribution called the normal distribution. One of the favorable properties of the normal distribution is that its average is exactly the middle value of its range. It means that if we run the rand() function in C++, having the range 0 - 32767, a large number of times and calculate the average of all the generated values, it would be exactly 16383.5. In this problem, you are required to find the smallest value of n (number of times the rand() is called) that results in the average equal to 16383.5 +- 0.0001. Specifically, your program shall call rand() 1000 times and see the average, then call it another 10000 times and see the average, and so on until the average is 16383.5 +- 0.0001.
Related Book For
An Introduction to Management Science Quantitative Approach to Decision Making
ISBN: 978-1337406529
15th edition
Authors: David R. Anderson, Dennis J. Sweeney, Thomas A. Williams, Jeffrey D. Camm, James J. Cochran
Posted Date: