For given list of numbers find Mean, median, and mode
List is
X = {13, 18, 13, 14, 13, 16, 14, 21, 13}
Mean also called as Average, is sum of all number of the given list divided by no of elements in the list
Mean = ( X1 + X2 + X3 + X4 + .....) / n
Median: To calculate the median, we need the elements of the array to be sorted in either non-increasing or non-decreasing order. The sorted array . We then average the two middle elements:
Mode: We can find the number of occurrences of all the elements in the array:
4978 : 1
11735 : 1
14216 : 1
14470 : 1
38120 : 1
51135 : 1
64630 : 1
67060 : 1
73429 : 1
99233 : 1
Every number occurs once, making the maximum number of occurrences for any number in . Because we have multiple values to choose from, we want to select the smallest one, , and print it on a new line.