Let N be a size of the array of numbers.
To calculate the arithmetic mean sum up the elements and divide by N: (2+9+8+4+7+6)/6 = 36/6 = 6.
To calculate the geometric mean, multiply all together and take a root of the order of N: (2*9*8*4*7*6)^(1/6) = 5.37789...
To calculate the harmonic mean, take reciprocals of the elements, sum them up, and take a reciprocal of the sum. multiply the result with N: (1/2+1/9+1/8+1/4+1/7+1/6)^(−1) ×6 = 4.630934...
To calculate the median arrange the elements in ascending order and take the middle one. if the number of elements is even, take the average of two middle elements of the arranged set. 2, 4, 6, 7, 8, 9 - hence 6.5.
To calculate the standard deviation: subtract the arithmetic mean from each element, sum up the squares of what you've got; divide by N minus 1; take the square root of the result: (((2−6)^2+(4−6)^2+(6−6)^2+ (7−6)^2+(8−6)^2+(9−6)^2)/5)^0.5 = 2.60768...
Comments
Leave a comment