RankedMax

RankedMax[list,n]

gives the n^(th) largest element in list.

RankedMax[list,-n]

gives the n^(th) smallest element in list.

Details

  • RankedMax yields a definite result if all its arguments are real numbers.
  • RankedMax[{x1,,xm},1] is equivalent to Max[{x1,,xm}].
  • RankedMax[{x1,,xm},-1] is equivalent to Min[{x1,,xm}].
  • RankedMax[{x1,,xm},m] is equivalent to Min[{x1,,xm}].
  • RankedMax[{x1,,xm},n] is equivalent to Quantile[{x1,,xm},(m-n+1)/m].

Examples

open allclose all

Basic Examples  (2)

The second largest of three numbers:

In[1]:=
Click for copyable input
Out[1]=

The second smallest of four numbers:

In[1]:=
Click for copyable input
Out[1]=

Scope  (6)

Applications  (6)

Properties & Relations  (6)

Neat Examples  (2)

See Also

RankedMin  TakeLargest  Max  MaximalBy  Min  Quantile  OrderDistribution  WinsorizedVariance

Introduced in 2010
(8.0)
| Updated in 2017
(11.1)