smali

суббота, 24 сентября 2016 г.

How to Find the Median Value



It's the middle of a sorted list of numbers.

Median Value

The Median is the "middle" of a sorted list of numbers.

How to Find the Median Value

To find the Median, place the numbers in value order and find the middle.

Example: find the Median of 12, 3 and 5

Put them in order:
3, 5, 12
The middle is 5, so the median is 5.

 

Example: 

3, 13, 7, 5, 21, 23, 39, 23, 40, 23, 14, 12, 56, 23, 29

When we put those numbers in order we have:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 39, 40, 56

There are fifteen numbers. Our middle is the eighth number:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 39, 40, 56

The median value of this set of numbers is 23.

(It doesn't matter that some numbers are the same in the list.)

Two Numbers in the Middle

BUT, with an even amount of numbers things are slightly different.

In that case we find the middle pair of numbers, and then find the value that is half way between them. This is easily done by adding them together and dividing by two.

Example:

3, 13, 7, 5, 21, 23, 23, 40, 23, 14, 12, 56, 23, 29

When we put those numbers in order we have:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 40, 56

There are now fourteen numbers and so we don't have just one middle number, we have a pair of middle numbers:
3, 5, 7, 12, 13, 14, 2123, 23, 23, 23, 29, 40, 56

In this example the middle numbers are 21 and 23.
To find the value halfway between them, add them together and divide by 2:
21 + 23 = 44
then 44 ÷ 2 = 22

So the Median in this example is 22.

(Note that 22 was not in the list of numbers ... but that is OK because half the numbers in the list are less, and half the numbers are greater.)

Your Turn

Sort the list (drag them left or right), find the median, type in your answer.
© 2015 MathsIsFun.com v 0.8

Where is the Middle?

A quick way to find the middle: count how many numbers, add 1 then divide by 2

Example: There are 45 numbers

45 plus 1 is 46, then divide by 2 and we get 23
So the median is the 23rd number in the sorted list.

Example: There are 66 numbers

66 plus 1 is 67, then divide by 2 and we get 33.5
33 and a half? That means that the 33rd and 34th numbers in the sorted list are the two middle numbers.
So to find the median: add the 33rd and 34th numbers together and divide by 2.

Комментариев нет:

Отправить комментарий