freeCodeCamp/guide/english/mathematics/statistics/median/index.md

1.0 KiB

title
Median

Median

Definition:

The median is one of the measures of central tendency of a data set. To find the median, we arrange the observations in order from smallest to largest value. If there is an odd number of observations, the median is the middle value. If there is an even number of observations, the median is the (mean) average of the two middle values.

Example 1:

In the data set [3, 4, 8, 6, 34, 22, 5], to find the median we sort the set to [3, 4, 5, 6, 8, 22, 34]. The middle value i.e. 6 is the median.

xample 1:

In the data set [3, 4, 8, 6, 22, 5], to find the median we sort the set to [3, 4, 5, 6, 8, 22]. The average of 5 and 6 i.e. 5.5 is the median.

More Information:

More detailed and rigorous review can be found here