+ Reply to Thread
Results 1 to 5 of 5

Thread: Pdf of peak-to-peak value given n trials from a normal distribution

  1. #1
    Points: 57, Level: 1
    Level completed: 14%, Points required for next Level: 43

    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Pdf of peak-to-peak value given n trials from a normal distribution




    I’m trying to find the pdf for the peak-to-peak value of n events from a normal distribution. I was hoping to use this to help me compare some actual experiments to assumed models although at this point it has become more of an academic puzzle to me. Not a homework problem, but this seemed like the best forum.

    Suppose I have a random variable X that follows a standard normal distribution. Now suppose I take 1e6 independent trials from this distribution, and define a new random variable Y equal to the peak-to-peak value of that population. What is the pdf of Y?


    I was thinking to use the binomial distribution. If p is P(x > x_o) for a single trial, then the probability of exactly one trial out of n yielding x > x_o is:

    {{n} \choose {k}} p^k (1-p)^{n-k}  =  n p (1-p)^{n-1}

    (This would give the peak value. By symmetry, the peak-to-peak value is twice this number.)

    For an example population of 1e6, this gives a normal-like (but asymmetrical) distribution centered around 9.5, which seems reasonable since for a single trial, P(x > 4.75) = 1e-6. But I did a simulation with MATLAB and the empirical results for 10000 trials of Y give a narrower distribution than my computed values, and with a different mean.

    I've attached a graph of my empirical (blue) vs. analytical (red) results for the peak-to-peak value when n = 1e6. The vertical scale is obviously the histogram counts for the simulation; the red curve has been scaled arbitrarily so the general shapes of the distributions can be compared.

    Where did I go wrong? I’m concerned that the event “exactly one of n trials with x > x_o” isn’t precisely the same as “finding the peak value”. (For this reason, I also tried computing the probability of “exactly 0 trails with x > x_o” and then using 1-(this probability). This gave very slightly different results but not enough to explain the difference shown by the graphic.) Another possibility is that my analytical approach is correct, but that MATLAB’s double precision math begins to fail when a number very close to 1 is raised to the 1e6 power. Or that MATLAB’s randn() method is biased if you push it to this level, leading my empirical results to be misleading.

    Thanks for any ideas.
    Attached Images  

  2. #2
    Devorador de queso
    Points: 95,940, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Pdf of peak-to-peak value given n trials from a normal distribution

    Would you mind defining what you mean by peak-to-peak value
    I don't have emotions and sometimes that makes me very sad.

  3. #3
    Points: 57, Level: 1
    Level completed: 14%, Points required for next Level: 43

    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Pdf of peak-to-peak value given n trials from a normal distribution

    Sorry if my terminology is imprecise or out of step with traditional statistics vocabulary. Would range or span be more meaningful? In the n values of X that compose a single trial for Y, I mean to define peak-to-peak value as the maximum on this set minus the minimum.

  4. #4
    Devorador de queso
    Points: 95,940, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Pdf of peak-to-peak value given n trials from a normal distribution

    There isn't a very nice formula for the distribution of the range. It can be done but it is via numeric integration for the most part. Here is the wikipedia article on it: http://en.wikipedia.org/wiki/Range_(...)#Distribution
    I don't have emotions and sometimes that makes me very sad.

  5. The Following User Says Thank You to Dason For This Useful Post:

    mcantre (01-24-2014)

  6. #5
    Points: 57, Level: 1
    Level completed: 14%, Points required for next Level: 43

    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Pdf of peak-to-peak value given n trials from a normal distribution


    Thanks Dason, this reference is just what I was looking for. It's nice to be set upon the right path (even if the path is short and gets too steep for someone without climbing gear). True to your signature line, I suppose.


    At least there's no evidence that MATLAB has failed me.


    Best regards...

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats