Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sorting sample from exponential

  1. Jul 14, 2011 #1
    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. jcsd
  3. Jul 14, 2011 #2
    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
  4. Jul 15, 2011 #3
    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?
  5. Jul 15, 2011 #4
    Maybe it can be attributed to numerical precision?
  6. Jul 15, 2011 #5
    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.
  7. Jul 15, 2011 #6


    User Avatar

  8. Jul 15, 2011 #7


    User Avatar
    Science Advisor

    For uniform random bits there is the site:


    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.
  9. Jul 15, 2011 #8
    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?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook