A measure of central tendency summarises a whole data set into a single representative or typical value. The three most commonly used averages are the arithmetic mean, the median and the mode (the geometric and harmonic means are used in special cases). The arithmetic mean is the sum of all observations divided by their number,
; for grouped data it is
, and it can also be found by the assumed-mean method,
, or the step-deviation method. Its two key properties are that the sum of deviations of items about the mean is always zero and that it is affected by extreme values. When items differ in importance, a weighted arithmetic mean is used. The median is the positional middle value that divides an ordered distribution into two equal halves; its position is the
th item, and for a continuous series
. Unlike the mean, the median is not affected by extreme values. Related positional measures are quartiles, which divide the data into four equal parts (
,
median,
), and percentiles, which divide it into a hundred parts. The mode is the most frequently occurring value, found for grouped data from the modal class as
. The median always lies between the mean and the mode. The mean uses all observations but is distorted by extreme items; the median and mode suit open-ended distributions and the mode suits qualitative data.