Mean, Median and Mode

Introduction

Mean, median, and mode can be defined as the three kinds of most common averages in statistics. There are many other types of "averages" which are defined in statistics, but these three are the most common type. 

Mean, median, and mode can also be defined as the different measures of the centre of a numerical dataset. They summarize a dataset with a single number to represent a typical data point from the dataset.

Mean

In the most layman terms, Mean is defined as the sum of all the observations divided by the total number of observations. The above definition is of Arithmetic Mean, one of the many types of Mean. In detail, the types of mean are explained although most of them are out of scope for elementary Statistics-

1- Arithmetic Mean 

Arithmetic Mean is the average of all the observations. Generally, if the mean is mentioned without any adjective, it is assumed to be Arithmetic Mean.

Example- We have a set of observations-x=[1,3,5,7,9]. The Arithmetic Mean is computed as (x/n) where n is the number of observations which is equal to 5 in this case. Thus x=25 in this case and n=5  so the mean comes out to be 5

2- Weighted Mean

Weighted mean is almost the same as Arithmetic Mean, the difference being that in weighted Mean, some values contribute more than the others. 2 Cases arise while calculating Weighted Mean. The weighted mean is useful in situations when one observation is more important than others.

Case 1- When the sum of weights is 1- Simply multiply each weight by its corresponding value and sum it all up.

Example- In the previous example, let us assume that w=0.2 for all the observations, then the weighted mean is- 

W_mean= (0.2*1)+(0.2*3)+(0.2*5)+(0.2*7)+(0.2*9)=5 which is the same as Arithmetic Mean but if we change the weights then the mean also changes.

Case 2- When the sum of weights is not equal to 1- In this case it is beneficial to make a table which shows each weight against each observation. Then calculate the product of each observation and its corresponding weight.

Weight(w)

Observation(x)

w*x

2

1

2

14

2

28

8

5

40

32

7

224

w= 56


wx= 294

Then the mean is calculated as- wx/w= 294/56= 5.25. 

3- Harmonic Mean 

Harmonic Mean is calculated by dividing the total number of observations by the reciprocal of each observation. It is quite useful in Physics and has many other applications(example- average speed when the duration of several trips is known). It is given by the formula-

H.M=  n/(1/x1+1/x2+1/x3+….1/xn)

4- Geometric Mean

The Geometric Mean indicates the central tendency using the product of the observations rather than their sum(which is used in calculating Arithmetic Mean). It is used in the field of finance and social sciences. In finance, it is used to calculate the average growth rates. The Geometric Mean is most useful when the observations are dependent on each other or they have large fluctuations. It is given by(INSERT EQUATION)

[Image will be Uploaded Soon]

5- Arithmetic- Geometric Mean

This type of mean is a mixture of arithmetic and geometric averages. It was developed by Gauss to calculate the planetary orbits. It is used in Calculus and machine computation.

Mode

Definition- Mode is defined as the most frequent or common observation occurring in a dataset. A dataset can have 0,1 or more than 1 modes. The advantage of Mode is that it can be applied to any type of dataset, unlike Mean and Median which can not be applied to nominal data. It is also not affected by outliers. Its disadvantage is that it cannot be used for more detailed analysis.

Example – {2,2,1,5,6,2}- In this dataset, the mode is 2 since it is the most occurring observation.

{21,34,43,21,34,56,7,9,0}- This dataset has 2 modes, 34 and 21 because they both occur twice.

Median

Definition- The median is defined as the middle point in any dataset of observations. Half of the observations are greater than this number and half of them are smaller. Median is also called the 50th percentile. In many cases, the Median is the better measure of Central tendency than Mean because the outliers(datapoints which have extreme values) have less effect on the Median. 

Steps in Calculating Median

Step 1- Arrange the observations in ascending or descending order.

Step 2- If the number of observations is odd, then the median is the middle observation and if the number of observations is even, then the median is the average of the 2 middle observations.

Example- We have a dataset x=[10,40,30,20]

Step 1- Arranging the data in ascending order- x=[10,20,30,40]

Step 2- Since the number of observations is even, the median is (30+20)/2 which equals 25.