# Definition of predictive hazard function?

In a Bayesian context, the posterior predictive probability density function is

$$f_p(t) = \int f(t\mid \theta)\pi(\theta\mid \text{Data})d\theta,$$

where $$\pi(\theta\mid \text{Data})$$ is the posterior pdf of the parameter $$\theta$$. Similarly, the posterior predictive cumulative distribution function is

$$F_p(t) = \int F(t\mid \theta)\pi(\theta\mid \text{Data})d\theta.$$

I want to calculate the predictive hazard function. Which of the following two methods is correct?

1. $$h_p(t) = \frac{f_p(t)}{1-F_p(t)}$$.
2. $$h_p(t) = \int h(t\mid\theta)\pi(\theta \mid \text{Data})d\theta$$.

Definition 1 is the correct one. The second one represents the posterior mean of the hazard function, but this cannot be justified in terms of probability rules as a predictive hazard.

Thus, you should calculate:

$$h_p(t) = \frac{f_p(t)}{1-F_p(t)},$$

which requires calculating the predictive pdf and cdf separately.

Note also that if you are using a posterior sample of $$\theta$$ to approximate the predictive hazard function, the Monte Carlo approximation reveals a big difference between the two definitions, as Definition 1 is calculated as the ratio of means

$$h_p(t)\approx \dfrac{\frac{1}{n}\sum_i f(t \mid \theta^{(i)})}{1-\frac{1}{n}\sum_i F(t \mid \theta^{(i)})},$$

while Definition 2 is calculated as the mean of ratios:

$$h_p(t)\approx \frac{1}{n}\sum_i\dfrac{ f(t \mid \theta^{(i)})}{1- F(t \mid \theta^{(i)})},$$