Measures of Locations
In this lesson, we will discuss measures of locations
What is Descriptive Statistics?
Descriptive Statistics provide us with quantitative statistics about data. It helps us show and summarize the data in a meaningful way so that patterns start emerging out of it.
In this tutorial, we will be looking into the bells and whistles of descriptive statistics which are used extensively in the field.
Measures of Location or Central Tendency
Measures of Location also referred to as Measures of Central Tendency help us to summarize a list of numbers. The three most commonly used measures of Location are mean, median, and mode.
Mean
Mean is one of the measures of Location and is used extensively in the field. It is calculated by adding up all the values of the dataset and dividing them by the total number of values. Mean is also referred to as the expected value.
One common way it is used in the field is by replacing the missing values in a column with mean of the values present in the data.
Formula
$\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i$
 Where $\bar{x}$ is the mean.
 $n$ is the total number of values.
 $\sum_{i=1}^n x_i$ is the sum of all the numbers.
Example

Lets say we have a list of numbers as 34, 56, 190, 10000, 45 i.e n=5.

The mean of the above list of numbers is calculated as
$\bar{x}=\frac{34 + 56 + 190 + 10000 + 45}{5}=\frac{10325}{5}=2065$
Median
Median is the value that divides the dataset into two parts i.e 50% of the values of the dataset are below it and 50% of the values of the dataset are above it. It has a precondition. That is, that the dataset should be sorted (ascending or descending).
Case 1
 When the number of values is odd. The Median is the middle value of the sorted list.
Example

Lets say we have a list of numbers as 34, 56, 190, 10000, 45, so n=5.

Sorting the above list in ascending order gives us 34, 45, 56, 190, 10000.

The Median of the above list of numbers is 56.
Case 2
 When the number of values is even. The Median is calculated by adding the middle two values of the list and dividing them by two. It is the mean of $\frac{n}{2}$ and $\frac{n}{2}+1$ values of the list where n is the total number of values in the list.
Example

Let’s say we have a list of numbers as 34, 56, 190, 10000, 45, and 327.

Sorting the above list in ascending order gives us 34, 45, 56, 190, 327, and 10000.

The Median of the above list of numbers is calculated as below.
$\frac{n}{2}$ value=56
$\frac{n}{2}+1$ value=190
$Median=\frac{56+190}{2}=123$
Mode
Mode is the value that appears often in the dataset. A list can have more than one mode. If a dataset is having two values which occur most it is called bimodal. If it has more than two mode values, it is called multimodal.
Example 1

Let’s say we have a list of numbers as 19, 8, 29, 35, 19, 28, and 15.

Sorting the above list in ascending order gives us 8, 15, 19, 19, 28, 29, and 35.

The mode is 19 as it is the most occurring value, as can be seen from the sorted list.
Example 2

Let’s say we have a list of numbers as 1, 3, 3, 3, 4, 4, 6, 6, 6, 9.

It is already sorted so no need to sort it.

The mode values from the above list are 3, 4, and 6.
Mean Vs. median
Get handson with 1400+ tech skills courses.