Calculator
Example data table
| Scenario | t | Inputs | h(t) | Interpretation |
|---|---|---|---|---|
| Exponential | 2 | λ=0.4 | 0.4 | Constant instantaneous event rate. |
| Weibull | 2 | k=1.5, λ=5 | 0.189736 | Increasing hazard when k>1. |
| Direct | 1 | f(t)=0.25, S(t)=0.80 | 0.3125 | Uses h(t)=f(t)/S(t). |
| Interval | [0,1] | n=100, d=5 | 0.05 | Rate estimate per unit time. |
Formula used
The hazard function measures the instantaneous event rate at time t, given survival up to t.
- h(t) = f(t) / S(t)
- S(t) = 1 − F(t)
- H(t) = ∫₀ᵗ h(u) du
- S(t) = exp(−H(t))
How to use this calculator
- Select a calculation mode that matches your inputs.
- Enter time, parameters, or interval rows as needed.
- Set decimals and enable steps if you want derivations.
- Click Calculate to see results above the form.
- Use Download CSV or Download PDF to export.
FAQs
1) What is the hazard function?
The hazard function is the instantaneous event rate at time t, conditional on surviving up to t. It is not a probability, but a rate that can vary over time.
2) How is hazard different from the PDF?
The PDF f(t) describes the overall density of event times. Hazard h(t) scales that density by survival S(t), focusing on risk among those still alive at time t.
3) Can the hazard be constant?
Yes. In the exponential model, the hazard equals the rate λ and stays constant for all t. This implies a memoryless waiting time.
4) What happens if S(t) is zero?
If survival S(t) is zero, the ratio f(t)/S(t) is undefined. In practice, this means the event has already occurred with probability one by time t.
5) How do I use the interval counts mode?
Enter rows as start,end,at_risk,events. The tool estimates a piecewise hazard rate in each interval and accumulates it to form H(t), then computes survival as exp(−H(t)).
6) Does interval mode support censoring?
It supports censoring indirectly if your at-risk counts already account for withdrawals. For detailed censoring handling, use full survival estimators and provide updated n at each interval.
7) Which distribution should I choose?
Exponential fits constant risk, Weibull handles increasing or decreasing risk, Lognormal can model early low risk with later peaks, and Gompertz grows exponentially with time. Choose based on domain behavior and fit diagnostics.
8) How do I interpret increasing hazard?
An increasing hazard means the instantaneous risk rises as time passes, common in wear‑out processes. In Weibull, this corresponds to shape k greater than one.