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])In the solver,
Open in the solvermode([1, 2, 2, 3, 3, 3])gives3.mode([1, 1, 2, 2, 3])In the solver,
Open in the solvermode([1, 1, 2, 2, 3])gives[1, 2].
Related functions
- 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.