DIR Return Create A Forum - Home
---------------------------------------------------------
QA_Board
HTML https://qaboard.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Questions for R / RStudio (Spring 2023)
*****************************************************
#Post#: 56--------------------------------------------------
Inverse CDF of Discrete Distribution (HW5 Q1.2)
By: Matt Dolin Date: February 25, 2023, 2:50 pm
---------------------------------------------------------
I am somewhat confused about how to calculate the inverse CDF of
a discrete distribution. Could the inverse CDF of a Poisson
distribution be calculated as the inverse of a normal
distribution which approximates the Poisson distribution? Or is
there a better method for approximating which amount of Poisson
trials would produce a certain probability of success? Thank
you!
#Post#: 57--------------------------------------------------
Re: Inverse CDF of Discrete Distribution (HW5 Q1.2)
By: Taeho Kim Date: February 25, 2023, 4:36 pm
---------------------------------------------------------
Hi Matt,
Yes, the discrete case of the inverse transformation method can
be confusing.
The reason is that while the idea uses the inverse CDF,
we actually don't need to do the actual inversion for the
implementation.
See the generation scheme on page 18 of Generating Random
Variable I
HTML https://drive.google.com/file/d/1Zu5pZbXNXwPz_yyl8F4UJ6mtSTxA3vRG/view.
The algorithm does not use inverse CDF anywhere.
What we need to do is:
[list type=decimal]
[li]Find out the CDF values at the discontinuity points (in this
case 0,1,2,3,...), and
chop the interval (0,1) with those CDF values;[/li]
[li]Generate u from uniform(0,1);[/li]
[li]Track which sub-interval u falls into so that we can assign
new random variables accordingly.[/li]
[/list]
This procedure is actually what we did in our lab 9.
The sample code for logarithm distribution (we saw this on
Tuesday) would be helpful
since the Poisson distribution is somewhat similar to the
"logarithm" distribution (Both have infinite discontinuities.)
Please let me know if you need further clarification.
*****************************************************