0% found this document useful (0 votes)
26 views4 pages

Inverse Transform

Uploaded by

glorychern
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Inverse Transform

Uploaded by

glorychern
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Inverse Transform Sampling

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.

2 Inverse Transform Method


Let’s assume we have a continuous random variable X with a probability density
function fX (x) and cumulative distribution function FX (x). The CDF FX (x)
is defined as follows: Z x
FX (x) = fX (t) dt
−∞

To generate random samples x that follow the distribution of X, we can use


the inverse transform method. The idea is to take a uniform random variable
−1
U in the range [0, 1] and find its inverse CDF, denoted as FX (u), such that:
−1
FX (FX (x)) = x

Now, suppose U is a uniform random variable, and we want to obtain a


random sample x from X. The steps for inverse transform sampling are as
follows:

1. Generate a random number u from the uniform distribution on [0, 1].


−1
2. Compute x = FX (u).

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:

1. Generate a uniform random variable u in the range [0, 1].


2. Use the inverse CDF, denoted as F −1 (u), to obtain the corresponding
sample x: ( 1
(343u) 3 for 0 ≤ u ≤ 1
x=
0 otherwise

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:

1. Generate a random number u from the uniform distribution on [0, 1].

2. Compute x = − λ1 ln(1 − u).

The value of x generated using this method will follow the exponential dis-
tribution with parameter λ.

6 Woods-Saxon Distribution of Gold Nuclei


In nuclear physics, the Woods-Saxon potential is commonly used to describe
the distribution of nucleons (protons and neutrons) inside atomic nuclei. The
radial distribution of nucleons in a gold nucleus can be approximated by the
Woods-Saxon distribution.
The radial distribution of nucleons in a gold nucleus is described by the
Woods-Saxon distribution given by:
C
f (r) = r−R

1 + exp a

where:

• r is the radial distance from the center of the nucleus,


• R is the radius parameter representing the nuclear radius,
• a is the diffuseness parameter representing the surface thickness of the
nucleus, and

• C is the normalization constant.

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.

You might also like