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

27 lines
1.0 KiB
Markdown

---
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.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
More detailed and rigorous review can be found [here](https://en.wikipedia.org/wiki/Median)