Is there a software that can graph the pdfs and Cds of an arbitrary number of order statistics or is there some code such software?
How to do it?
I'm trying to understand the distribution of order statistics easily.
Is there a software that can graph the pdfs and Cds of an arbitrary number of order statistics or is there some code such software?
How to do it?
I'm trying to understand the distribution of order statistics easily.
You should be able to do that in most statistical or graphing software. Some examples:
The minimum of $n$ iid observations from some distribution is an order statistic. Its density function (assuming a continuous distribution) can be calculated by (in R)
dmin <- function(x, N=1, basename="norm", ..., log=FALSE) {
dfun <- get(paste("d", basename, sep=""))
pfun <- get(paste("p", basename, sep=""))
logdens <- log(N) + (N-1)*pfun(x, ..., lower.tail=FALSE, log.p=TRUE) + dfun(x, ..., log=TRUE)
retval <- if (log) logdens else exp(logdens)
retval
}
And we can use it to graph the density of the minimum of 10 iid standard normals:
plot( function(x) dmin(x, N=10, "norm"), from=-5, to=5, col="blue", main="density of min of 10 iid N(0, 1)")
For more general order statistics we can do
dorder <- function(x, N=1, r=1, basename="norm", ..., log=FALSE) {
pfun <- get(paste("p", basename, sep=""))
dfun <- get(paste("d", basename, sep=""))
stopifnot(r <= N)
logdens <- -lbeta(r, N-r+1)+(r-1)*pfun(x, ..., log.p=TRUE) +(N-r)*pfun(x, ..., lower.tail=FALSE, log.p=TRUE) + dfun(x, ..., log=TRUE)
retval <- if (log) logdens else exp(logdens)
retval
}
As an example the density of 3rd order stat for a sample of 10 standard normals:
plot( function(x) dorder(x, N=10, 3, "norm"), from=-5, to=5, col="blue", main="density of 3rd order stat of 10 iid N(0, 1)")
EDIT
You probably needs to study the theory of order statistics and their distributions some more. There are many posts here, you could look through this list. Wikipedia is also use full and has good references.
As for your questions in comment, 1) Since for any $r < s$ we have $X_{(r)}\le X_{(s)}$ the same must hold for their expectations (assuming they exist.) 2) is definitely wrong.