Real World Applications: Statistical Measures
Read a series of floating-point numbers from the standard input, and print a statistical summary of the data that includes the largest value input, the smallest value input, the sum of all values read, the mean (average) of all values input, the population variance, and the standard deviation. The mean is
The population variance measures the spread of values and is given by the formula
(1/n) sum xi2 - <xɮ = <x2> - <xɮ
where the summation is over the n values x1, x2, …, xn read. The standard deviation is the square root of the variance.