What is the arithmetic mean of the following numbers?
INTEGER_LIST
MEAN
To find the mean, add all the numbers and then divide by the number of numbers.
INTEGER_LIST
There are INTEGERS_COUNT
numbers.
The mean is \displaystyle fractionSimplification( sum(INTEGERS), INTEGERS_COUNT )
.
What is the median of the following numbers?
INTEGER_LIST
MEDIAN
First, order the numbers, giving:
SORTED_LIST
Since we have 2
middle numbers, the median is the mean of those two numbers!
The median is the 'middle' number:
MEDIAN_LIST
The median is \dfrac{SORTED_INTS[ SORTED_INTS.length / 2 - 1 ] + SORTED_INTS[ SORTED_INTS.length / 2 ]}{2}
.
So the median is fractionReduce(2 * MEDIAN, 2)
.
Another way to find the middle number is to draw the numbers on a number line. If a number appears multiple times, count its corresponding dot multiple times.
What is the mode of the following numbers?
INTEGER_LIST
MODE
The mode is the most frequent number.
We can draw a histogram to see how many times each number appears.
There are more MODE
s than any other number, so MODE
is the mode.