# Sorting sample from exponential

1. Jul 14, 2011

### Gerenuk

What is the function that I get when I take a large sample from an exponential distribution (many values from the same distribution) and sort the sample points. I'm a bit surprised it's not really exponential.
The shape seems to fit some data I have nicely, but I don't know the function to fit :(
I found something about order statistics, but that seems to give answers to other questions.

Anyone a suggestion?

2. Jul 14, 2011

### bpet

Sounds it's like either the empirical distribution function or empirical quantile function that you're looking at.

For the edf Donsker's theorem tells us that sqrt(n)*(F_n(x)-F(x)) -> B(F(x)) where B is a Brownian bridge, so for this example you'd get either 1-exp(-bx) (for the edf) or -log(1-u)/b (for the eqf).

Last edited: Jul 14, 2011
3. Jul 15, 2011

### Gerenuk

Thanks! Hmm, quite possible. The uniform distribution seems uniform for empirical, but the exponential seems to have some systematic deviations in the tails. Is there any statement about such systematic deviations?

4. Jul 15, 2011

### bpet

Maybe it can be attributed to numerical precision?

5. Jul 15, 2011

### Gerenuk

I made a run with 10000 samples and quite a smooth curve came out. The log of it is linear in the center with tails smoothly deviating in opposite direction. But I try to check that again.

6. Jul 15, 2011

### xts

7. Jul 15, 2011

### chiro

For uniform random bits there is the site:

http://www.random.org

The site says that it uses atmospheric noise as input to generate the random data. In terms of compression, it looks pretty good (random data can't be compressed with standard methods), but apart from that you'll probably have to run it through some analysis to test its fit for statistical randomness.

8. Jul 15, 2011

### pmsrw3

Sorry -- this must be a dumb question, because everyone else seems to understand what you're talking about, but could you explain more clearly what you're doing? My understanding of "sort the sample points" is "put them in numerical order". That obviously will not change the distribution. If the sample points truly were sampled from an exponential distribution, then they will also have an exponential distribution after sorting. If they don't, it can only mean that you were mistaken when you thought you were sampling from an exponential distribution.

Where am I going wrong?