The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.stat.math

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Not to achieve CDF inversion doesn´t matter
Replies: 2   Last Post: Sep 6, 2012 5:37 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Luis A. Afonso

Posts: 4,758
From: LIsbon (Portugal)
Registered: 2/16/05
Not to achieve CDF inversion doesn´t matter
Posted: Sep 5, 2012 12:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Not to achieve CDF inversion doesn´t matter

A very recent reading, Author: Samik Raychaudhury

I could notice about an ?iterative method? the author gives in order to get samples from a given cdf F(x) (cumulative distribution function) to which an algebraic inversion is impossible to be performed.
A method I ordinary use is based on loops (say 3) in each one the steps are got narrower and narrower, for example st0 = .5, st1=0.01*st0, st2=0.01*st1.
The procedure goes as:
__1__Given a RND=y0 we start from the origin (relative to the loop) and proceed calculating, with step= stk as long that F(x) is less than y0. This value just exceeded (x´´) one pass to the following loop. Except for the first loop the origin is set at x´´- 1.05*stk.
__2__The final x´´ is a very close to that make F(x´´)= y0 as I could state by an F-invertible example.

A Gambel distribution has
_____F(x) = Exp (-Exp (1-x)/2))
From 100000 random numbers we find that circa 0.7 % values the difference from the exact values is less than 0.000010 (!), the exact being obtained from the inversion : x = 1 - 2* Log(-Log(y0)).
Note that using a more elaborated language than Basic this exactness could be much better

Luis A. Afonso

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.