Mean, Median, Mode in data mining

What is mean?

Mean is the average of numbers.

Example:

3, 5, 6, 9, 8

Mean = all values/Total number of values

Mean = 3+5+6+9+8/5

Mean = 6.2

How to calculate the mean for data with frequencies?

AgeFrequencyAge * Frequency
22522 * 5 =  110
33233 * 2 = 66 
44644 * 6 = 264 
66466 * 4 = 264 
Total17605


Mean = 704/ 17

Mean = 41


What is Median?

Median is the middle value among all values.

How to calculate median for an odd number of values?

Example:

9, 8, 5, 6, 3

Arrange values in order

3, 5, 6, 8, 9

Median = 6

 

How to calculate median for an even number of values?

Example:

9, 8, 5, 6, 3, 4

Arrange values in order

3, 4, 5, 6, 8, 9

Add 2 middle values and calculate their mean.

Median = 5+6/2

Median = 5.5


What is Mode?

The mode is the most occurring value.

How to calculate mode?

Example:

 

3, 6, 6, 8, 9

Mode = 6 (because 6 is occurring 2 times and all other values occur only one time).