For the hazard rate function λ(t) = 1 + 0.5 t + 10/t, t ≥ 1, plot both λ(t) and f(t).
The CDF F(t) is given as,
(The limits of integration is from 1 to t as t ≥ 1)
Using below R code, the plot is generated.
t = seq(1,10, by = 0.05)
lambda = 1 + 0.5 * t + 10/t
op <- par(mfrow=c(2,1),mar=c(4,4,2,1))
plot(t, lambda, type = "l", ylab = "lambda")
ft = (1 + 0.5 * t) * exp(-t - 0.25 * t^2 + 1.25) + t^(-9)/9
plot(t, ft, type = "l", ylab = "f(t)")
Get Answers For Free
Most questions answered within 1 hours.