Median
The middle value of the collection once sorted.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Median✓Median(collection)the middle value of the collection once sorted.SageMath
median(collection)Median(matrix)the column-wise median, one value per column.SageMath
median(matrix)Median(dist)the exact quantile at 1/2 of a distribution, where one exists; otherwise unevaluated.SageMath
median(dist)Typed signatures
| Type | Package | Applies |
|---|---|---|
((collection<nothing | number> | number)+) -> nan | real | signed_infinity | compute-engine | always |
((collection<nothing | number> | list<list<any>> | number)*) -> list | nan | real | signed_infinity | combinatoricsreplaces compute-engine | always |
((collection<nothing | number> | distribution | list<list<any>> | number)*) -> list | nan | number | real | signed_infinity | statisticsreplaces combinatorics | always |
Details
- For an odd-length collection, the median is the middle element of Sort's result; for even length, it's the average of the two middle elements.
- Much less sensitive to outliers than Mean — a single extreme value barely moves it.
- Given a matrix (a list of equal-length rows), computes the median of each column.
- See Mode for the most frequent value.
Examples
Scope #
Applications #
Properties #
About
| Examples | 16 |
|---|---|
| Checked against | Wolfram Language 16 agreeSageMath 12 agree2 error |
| Crosswalk | Wolfram LanguageSageMath |
Implementation
mapped
sagepackages/oracle/src/mappings.ts