Order Statistics


Example 1: Continuous     Logistic distribution

Let random variable X have a Logistic distribution with pdf f(x):

In[1]:=

Let (X _ 1, X _ 2, ..., X _ n) denote a sample of size n drawn on X, and let (X _ (1), X _ (2), ..., X _ (n)) denote the ordered sample, so that X _ (1) < X _ (2) < ··· < X _ (n). The pdf of the r th order statistic, X _ (r), is given by the mathStatica function:

In[2]:= OrderStat[r, f]

Out[2]= eqn

The following diagram plots the pdf of the r th order statistic, as r increases from 1 to 10, given a sample of size n = 10:

[Graphics:HTMLFiles/index_16.gif]


The joint pdf of X _ (r) and X _ (s), for r < s, is given by:

In[3]:= OrderStat[{r, s}, f]

Out[3]:= eqn


Example 2: Discrete    Negative Binomial distribution

A new feature in mathStatica 1.2 is that the OrderStat function now also supports discrete random variables. To illustrate, let random variable X ~ NegativeBinomial(p, λ) with pmf f(x):

In[1]:= eqn

Let (X _ 1, ..., X _ n) denote a random sample of size n drawn on X, and let (X _ (1), ..., X _ (n)) denote the order statistics.

Then, the pmf of the r th order statistic, X _ (r), denoted g(x), is given immediately by:

In[2]:= g = OrderStat[r, f]

Out[2]:= eqn

with domain of support:

In[3]:= domain[g] = OrderStatDomain[r, f]

Out[3]:= eqn

The following diagram plots the pmf of the r th order statistic that we have just derived, when p = 1/8, λ = 4 and r = 1 and the sample size is n = 10:

In[4]:= PlotDensity

[Graphics:HTMLFiles/index_42.gif]