[R] distribution of second order statistic

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Dec 15 19:38:47 CET 2003


The order statistics have a beta distribution, so pbeta is all you need.

On Mon, 15 Dec 2003, Eugene Salinas (R) wrote:

> I am getting some weird results here and I think I am missing something. 
> I am trying to program a function that for a set of random variables 
> drawn from uniform distributions plots that distribution of the second 
> order statistic of the ordered variables. (ie I have n uniform 
> distributions on [0, w_i] for w_i different w_j and i=1..n. I want to 
> plot the distribution of the second order statistic ie one less the 
> maximum.
> 
> I thought that the way to do this is to calculate:
> F=  Sum over i { (1-Fi) * Product of all j different i of Fj} + Product 
> over all i of Fi
> 
> where Fi are just the respective uniform cdf for variable i.
> 
> The problem is that when I do this and plot F over the range from 0 to 
> the highest of the w_i I don't get a cdf but something that slopes down 
> at some point again. What is going on?????

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list