Measures of central tendency play important role in data description. If we have to choose a number to represent a characteristic of a population or a sample, in most cases, a measure of central tendency is chosen.
In this page, three such measures are investigated: mean, median and mode. These quantities are applied mainly to numerical variables.
Mean
In mathematics, there are several types of means. In this section, we investigate three of them: arithmetic mean or mean, geometric mean, and harmonic mean.
Mean
Mean, or arithmetic mean, is most frequently used in statistics. Mean of `n` value `x_1,x_2,\ ...\ ,x_i,\ ...\ ,x_n` is defined as:
| `bar x=(x_1+x_2+cdots+x_i+cdots+x_n)/n=1/n sum_(i=1)^n x_i` | (1) |
In cases where value `x_i` is accompanied by weight `w_i`, weighted mean is calculated by:
| `bar x=(w_1x_1+w_2x_2+cdots+w_ix_i+cdots+w_nx_n)/(w_1+w_2+cdots+w_i+cdots+w_n)=(sum_(i=1)^n w_ix_i)/(sum_(i=1)^n w_i)` | (2) |
When these weights are normalized:
| `sum_(i=1)^n w_i=1` | (3) |
| then | `bar x=sum_(i=1)^n w_ix_i` | (4) |
When data are separated into `n` groups and `x_i` is the representative value for group `i` and `f_i` is the number of element of this group, we get:
| `bar x=(sum_(i-1)^n f_ix_i)/(sum_(i-1)^n f_i)=1/N sum_(i=1)^n f_ix_i` | (5) |
`N` is the total elements of `n` groups.
Geometric mean
Geometric mean is used in cases which differences between values are large, so the arithmetic average is meaningless, for example in the field of microbiology.
Geometric mean of `n` positive numbers `x_1,x_2,\ ...\ ,x_i,\ ...\ ,x_n` is calculated by:
| `bar x=root(n)(x_1x_2\ cdots\ x_i \ cdots\ x_n)=root(n)(prod_(i=1)^n x_i)` | (6) |
Harmonic mean
In some cases of ratio, harmonic mean is useful. Harmonic mean is determined by formula:
| `bar x=1/(1/(x_1)+1/(x_2)+cdots+1/(x_i)+cdots+1/(x_n))` | (7) |
Rounding rule of the mean
The mean should be rounded to one more decimal place than number with smallest decimal place occurs in the original data.
For example mean of 1,2 ; 3,45 ; and 6,789 is 3,81.
Median
In general, median of an ascending ordered series is the value at the middle of this series.
Depending on the number of elements `n` of the series, there are two cases:
- if `n` is odd, median is the number at position `(n+1)//2`.
For example, the median of 8 12 26 54 78 92 115
is at position 4 : 54 - if `n` is even, median is the average of numbers at position `n//2` and `(n//2+1)`.
For example, the median of 8 12 26 54 78 92 115 132
is the average of 54 and 78 : 66
Mode
Mode is the value whose frequency is the highest.
For example, mode of series 3 6 4 3 5 4 3 8
is 3.
Notes
- Depend on series, we can have one mode, several modes, or no mode.
- Mode can be applied to non-numerical variables.