Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
OrderDistribution
  • See Also
    • ExtremeValueDistribution
    • GumbelDistribution
    • WeibullDistribution
    • Quantile
    • Min
    • Max
    • RankedMin
    • RankedMax
  • Related Guides
    • Extreme Value Distributions
    • Derived Statistical Distributions
    • Random Variables
    • See Also
      • ExtremeValueDistribution
      • GumbelDistribution
      • WeibullDistribution
      • Quantile
      • Min
      • Max
      • RankedMin
      • RankedMax
    • Related Guides
      • Extreme Value Distributions
      • Derived Statistical Distributions
      • Random Variables

OrderDistribution[{dist,n},k]

represents the k^(th)-order statistics distribution for n observations from the distribution dist.

OrderDistribution[{dist,n},{k1,k2,…}]

represents the joint ^(th)-order statistics distribution from n observations from the distribution dist.

OrderDistribution[{dist1,…,distn},…]

represents the order statistics distribution for independent distributions disti.

OrderDistribution[mdist,…]

represents the order statistics distribution for multivariate distribution mdist.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Parametric Distributions  
Nonparametric Distributions  
Derived Distributions  
Automatic Simplifications  
Continuous Distributions  
Discrete Distributions  
Generalizations & Extensions  
Applications  
Properties & Relations  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ExtremeValueDistribution
    • GumbelDistribution
    • WeibullDistribution
    • Quantile
    • Min
    • Max
    • RankedMin
    • RankedMax
  • Related Guides
    • Extreme Value Distributions
    • Derived Statistical Distributions
    • Random Variables
    • See Also
      • ExtremeValueDistribution
      • GumbelDistribution
      • WeibullDistribution
      • Quantile
      • Min
      • Max
      • RankedMin
      • RankedMax
    • Related Guides
      • Extreme Value Distributions
      • Derived Statistical Distributions
      • Random Variables

OrderDistribution

OrderDistribution[{dist,n},k]

represents the k^(th)-order statistics distribution for n observations from the distribution dist.

OrderDistribution[{dist,n},{k1,k2,…}]

represents the joint ^(th)-order statistics distribution from n observations from the distribution dist.

OrderDistribution[{dist1,…,distn},…]

represents the order statistics distribution for independent distributions disti.

OrderDistribution[mdist,…]

represents the order statistics distribution for multivariate distribution mdist.

Details

  • OrderDistribution[{dist,n},k] represents the distribution of the k^(th) element in the sorted list of n samples drawn from the parent distribution dist.
  • The argument distribution specification is the same as in ProductDistribution. It represents a multivariate distribution and needs to be either continuous or discrete in all variables.
  • OrderDistribution[dists,1] represents the distribution of Min[x1,…,xn], where {x1,…,xn} has distribution ProductDistribution[dists].
  • OrderDistribution[dists,k] represents the distribution of RankedMin[{x1,…,xn},k], where {x1,…,xn} has distribution ProductDistribution[dists].
  • OrderDistribution can be used with such functions as Mean, CDF, and RandomVariate.

Examples

open all close all

Basic Examples  (3)

Simple order distributions:

Wolfram Language code: OrderDistribution[{UniformDistribution[], n}, k]
Wolfram Language code: OrderDistribution[{ExponentialDistribution[λ], n}, 1]

Order distribution of a single order statistic behaves like any other univariate distribution:

Wolfram Language code: 𝒟 = OrderDistribution[{DiscreteUniformDistribution[{1, 10}], n}, n]
Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: Block[{n = 3}, DiscretePlot[PDF[𝒟, x], {x, 0, 10}]]

Joint order distribution of two or more order statistics works like any other multivariate distribution:

Wolfram Language code: 𝒟 = OrderDistribution[{UniformDistribution[], n}, {i, j}]
Wolfram Language code: PDF[𝒟, {x, y}]
Wolfram Language code: Block[{n = 5, i = 2, j = 4}, Plot3D[%, {x, 0, 1}, {y, 0, 1}]]

Scope  (35)

Basic Uses  (6)

Compare the distribution of minimum and maximum from a normal sample:

Wolfram Language code: 𝒟min = OrderDistribution[{NormalDistribution[], 10}, 1]; 𝒟max = OrderDistribution[{NormalDistribution[], 10}, 10];
Wolfram Language code: Plot[{Legended[PDF[𝒟min, x], "𝒟min"], Legended[PDF[𝒟max, x], "𝒟max"]}, {x, -4, 4}, Filling -> Axis]

Find the distribution of the k^(th)-order statistics in a normal sample of 10 elements:

Wolfram Language code: 𝒟[k_] = OrderDistribution[{NormalDistribution[], 10}, k];

Find probability density function:

Wolfram Language code: pdf[k_] = PDF[𝒟[k], x]

Plot the PDF of the smallest, the seventh smallest, and the largest variable:

Wolfram Language code: Plot[{Legended[pdf[1], "min"], Legended[pdf[7], "7th"], Legended[pdf[10], "max"]}, {x, -3, 3}, Filling -> Axis, PlotStyle -> {Automatic, Automatic, Automatic}]

Quantile function:

Wolfram Language code: quantile[k_] = Quantile[𝒟[k], q]
Wolfram Language code: Plot[{Legended[quantile[1], "min"], Legended[quantile[7], "k==7"], Legended[quantile[10], "max"]}, {q, 0, 1}, Filling -> Axis, PlotRange -> {-3, 3}, PlotStyle -> {Automatic, Automatic, Automatic}]

Find the distribution of the maximum of independent discrete variables:

Wolfram Language code: 𝒟 = OrderDistribution[{PoissonDistribution[μ], n}, n]

Probability density function:

Wolfram Language code: PDF[𝒟, x]

Compare for different values of distribution parameter:

Wolfram Language code: Block[{n = 10}, DiscretePlot[Evaluate[Table[Legended[PDF[𝒟, x], Row[{"μ", " = ", μ}]], {μ, {3, 5, 7}}]], {x, 1, 18}, PlotMarkers -> Automatic, Joined -> True, Filling -> None]]

Find the median order statistic distribution:

Wolfram Language code: 𝒟 = OrderDistribution[{ExponentialDistribution[λ], 5}, 3];

Probability density function:

Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: Plot[Evaluate[Table[Legended[PDF[𝒟, x], Row[{"λ", " = ", λ}]], {λ, {0.3, 0.7, 1}}]], {x, 0, 5}, Filling -> Axis]

Mean and variance:

Wolfram Language code: {Mean[𝒟], Variance[𝒟]}

Find the joint distribution of the smallest and the largest elements:

Wolfram Language code: 𝒟 = OrderDistribution[{BinomialDistribution[40, 1 / 6], 4}, {1, 4}];
Wolfram Language code: DiscretePlot3D[PDF[𝒟, {x, y}], {x, 0, 8}, {y, 5, 15}, ExtentSize -> 1 / 2]

Estimate the sample size:

Wolfram Language code: data = RandomVariate[OrderDistribution[{NormalDistribution[], 10}, 4], 10 ^ 2];
Wolfram Language code: EstimatedDistribution[data, OrderDistribution[{NormalDistribution[], n}, 4]]

Parametric Distributions  (5)

Define the distribution of k^(th)-order statistics of ExponentialDistribution:

Wolfram Language code: 𝒟 = OrderDistribution[{ExponentialDistribution[λ], n}, k];

Probability density function:

Wolfram Language code: PDF[𝒟, x]

Cumulative distribution function:

Wolfram Language code: CDF[𝒟, x]

Distribution functions:

Wolfram Language code: Block[{n = 10, k = 3, λ = 2}, Table[Plot[fun[𝒟, x], {x, 0, 0.7}, Filling -> Axis, PlotLabel -> fun], {fun, {PDF, CDF, SurvivalFunction, HazardFunction}}]]

Find the distribution of the maximum of a sample of a continuous distribution:

Wolfram Language code: 𝒟 = OrderDistribution[{WeibullDistribution[3, 2], n}, n];

Find the probability density function:

Wolfram Language code: PDF[𝒟, x]

Plot the PDF for different sample sizes:

Wolfram Language code: Plot[Table[Legended[PDF[𝒟, x], Row[{"n", " = ", n}]], {n, {5, 10, 20}}]//Evaluate, {x, 1, 4.5}, Filling -> Axis]

Find the distribution of the minimum in a sample from a discrete distribution:

Wolfram Language code: 𝒟 = OrderDistribution[{BenfordDistribution[b], n}, 1];

Generate random numbers:

Wolfram Language code: sample = Block[{n = 4, b = 10}, RandomVariate[𝒟, 10 ^ 4]];

Compare with the PDF:

Wolfram Language code: Block[{n = 4, b = 10}, Show[Histogram[sample, {0.5, 5.5, 1}, "PDF"], DiscretePlot[PDF[𝒟, x], {x, 0, 10}, PlotStyle -> PointSize[Medium]]]]

Find the k^(th)-order statistics of BinomialDistribution:

Wolfram Language code: 𝒟 = OrderDistribution[{BinomialDistribution[100, 1 / 3], 10}, k];

Find the probability density function:

Wolfram Language code: PDF[𝒟, x]

Plot the PDF for the minimum, maximum, and the 4^(th)-order statistics:

Wolfram Language code: DiscretePlot[Table[Legended[PDF[𝒟, x], Row[{"k", " = ", k}]], {k, {1, 4, 10}}]//Evaluate, {x, 20, 50}, PlotMarkers -> Automatic]

Mean and variance for the 4^(th)-order statistics:

Wolfram Language code: Block[{k = 4}, {Mean[𝒟], Variance[𝒟]}]//N

Skewness and kurtosis for the 4^(th)-order statistics:

Wolfram Language code: Block[{k = 4}, {Skewness[𝒟], Kurtosis[𝒟]}]//N

Find the distribution of a maximum in a sample from SkellamDistribution:

Wolfram Language code: 𝒟 = OrderDistribution[{SkellamDistribution[20, 10], 20}, 20];

Probability density function:

Wolfram Language code: DiscretePlot[PDF[𝒟, x], {x, 10, 30}]

Quantile function:

Wolfram Language code: points = Table[N[CDF[𝒟, x]], {x, 10, 30, 2}];
Wolfram Language code: DiscretePlot[Quantile[𝒟, x], {x, points}, ExtentSize -> Right, ExtentMarkers -> {"Empty", "Filled"}]

Nonparametric Distributions  (3)

Find the distribution of the maximum in a sample from a HistogramDistribution:

Wolfram Language code: hd = HistogramDistribution[RandomVariate[BirnbaumSaundersDistribution[1 / 2, 3], 10 ^ 3]]; 𝒟 = OrderDistribution[{hd, 10}, 10];

Probability density function:

Wolfram Language code: Plot[PDF[𝒟, x], {x, 0.2, 1.5}, PlotRange -> All, Exclusions -> None, Filling -> Axis]

Find the distribution of the k^(th)-order statistics from a SmoothKernelDistribution:

Wolfram Language code: skd = SmoothKernelDistribution[RandomVariate[NormalDistribution[], 10 ^ 3]]; 𝒟 = OrderDistribution[{skd, 5}, k];

Compare the density functions for the minimum, the median, and the maximum:

Wolfram Language code: Plot[Table[Legended[PDF[𝒟, x], Row[{"k", " = ", k}]], {k, {1, 3, 5}}]//Evaluate, {x, -3.5, 3.5}, PlotRange -> All, Exclusions -> None, Filling -> Axis]

Find the distribution of the minimum in a sample from an EmpiricalDistribution:

Wolfram Language code: ed = EmpiricalDistribution[RandomVariate[PoissonDistribution[9], 20]]; 𝒟 = OrderDistribution[{ed, 3}, 1];

Cumulative distribution function:

Wolfram Language code: DiscretePlot[CDF[𝒟, x], {x, 0, 12}, ExtentSize -> Right]

Derived Distributions  (7)

Find the second largest order statistic from a TruncatedDistribution:

Wolfram Language code: 𝒫 = TruncatedDistribution[{-1, 2}, NormalDistribution[]]; 𝒟 = OrderDistribution[{𝒫, 10}, 8];

Cumulative distribution function:

Wolfram Language code: CDF[𝒟, x]//FullSimplify

Compare the PDFs of the order distribution and the truncated normal distribution:

Wolfram Language code: Plot[{Legended[Evaluate[PDF[𝒟, x]], "𝒟"], Legended[PDF[𝒫, x], "𝒫"]}, {x, -1.2, 2}, Filling -> Axis]

Find the distribution of the maximum of the sample from a ParameterMixtureDistribution:

Wolfram Language code: ℳ = ParameterMixtureDistribution[RayleighDistribution[σ], σHalfNormalDistribution[θ]]; 𝒟 = OrderDistribution[{ℳ, 10}, 10];

Compute probability density function:

Wolfram Language code: PDF[𝒟, x]//FullSimplify

Plot the PDF for different values of the parameter of the weight distribution:

Wolfram Language code: Plot[Evaluate[Table[Legended[PDF[𝒟, x], Row[{"θ", " = ", θ}]], {θ, {1 / 2, 1, 1.5}}]], {x, 0, 10}, Filling -> Axis]

Find the distribution of the middle element from a sample of 9 from a MixtureDistribution:

Wolfram Language code: ℳ = MixtureDistribution[{4, 3}, {NormalDistribution[], NormalDistribution[2, 1 / 2]}]; 𝒟 = OrderDistribution[{ℳ, 9}, 5];

Compare probability density functions of mixture distribution and order distribution:

Wolfram Language code: Plot[{Legended[Evaluate[PDF[𝒟, x]], "𝒟"], Legended[PDF[ℳ, x], "ℳ"]}, {x, -2, 3.5}, Filling -> Axis]

Compare means:

Wolfram Language code: {Mean[ℳ//N], Mean[𝒟//N]}

Find the distribution of a minimum from a TransformedDistribution:

Wolfram Language code: 𝒫 = TransformedDistribution[Log[u], uExponentialDistribution[1 / 10]]; 𝒟 = OrderDistribution[{𝒫, 10}, 1];
Wolfram Language code: Plot[PDF[𝒟, x], {x, -3, 2}, Filling -> Axis]
Wolfram Language code: PDF[𝒟, x]

Find the joined distribution of minimum and maximum from CensoredDistribution:

Wolfram Language code: 𝒞 = CensoredDistribution[{2, 10}, BinomialDistribution[20, 1 / 3]]; 𝒟 = OrderDistribution[{𝒞, 4}, {1, 4}];
Wolfram Language code: DiscretePlot3D[Evaluate[PDF[𝒟, {x, y}]], {x, 0, 10}, {y, 5, 15}, ExtentSize -> Full]

Find the distribution of a maximum from a MarginalDistribution:

Wolfram Language code: ℳ = MarginalDistribution[ProbabilityDistribution[6( x - y / 2) ^ 2, {x, 0, 1}, {y, 0, 1}], 2]; 𝒟 = OrderDistribution[{ℳ, 3}, 3];
Wolfram Language code: Plot[Evaluate[PDF[𝒟, x]], {x, 0, 1}, Filling -> Axis, PlotRange -> All]
Wolfram Language code: PDF[𝒟, x]

Order distribution from QuantityDistribution evaluates to QuantityDistribution:

Wolfram Language code: OrderDistribution[{QuantityDistribution[ExponentialDistribution[1 / 5], "Seconds"], 10}, 3]
Wolfram Language code: Plot[PDF[%, Quantity[x, "Seconds"]]//Evaluate, {x, 0, 10}, AxesLabel -> {"s"}, Filling -> 0]

Automatic Simplifications  (14)

Continuous Distributions  (13)

BetaDistribution is the order distribution for UniformDistribution:

Wolfram Language code: OrderDistribution[{UniformDistribution[{0, 1}], n}, k]

DagumDistribution is closed under Max:

Wolfram Language code: OrderDistribution[{DagumDistribution[p, a, b], n}, n]

ExponentialDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{ExponentialDistribution[λ], n}, 1]

ExtremeValueDistribution is closed under Max:

Wolfram Language code: OrderDistribution[{ExtremeValueDistribution[α, β], n}, n]

FrechetDistribution is closed under Max:

Wolfram Language code: OrderDistribution[{FrechetDistribution[α, β], n}, n]
Wolfram Language code: OrderDistribution[{FrechetDistribution[α, β, μ], n}, n]

GompertzMakehamDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{GompertzMakehamDistribution[λ, ξ], n}, 1]
Wolfram Language code: OrderDistribution[{GompertzMakehamDistribution[λ, ξ, θ, α], n}, 1]

GumbelDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{GumbelDistribution[α, β], n}, 1]

MaxStableDistribution is closed under Max:

Wolfram Language code: OrderDistribution[{MaxStableDistribution[μ, σ, ξ], n}, n]
Wolfram Language code: OrderDistribution[{MaxStableDistribution[μ, σ, 0], n}, n]

MinStableDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{MinStableDistribution[μ, σ, ξ], n}, 1]
Wolfram Language code: OrderDistribution[{MinStableDistribution[μ, σ, 0], n}, 1]

ParetoDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{ParetoDistribution[k, α], n}, 1]

PowerDistribution is closed under Max:

Wolfram Language code: n = 4; OrderDistribution[Table[PowerDistribution[p, a[k]], {k, n}], n]

SinghMaddalaDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{SinghMaddalaDistribution[q, a, b], n}, 1]

WeibullDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{WeibullDistribution[α, β], n}, 1]
Wolfram Language code: OrderDistribution[{WeibullDistribution[α, β, μ], n}, 1]

Discrete Distributions  (1)

GeometricDistribution is closed under Min:

Wolfram Language code: OrderDistribution[{GeometricDistribution[p], n}, 1]

Generalizations & Extensions  (2)

Probability that the smallest element of the multinomial random variable equals 1:

Wolfram Language code: Probability[k == 1, kOrderDistribution[MultinomialDistribution[4, {(1/5), (1/5), (1/5), (2/5)}], 1]]

Compute the mean of the largest of three independent exponential distributions:

Wolfram Language code: Mean[OrderDistribution[{ExponentialDistribution[Subscript[λ, 1]], ExponentialDistribution[Subscript[λ, 2]], ExponentialDistribution[Subscript[λ, 3]]}, 3]]//FullSimplify

Applications  (8)

Four six-sided dice are rolled. Find the expectation of the minimum value:

Wolfram Language code: Expectation[x, xOrderDistribution[{DiscreteUniformDistribution[{1, 6}], 4}, 1]]
Wolfram Language code: N[%]

Find the expectation of the maximum value:

Wolfram Language code: Expectation[x, xOrderDistribution[{DiscreteUniformDistribution[{1, 6}], 4}, 4]]
Wolfram Language code: N[%]

Find the expectation of the sum of the three largest values. Using the identity and linearity of Expectation, you get:

Wolfram Language code: Expectation[x1 + x2 + x3 + x4, {x1, x2, x3, x4}ProductDistribution[{DiscreteUniformDistribution[{1, 6}], 4}]] - Expectation[x, xOrderDistribution[{DiscreteUniformDistribution[{1, 6}], 4}, 1]]
Wolfram Language code: N[%]

Find the probability that the most successful hedge‐fund manager among 25 non‐skilled managers outperforms the market nine out of 10 years, assuming their performances are independent from each other, and from year to year:

Wolfram Language code: managerSuccessDist = BinomialDistribution[10, 1 / 2];
Wolfram Language code: NProbability[goodYears ≥ 9, goodYearsOrderDistribution[{managerSuccessDist, 25}, 25]]

Compare to the probability that one a priori chosen manager performs this well:

Wolfram Language code: NProbability[goodYears ≥ 9, goodYearsmanagerSuccessDist]

A random sample of size 10 from a continuous distribution is sorted in ascending order. A new random variate is generated. Find the probability that the eleventh sample falls between the fourth and fifth smallest values in the sorted list:

Wolfram Language code: 𝒟 = UniformDistribution[];n = 10;k = 4;
Wolfram Language code: Probability[x < z < y, {z𝒟, {x, y}OrderDistribution[{𝒟, n}, {k, k + 1}]}]

The probability equals and is independent of k:

Wolfram Language code: Table[Probability[x < z < y, {z𝒟, {x, y}OrderDistribution[{𝒟, n}, {k, k + 1}]}], {k, 1, n - 1}]

It is also independent of the distribution:

Wolfram Language code: 𝒟 = ExponentialDistribution[1];n = 6;
Wolfram Language code: Table[Probability[x < z < y, {z𝒟, {x, y}OrderDistribution[{𝒟, n}, {k, k + 1}]}], {k, 1, n - 1}]

Compute a sample median expectation for ExponentialDistribution:

Wolfram Language code: mOdd = Expectation[x, xOrderDistribution[{ExponentialDistribution[1], 2n + 1}, n + 1]]

And when the sample is even:

Wolfram Language code: mEven = Expectation[(x + y) / 2, {x, y}OrderDistribution[{ExponentialDistribution[1], 2n}, {n, n + 1}]]//FullSimplify

Compute large approximations:

Wolfram Language code: Series[mEven, {n, Infinity, 4}]
Wolfram Language code: Series[mOdd, {n, Infinity, 4}]

Compare with the population median:

Wolfram Language code: Median[ExponentialDistribution[1]]

Find the distribution of range in the size sample from an ExponentialDistribution:

Wolfram Language code: cdf = Probability[max - min < z, {min, max}OrderDistribution[{ExponentialDistribution[λ], n}, {1, n}], Assumptions -> n > 1]
Wolfram Language code: dist[λ_, n_] = ProbabilityDistribution[{"CDF", cdf}, {z, 0, ∞}, Assumptions -> n > 1];

Find the probability density function:

Wolfram Language code: pdf = PDF[dist[λ, n], z]

Compare it to the histogram, assuming a sample size of 6:

Wolfram Language code: Show[ Histogram[Max[#] - Min[#]& /@ RandomVariate[ExponentialDistribution[1], {10 ^ 4, 6}], 25, "PDF"], Plot[PDF[dist[1, 6], z], {z, 0, 10}, PlotStyle -> Thick]]

A new realization of random variate from ErlangDistribution is generated every minute. A record is said to occur if the value generated is larger than any prior realizations. Find the distribution of the value of the second record:

Wolfram Language code: 𝒟 = ErlangDistribution[k, β];

The first record necessarily occurs in the first minute. Given that the second record occurs on the ^(th) minute, its probability density is given by:

Wolfram Language code: condpdf[n_, x_] = PDF[OrderDistribution[{𝒟, n}, n], x]

The probability for the second record to occur on the ^(th) minute is equal to the number of permutations with the first and last elements fixed and divided by the total number of permutations:

Wolfram Language code: pr[n_] := (n - 2)! / n!

The density of interest is obtained by summing over :

Wolfram Language code: pdf[k_, β_, x_] = Sum[condpdf[n, x]pr[n], {n, 2, ∞}]

Verify normalization for :

Wolfram Language code: Integrate[pdf[2, 1, x], {x, 0, ∞}]

Compare the PDF of the second record with the PDF of the Erlang random variate:

Wolfram Language code: Plot[{Legended[pdf[2, 1, x], "pdf[x]"], Legended[PDF[𝒟 /. {k -> 2, β -> 1}, x], "PDF[𝒟, x]"]}, {x, 0, 10}, Filling -> Axis]

Find the mean and standard deviation of the second record value:

Wolfram Language code: Mean[ProbabilityDistribution[pdf[2, 1, x], {x, 0, ∞}]]
Wolfram Language code: StandardDeviation[ProbabilityDistribution[pdf[2, 1, x], {x, 0, ∞}]]

Find the distribution of the largest element in a standard normal sample of size , where itself is a random number from a shifted GeometricDistribution with :

Wolfram Language code: 𝒟 = ParameterMixtureDistribution[OrderDistribution[{NormalDistribution[], n + 1}, n + 1], nGeometricDistribution[1 / 4]];

Find the probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]

Generate random numbers following this distribution:

Wolfram Language code: data = RandomVariate[𝒟, 10 ^ 4];

Plot the density and compare it with the histogram:

Wolfram Language code: Show[Histogram[data, 25, "PDF"], Plot[pdf, {x, -4, 4}, PlotStyle -> Thick]]

Approximate the mean of the distribution:

Wolfram Language code: NExpectation[x, x𝒟]

Compare it with the sample mean:

Wolfram Language code: Mean[data]

A system is composed of three identical elements defined by the lifetime distribution. The system is said to have failed when two out of three components are down. Find the lifetime distribution of this system:

Wolfram Language code: componentLifetime = WeibullDistribution[2, Quantity[3, "Years"]]; systemLifetime = OrderDistribution[{componentLifetime, 3}, 2];

Compare the density function of the system with the density function of a component:

Wolfram Language code: Plot[{PDF[componentLifetime, Quantity[x, "Years"]], PDF[systemLifetime, Quantity[x, "Years"]]}, {x, 0, 8}, Filling -> Axis, PlotLegends -> {"Component Lifetime", "System Lifetime"}, AxesLabel -> {"yr"}]

Find the mean lifetime of such a system:

Wolfram Language code: Mean[systemLifetime]//N

Find the median lifetime:

Wolfram Language code: Median[systemLifetime]
Wolfram Language code: N[%]

Properties & Relations  (3)

OrderDistribution is the distribution of the RankedMin of a random sample:

Wolfram Language code: 𝒹 = GammaDistribution[2, 3]; data = RandomVariate[ProductDistribution[{𝒹, 10}], 10 ^ 3]; 𝒟 = OrderDistribution[{𝒹, 10}, 2];

Compare the histogram of the data with the PDF of the corresponding order distribution:

Wolfram Language code: Show[Histogram[RankedMin[#, 2]& /@ data, Automatic, "PDF"], Plot[PDF[𝒟, x], {x, 0, 6}, PlotStyle -> Thick]]

OrderDistribution is a special case of TransformedDistribution:

Wolfram Language code: Table[PDF[OrderDistribution[{NormalDistribution[], 3}, k], w], {k, 3}]
Wolfram Language code: Table[PDF[TransformedDistribution[RankedMin[{x, y, z}, k], {x, y, z}ProductDistribution[{NormalDistribution[], 3}]], w], {k, 3}]
Wolfram Language code: FullSimplify[%% - %]

In particular, the extreme cases correspond to Min and Max:

Wolfram Language code: {RankedMin[{x, y, z}, 1] - Min[x, y, z], RankedMin[{x, y, z}, 3] - Max[x, y, z]}//FullSimplify

ExponentialDistribution is the limiting distribution of the where has a UniformDistribution:

Wolfram Language code: mindist = OrderDistribution[{UniformDistribution[{0, 1}], n}, 1];
Wolfram Language code: CDF[mindist, x / n]
Wolfram Language code: Limit[CDF[mindist, x / n], n -> ∞]
Wolfram Language code: CDF[ExponentialDistribution[1], x]
Wolfram Language code: % - %%//FullSimplify

Neat Examples  (1)

Joint order distributions:

Wolfram Language code: Table[Plot3D[PDF[OrderDistribution[{NormalDistribution[], 3}, k], {x, y}], {x, -3, 3}, {y, -3, 3}, Mesh -> None, PlotRange -> {0, 0.6}, PlotLabel -> k], {k, Subsets[Range[3], {2}]}]
Wolfram Language code: Table[Plot3D[PDF[OrderDistribution[{NormalDistribution[], 4}, k], {x, y}], {x, -3, 3}, {y, -3, 3}, Mesh -> None, PlotRange -> {0, 1}, PlotLabel -> k], {k, Subsets[Range[4], {2}]}]

See Also

ExtremeValueDistribution  GumbelDistribution  WeibullDistribution  Quantile  Min  Max  RankedMin  RankedMax

Related Guides

    ▪
  • Extreme Value Distributions
  • ▪
  • Derived Statistical Distributions
  • ▪
  • Random Variables

History

Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2016 (10.4)

Wolfram Research (2010), OrderDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/OrderDistribution.html (updated 2016).

Text

Wolfram Research (2010), OrderDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/OrderDistribution.html (updated 2016).

CMS

Wolfram Language. 2010. "OrderDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/OrderDistribution.html.

APA

Wolfram Language. (2010). OrderDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OrderDistribution.html

BibTeX

@misc{reference.wolfram_2026_orderdistribution, author="Wolfram Research", title="{OrderDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/OrderDistribution.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_orderdistribution, organization={Wolfram Research}, title={OrderDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/OrderDistribution.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English