Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

mode function

The most frequent value of a list, or a list of them when several are equally frequent.

How to write it

mode(data)

data
The values. Equal values are counted, in any order. Takes a list.

Examples

  • mode⁡([1,2,2,3,3,3])=3\displaystyle \operatorname{mode}(\left[ 1, 2, 2, 3, 3, 3 \right]) = 3
    mode([1, 2, 2, 3, 3, 3])

    In the solver, mode([1, 2, 2, 3, 3, 3]) gives 3.

    Open in the solver
  • mode⁡([1,1,2,2,3])=[1,2]\displaystyle \operatorname{mode}(\left[ 1, 1, 2, 2, 3 \right]) = \left[ 1, 2 \right]
    mode([1, 1, 2, 2, 3])

    In the solver, mode([1, 1, 2, 2, 3]) gives [1, 2].

    Open in the solver
  • normal_distribution

    The normal distribution with mean mu and standard deviation sigma.

  • median

    The middle value of a list of numbers, or the mean of the two middle ones.

  • ornstein_uhlenbeck_process

    A process pulled toward mu at rate theta, with noise sigma, started at x0.

  • mean

    The average of a list of numbers, or the expected value of a distribution.

  • pdf

    The density of a distribution at a point, or the probability of a value for a discrete one.

  • ito_process

    A process given by its drift and diffusion: dX = drift dt + diffusion dW.