Descriptive Statistics is broken down into Tendency and Variability.
Tendency is about Center Measures:
- The Mean (the average value)
- The Median (the mid point value)
- The Mode (the most common value)
The Mean
The Mean Value is the Average of all values.
This table contains 11 values:
| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | Col 7 | Col 8 | Col 9 | Col 10 | Col 11 |
|---|---|---|---|---|---|---|---|---|---|---|
| 7 | 8 | 8 | 9 | 9 | 9 | 10 | 11 | 14 | 14 | 15 |
To find the Mean Value: Add all values and divide by the number of values.
The Mean Value is: (7+8+8+9+9+9+10+11+14+14+15)/11 = 10.3636363636.
The Mean is the Sum divided by the Count.
let mean = (7+8+8+9+9+9+10+11+14+14+15)/11;
const values = [7,8,8,9,9,9,10,11,14,14,15];
let mean = math.mean(values);
The Median
99,86,87,88,111,86,103,87,94,78,77,85,86
The Median is the value in the middle (after the values are sorted):
77,78,85,86,86,86,87,87,88,94,99,103,111
const speed = [99,86,87,88,111,86,103,87,94,78,77,85,86];
let median = math.median(speed);
If there are two numbers in the middle, divide the sum of them by two.
77,78,85,86,86,86,87,87,88,94,99,103
(86 + 87) / 2 = 86.5
const speed = [99,86,87,88,86,103,87,94,78,77,85,86];
let median = math.median(speed);
The Mode
The Mode Value is the value that appears the most number of times:
99,86,87,88,111,86,103,87,94,78,77,85,86
const speed = [99,86,87,88,86,103,87,94,78,77,85,86];
let mode = math.mode(speed);
Outliers
Outliers are values "outside" the other values:
99,86,87,88,111,86,103,87,94,78,300,85,86
Outliers can change the mean a lot. Sometimes we don't use them (they might be an error), or we use the median or the mode instead.
const values = [99,86,87,88,111,86,103,87,94,78,300,85,86];
let mean = math.mean(values);