Define mean.

The mean or average of observations, is the sum of the values of all the observations divided by the total number of observations.


If x1, x2, … , xn are observations with frequencies f1, f2, … , fn i.e. x1 occurs f1 times and x2 occurs f2 times and so on, then we have


Sum of the values of the observations = f1x1 + f2x2 + … + fnxn


and Number of observations = f1 + f2 + … + fn


So, mean() of observations is given by



Or,


In summation form, it can be shorted to



Which also can also be written as,



And it is understood i varies from 1 to n.


1