Tutorial 4 (29/03) Problem Set
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Tutorial 4 (29/03) Problem Set
1. Derive and describe the procedure for sampling the Laplace distribution p(x) using the inverse transform method. Implement your methods including the following plots: the plot of the pdf p(x), and the histogram of the generated samples using the inverse transform.
Hint: decompose the Laplace distribution to a mixture of exponential distributions.
2. Rejection sampling. Suppose we have a distribution
p(x) = exp ╱ 一 、Ixe(-b,b)(x),
where a ≈ 0.95 and b ≈ 1.96.
(a) Implement the rejection sampling to sample this distribution. Plot the histogram of resulting samples
from p(x). Report the M value and the acceptance rate of generated samples.
(b) Now consider a multidimensional extension of p(x) taking the form of
d
p˜d() =n p(xi), where = [x1 , . . . , xd]T .
i=1
Each xi follows the distribution p(x) as defined in (a). Describe the process of applying rejection
sampling to the distribution p˜d() by constructing a jointly distributed uniform random variable (X1 , . . . , Xd, U),
where U ∈ [0, 1]. Derive the formula for the acceptance rate versus the dimension d.
Note: there is a trivial solution to (b). As the probability density in (b) takes a product form, one can apply the one dimensional version of rejection sampling to each individual component of . We do not consider this option here.
3. Optimal biasing distribution. We aim to compute E[h(X)] where X ~ p(x) using importance sampling. Show that the optimal biasing distribution is g(x) = |h(x)|p(x) for some constant c.
(The solution can be found in the lecture notes. You should try to prove this and explain the procedure.)
2023-05-31