background preloader

☢️ Mode

Facebook Twitter

Mode

⊿ Point. {R} Glossary. ◢ Keyword: M. ◥ University. {q} PhD. {tr} Training. ⚫ UK. ↂ EndNote. ☝️ Weerakkody. Mode (statistics) Value that appears most often in a set of data In symmetric unimodal distributions, such as the normal distribution, the mean (if defined), median and mode all coincide. For samples, if it is known that they are drawn from a symmetric unimodal distribution, the sample mean can be used as an estimate of the population mode. Mode of a sample[edit] The mode of a sample is the element that occurs most often in the collection. For example, the mode of the sample [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17] is 6. Given the list of data [1, 1, 2, 4, 4] its mode is not unique. A dataset, in such a case, is said to be bimodal, while a set with more than two modes may be described as multimodal.

The following MATLAB (or Octave) code example computes the mode of a sample: X = sort(x); % x is a column vector datasetindices = find(diff([X; realmax]) > 0); % indices where repeated values change[modeL,i] = max (diff([0; indices])); % longest persistence length of repeated valuesmode = X(indices(i)); Use[edit] where.