Geometrically, this equals the area under the PDF between the two vertical bounds \(a\) and \(b\). This is exactly what the
shaded region on the graph represents.
Hazard rate (failure rate)
The hazard rate (also called the failure rate) is defined as:
\[
\begin{aligned}
h(x) &= \frac{f(x)}{S(x)}
\end{aligned}
\]
For Weibull, this simplifies cleanly:
\[
\begin{aligned}
h(x) &= \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}
\end{aligned}
\]
In engineering, a “bathtub curve” is often modeled by combining phases (decreasing → flat → increasing). A single Weibull can
capture one phase; mixtures or piecewise models capture the full bathtub shape.
Mean and variance (Gamma function)
The Weibull moments are expressed using the Gamma function \(\Gamma(\cdot)\):
\[
\begin{aligned}
\mu &= E[X] = \lambda\,\Gamma\!\left(1+\frac{1}{k}\right) \\
Var(X) &= \lambda^2\left(\Gamma\!\left(1+\frac{2}{k}\right)-\Gamma\!\left(1+\frac{1}{k}\right)^2\right)
\end{aligned}
\]
The calculator evaluates \(\Gamma\) numerically (Lanczos approximation) and reports both \(\mu\) and \(Var(X)\).
Special cases worth remembering
-
Exponential: \(k=1\) gives \(S(x)=\exp(-x/\lambda)\) and constant hazard \(h(x)=1/\lambda\).
-
Rayleigh-type: \(k=2\) gives \(S(x)=\exp(-(x/\lambda)^2)\). For \(\lambda=1\), \(P(X>1)=\exp(-1)\).
Worked example
Example: \(k=2\), \(\lambda=1\). Compute \(P(X>1)\).
\[
\begin{aligned}
z &= \left(\frac{x}{\lambda}\right)^k
= \left(\frac{1}{1}\right)^2
= 1 \\
P(X>1) &= S(1)
= \exp(-z)
= \exp(-1)
\approx 0.368
\end{aligned}
\]
Numerical notes (why plots use a finite window)
The survival probability \(P(X>x)\) corresponds to the area under the PDF from \(x\) to \(\infty\). Any graph must choose a finite
upper limit, so the plot window is automatically extended to a high-quantile range to make the shaded tail visually meaningful while
keeping the chart readable.