Files
freeCodeCamp/guide/english/mathematics/how-to-find-the-median-value/index.md

27 lines
950 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: How to Find the Median Value
---
## How to Find the Median Value
The median is the middle value of the sorted number set.
2018-10-12 15:37:13 -04:00
#### Example 1
Find the median value for the set below.<br/>
<em>244 191 160 187 180</em>
2018-10-12 15:37:13 -04:00
##### Step 1. Sort the numbers in order.
After it is sorted, you will have <em>160 180 187 191 244</em>.
2018-10-12 15:37:13 -04:00
##### Step 2. Find the median value.
Once the numbers are ordered, the median is the value in the middle. In this case, the median is <em>187</em>.
2018-10-12 15:37:13 -04:00
#### Example 2
Find the median value for the set below.<br/>
<em>205 211 183 211 180 194</em>
2018-10-12 15:37:13 -04:00
##### Step 1. Sort the numbers in order.<br/>
After it is sorted, you will have <em>180 183 194 205 211 211</em>.
##### Step 2. Find the median value.<br/>
In this case, there are two middle numbers (<em>194</em> and <em>205</em>). To find the median, we will look for the average of the two middle values. The median is (<em>194</em> + <em>205</em>) / 2 = <em>199.5</em>.