In statistics, the mode is a measure of central tendency that describes the value that appears most frequently in a given set of data). It is one of the three measures of central tendency, along with the mean and median. The mode is used to describe the most common value in a set of data, and it can be calculated for both numerical and categorical data. The mode is not necessarily unique to a given distribution, since the probability mass function may take the same maximum value at several points). In other words, a set of data may have one mode, more than one mode, or no mode at all. The mode is unstable when the data consist of a small number of values. To calculate the mode, all numbers in a given set should be placed in order, and then the number that appears most frequently is the mode. If two or more numbers appear with the same frequency, then the set is said to be bimodal or multimodal. The mode is different from the mean, which is the average of all numbers within a data set, and is also different from the median, which is the middle value of a set.