Exercise

Write a function that will compute for the average of all the elements of an integer array.

Advanced (Bonus Points): Instead of the average, instead compute the standard deviation (\(\sigma\)) of the array. Use the following formula:

\[\sigma = \sqrt{\frac{\sum_i^n{(x_i - average)^2}}{n - 1}}\]

where \(x_i\) denotes the \(i^{th}\) element and \(n\) denotes the total number of elements.