1

I have two distributions over two parameters h and t. h is Weibull distributed while t is conditioned on h and it is log-normal distributed:

f_H = np.exp(-(h / alpha) ** beta) * (beta / alpha) * (h / alpha) ** (beta - 1)
f_TIH = np.exp(-(np.log(t) - mu_h) ** 2.0 / (2.0 * sigma_h ** 2)) / (t * sigma_h * np.sqrt(2.0 * np.pi))

where:

mu_h = a0 + a1 * h ** a2
sigma_h = b0 + b1 * np.exp(b2 * h)

and:

a0 = 0.7
a1 = 0.282
a2 = 0.167
b0 = 0.07
b1 = 0.3449
b2 = -0.2073
alpha = 1.76
beta = 1.59

The joint PDF for h and t is then given as:

f_joint = f_H * f_TIH

My question is how can I sample random values for h and t from the joint PDF?

Trying
  • 21
  • 4
  • It sounds like you have p(h) and p(t | h). Given that, you can sample from p(h, t) = p(t | h) p(h) by just sampling h via p(h) and then t via p(t | h) where h is whatever you got in the first step. Then (h, t) is a sample from the joint distribution. – Robert Dodier Apr 07 '21 at 21:16
  • @RobertDodier Thank you, I will implement this :) – Trying Apr 08 '21 at 08:40

0 Answers0