Inverse Transform
Inverse Transform
Your Name
July 26, 2023
1 Introduction
Inverse Transform Sampling is a widely used technique for generating random
samples from a given Probability Density Function (PDF). It leverages the Cu-
mulative Distribution Function (CDF) to transform uniform random variables
into samples following the desired distribution.
The resulting value of x will follow the distribution of X based on its PDF
fX (x).
1
3 Conclusion
Inverse Transform Sampling is a powerful technique for generating random sam-
ples from a given probability distribution using the corresponding CDF. It is
straightforward to implement and can be applied to various distributions, mak-
ing it a fundamental tool in the field of random number generation and Monte
Carlo simulations.
4 Example 1
In this example, we will explore the concept of inverse transform sampling using
a specific probability density function (PDF) that is proportional to x2 in the
interval [0, 7] and 0 everywhere else.
Probability Density Function (PDF): The probability density function
f (x) is defined as follows:
(
3
x2 for 0 ≤ x ≤ 7
f (x) = 343
0 otherwise
The PDF f (x) is normalized in the interval [0, 7] to ensure that the area
under the curve is equal to 1.
Cumulative Distribution Function (CDF): The cumulative distribution
function F (x) can be obtained by integrating the PDF f (x):
0 3 for x < 0
x
F (x) = 343 for 0 ≤ x ≤ 7
1 for x > 7
The CDF F (x) gives the probability that a random variable X takes on a
value less than or equal to x.
Inverse Transform Sampling: Inverse transform sampling is a method
used to generate random samples from a given probability distribution using its
CDF. The steps for generating samples from the distribution with f (x) ∝ x2 in
[0, 7] are as follows:
The value of x obtained using the inverse transform sampling method will
follow the distribution f (x) ∝ x2 in the interval [0, 7].
Inverse transform sampling is a powerful technique for generating random
samples from a given probability distribution. In this example, we explored the
2
PDF and CDF of a specific distribution with f (x) ∝ x2 in the interval [0, 7].
We also discussed the steps to perform inverse transform sampling to generate
random samples following this distribution.
5 Example 2
Let’s consider a simple example where X is exponentially distributed with pa-
rameter λ. The PDF and CDF of the exponential distribution are given by:
fX (x) = λe−λx
FX (x) = 1 − e−λx
To obtain samples from this exponential distribution using inverse transform
sampling, we follow these steps:
The value of x generated using this method will follow the exponential dis-
tribution with parameter λ.
where:
3
7 Exercise: Simulating the Woods-Saxon Dis-
tribution of Gold Nuclei
To gain a deeper understanding of the Woods-Saxon distribution and the con-
cept of inverse transform sampling, follow these steps:
1. Choose appropriate values for the parameters R and a that are consistent
with the size of a gold nucleus. For example, R ≈ 6.38 fm and a ≈ 0.535
fm are common values.
2. Calculate the normalization constant C to ensure that the area under the
curve is equal to 1.
3. Implement the inverse transform sampling method to generate random
samples of radial distances r following the Woods-Saxon distribution.
4. Generate a large number of random samples (e.g., 10,000) and create a
histogram to visualize the simulated radial distribution of nucleons in a
gold nucleus.
5. Compare the histogram with the analytical Woods-Saxon distribution
curve to verify the accuracy of the simulation.
6. Experiment with different values of R and a to observe the effects on the
radial distribution.
By completing this exercise, you will gain hands-on experience in using in-
verse transform sampling to simulate a PDF following the Woods-Saxon distri-
bution of gold nuclei and understand how nuclear physicists model the distri-
bution of nucleons inside atomic nuclei.