In Exercise 7 of Chapter 6 an algorithm was given for calculating the variance and standard deviation of a set of numbers. Other statistical measures include the mean or average, the mode or most frequently occurring value, and the median or middle value.
Write a class or function that finds these three statistical values for a tvector of double values. The median can be calculated by sorting the values and finding the middle value. If the number of values is even, the median value can be defined as either the average of the two values in the middle or the smaller of the two. Sorting the values can also help determine the mode, but you may decide to calculate the mode in some other manner.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here