in reply to Re^3: Skew normally distributed random numbers
in thread Skew normally distributed random numbers

Now you've said it, I can see that is a possible-- maybe, the more obviously correct interpretation--but if it is, I am confused.

If you have a function that returns random numbers distibuted over the range x .. y, then--if the PRNG is any good--the mean will tend towards (x+y)/2.

If you want a different mean with the same average delta, you just add the delta between the current and desired means to the low and high value of the range and your function will produce values in that range.

I guess what I am saying is, if you want your numbers in one range, why produce them in another range and then add the delta to each one, rather than producing them in the desired range in the first place?


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
  • Comment on Re^4: Skew normally distributed random numbers

Replies are listed 'Best First'.
Re^5: Skew normally distributed random numbers
by fglock (Vicar) on Jan 28, 2005 at 13:36 UTC

    That's because his PRNG is not uniformly distributed. I try to show it in the ascii graphs below:

    Uniformly distributed: start avg end _____________ | | __| |__ Adding to start/end changes the avg: start avg end _____________ | | __| |__ Normally distributed: start avg end __________ / \ __/ \__ Changing only start/end may give strange results: start end ________ | \ __| \_______

      Okay. I got it now.

      You know what they say about pictures--I guess I should go back to my comic books.


      Examine what is said, not who speaks.
      Silence betokens consent.
      Love the truth but pardon error.

      but... :)

      Most of the examples of skewed normal distributions I can find seem to show the same range, but with the peak (median?) offset to one side or the other. rather than the whole range translated sideways?

      Admittedly, most of the axis on the example curves aren't labelled, so it is hard to tell whether the range remains constant.


      Examine what is said, not who speaks.
      Silence betokens consent.
      Love the truth but pardon error.

        I think you are right. He never said he wanted a normal distribution in the output. He said he wanted to skew the normal distribution he already had.