Project 1 - Statistics Program

Now that you have a bit of knowledge of C++, we’re going to do a fairly simple activity to get you started using a bit of statistics. In any field of engineering, the collection of data is very important in testing and improving designs and experiments. In Aerospace Engineering, data is collected all the time when testing new designs of anything from a drone propellor to a rocket engine. Analyzation of this data helps in discovering issues with the design, and may indicate how to improve it. If you would like to know more about statistics in aerospace engineering, the following link leads you to an article from NASA that discusses this in detail. 

We have given you two test vectors of numbers. They are shown here:

Your job in this activity is to find the mean, maximum, minimum, and range of each of these vectors. You will write a function to find each of these values, some of which may utilize the other functions you write. You will also write a function that checks to see if the vectors are in ascending order. 

To review, the mean is the total of all the numbers in a group divided by how many numbers are in that group. The maximum is the largest number in the group. The minimum is the smallest number in the group. The range is the difference between the smallest and largest values (this function will use other functions!). Your final function will check if the numbers are in order by ensuring that the number previous to each number is less than itself. This function will output a boolean value and the other 4 functions should output integers. Some starter code is provided for you here to get you started: https://onlinegdb.com/HyQtXH9cL

(To work from the starter code provided, go to the link and click on “Fork this” above the code. You should now be able to edit the starter code and save it as your own project.) 

Summary of what your program should include:

If you wish, you may create your own vectors of integers to test your functions. Keep in mind that we are using integer precision for the mean here, so if you calculate this value by hand you may obtain a slightly different value. You may also write more functions to compute statistically important information, such as the median, mode, or standard deviation. When you write these functions, however, you may want to consider putting the numbers in your vectors in ascending order (or even creating a function to do so). Good luck!

Solution Code & Output: