Inverse Transform Sampling Haniyeh Mollaei
Inverse Transform Sampling
*This method is used in Data Science and Principles of Simulation.
Inverse transform sampling is a method to change a distribution into another one. When the
computer change the distribution of a series of numbers, some steps are taken and we want to get
to the background and realize the process. Before getting into the steps of the transformation there
are some points, we also consider some of these points as limitations of this method:
1. You need the CDF1 of your probability distribution function (the targeted distribution).
2. You need analatycal inverse of your CDF.
3. You need to have normalized distribution.
4. It is a better method than others like Rejecting Sampling. (both of the methods are used for
generating independent samples from a given probability density. Rjecting sampling is
inefficient because of rejecting a large proportion of our points but the Inverse transform
sampling method has its own limitation as we presented above.
As we need the CDF of the Functions so there is going to be a brief review of PDF2 and CDF.
For reviewing, we present the Exponential Distribution as an example.
Exponential (𝜆) Distribution:
Probability density function (PDF):
−𝜆𝑥
𝑓(𝑥) = { 𝜆ⅇ 𝑥≥0
0 𝑥<0
Figure 1. PDF
Cumulative density function (CDF) of Exponential distribution with parameter (𝜆):
−𝜆𝑥
𝐹(𝑥) = {1 − ⅇ 𝑥≥0
0 𝑥<0
1
Cumulative Density Function
2
Probability Density Function
1
Inverse Transform Sampling
*This method is used in Data Science and Principles of Simulation.
Inverse transform sampling is a method to change a distribution into another one. When the
computer change the distribution of a series of numbers, some steps are taken and we want to get
to the background and realize the process. Before getting into the steps of the transformation there
are some points, we also consider some of these points as limitations of this method:
1. You need the CDF1 of your probability distribution function (the targeted distribution).
2. You need analatycal inverse of your CDF.
3. You need to have normalized distribution.
4. It is a better method than others like Rejecting Sampling. (both of the methods are used for
generating independent samples from a given probability density. Rjecting sampling is
inefficient because of rejecting a large proportion of our points but the Inverse transform
sampling method has its own limitation as we presented above.
As we need the CDF of the Functions so there is going to be a brief review of PDF2 and CDF.
For reviewing, we present the Exponential Distribution as an example.
Exponential (𝜆) Distribution:
Probability density function (PDF):
−𝜆𝑥
𝑓(𝑥) = { 𝜆ⅇ 𝑥≥0
0 𝑥<0
Figure 1. PDF
Cumulative density function (CDF) of Exponential distribution with parameter (𝜆):
−𝜆𝑥
𝐹(𝑥) = {1 − ⅇ 𝑥≥0
0 𝑥<0
1
Cumulative Density Function
2
Probability Density Function
1