Median (median)
The middle value of a list of numbers, or the mean of the two middle ones.
How to write it
median(data)
- data
- The numbers. They are put in order, so symbols are not allowed. Takes a list.
Examples
median([3, 1, 4, 1, 5])In the solver,
Open in the solvermedian([3, 1, 4, 1, 5])gives3.median([2, 4, 4, 4, 5, 5, 7, 9])In the solver,
Open in the solvermedian([2, 4, 4, 4, 5, 5, 7, 9])gives9/2.
Related functions
- mode
The most frequent value of a list, or a list of them when several are equally frequent.
- mean
The average of a list of numbers, or the expected value of a distribution.
- normal_distribution
The normal distribution with mean mu and standard deviation sigma.
- ito_process
A process given by its drift and diffusion: dX = drift dt + diffusion dW.
- ornstein_uhlenbeck_process
A process pulled toward mu at rate theta, with noise sigma, started at x0.
- ito_integral
The Itô integral of an expression of the Wiener value w and the time s, from 0 to t.