Function reference · Statistics
median
Returns the middle value of numerically orderable data.
median orders the supplied values by their evaluated numeric values. For an even number of values, it returns the mean of the two middle entries. Unorderable symbolic or complex inputs remain in an unevaluated median call.
Pass separate arguments or a single vector.
Examples
These examples use Nerdamer Notation.
Select the middle value of three inputs.
median(1,7,3)
// → 3Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
median(arg1, ...)
nerdamer.median
Call the operation through the default nerdamer import.
nerdamer.median(...args: StatisticsInput[]): Expression
Parameters
| Name | Type | Description |
|---|---|---|
args | StatisticsInput[] | — |
Returns
Direct JavaScript / TypeScript API
Import the operation directly from its package entry point.
import { median } from 'nerdamer/statistics';
median(...args: StatisticsInput[]): Expression
Parameters
| Name | Type | Description |
|---|---|---|
args | StatisticsInput[] | — |
