How the statistics are calculated
The median is the middle sorted value, or the mean of the two middle values for an even count. Modes are the most frequent repeated values. Range is maximum minus minimum. Standard deviation is the square root of the chosen variance.
Calculations use exact scaled integers and rational arithmetic. Variance is computed from n × sum of squares - sum² with its corresponding denominator, avoiding cancellation from nearby large values.
Worked example: 2, 4, 4, 4, 5, 5, 7, 9
- Eight values sum to 40, so the mean is 40 ÷ 8 = 5.
- The two middle values are 4 and 5, so the median is 9/2 = 4.5. Mode is 4, occurring three times.
- The range is 9 - 2 = 7. Squared deviations from the mean sum to 32.
- Population variance is 32 ÷ 8 = 4; population standard deviation is 2. Sample variance is 32/7, and sample standard deviation is approximately 2.138089935.
Reading the results
- Each observation has equal weight. Repeat a value only when it represents a repeated observation.
- The mean uses every value and can shift with outliers. The median describes the middle of the sorted list.
- Choose population spread for the full group of interest, or sample spread for observations used to estimate population variation.
- Variance has squared units. Standard deviation has the original units. Use one consistent unit across the list.
- Fractions remain exact. Bracketed decimal digits repeat; unfinished expansions are labelled truncated. Standard deviation is a numerical approximation.