The Weibull distribution is the workhorse of reliability engineering and survival analysis. By tuning a single shape parameter, it can model failure rates that increase, decrease, or remain constant over time — making it far more flexible than the Exponential distribution.
Formally, the random variate \(X\) defined for the range \(X \in [0, \infty)\), is said to have a Weibull Distribution (i.e. \(X \sim \text{Weibull}(k, \lambda)\)) with shape parameter \(k > 0\) and scale parameter \(\lambda > 0\). In R, these parameters are named shape (\(= k\)) and scale (\(= \lambda\)).
31.1 Probability Density Function
\[
f(x) = \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}\exp\!\left(-\left(\frac{x}{\lambda}\right)^k\right), \quad x \geq 0
\]
The figure below shows examples of the Weibull Probability Density Function for different shape values with \(\lambda = 1\).
Code
par(mfrow =c(2, 2))x <-seq(0, 3, length =500)plot(x, dweibull(x, shape =0.5, scale =1), type ="l", lwd =2, col ="blue",xlab ="x", ylab ="f(x)", main =expression(paste(k ==0.5, ", ", lambda ==1)),ylim =c(0, 3))plot(x, dweibull(x, shape =1, scale =1), type ="l", lwd =2, col ="blue",xlab ="x", ylab ="f(x)", main =expression(paste(k ==1, ", ", lambda ==1)))plot(x, dweibull(x, shape =2, scale =1), type ="l", lwd =2, col ="blue",xlab ="x", ylab ="f(x)", main =expression(paste(k ==2, ", ", lambda ==1)))plot(x, dweibull(x, shape =5, scale =1), type ="l", lwd =2, col ="blue",xlab ="x", ylab ="f(x)", main =expression(paste(k ==5, ", ", lambda ==1)))par(mfrow =c(1, 1))
Figure 31.1: Weibull Probability Density Function for various shape values (scale = 1)
31.2 Purpose
The Weibull distribution models the lifetime of components and systems when the hazard rate (instantaneous failure rate) is not constant. By varying the shape parameter \(k\), it can capture early-life failures (\(k < 1\)), random failures (\(k = 1\), identical to the Exponential), or wear-out failures (\(k > 1\)). Common applications include:
Reliability engineering: time to failure of mechanical and electronic components
Survival analysis: patient survival times, where hazard may change over time
Wind energy: wind speed distributions for turbine siting and energy estimation
Materials science: fatigue life and fracture strength distributions
Extreme-value analysis: minimum strength and maximum stress models
Relation to the discrete setting. The Weibull distribution extends the Exponential (continuous Geometric analog). For \(k = 1\): constant hazard rate corresponds to Geometric memorylessness. For \(k \neq 1\), the Discrete Weibull distribution is the closest analog (not covered here).
A bearing manufacturer models component lifetime (in hours) as \(X \sim \text{Weibull}(k = 2, \lambda = 5)\). The shape \(k = 2 > 1\) indicates wear-out failure: the hazard rate increases over time. The mean lifetime is \(5\,\Gamma(1.5) \approx 4.43\) hours.
k <-2; lambda <-5# P(X <= 4): probability of failure within 4 hourscat("P(fails within 4 h):", pweibull(4, shape = k, scale = lambda), "\n")# Median lifetimecat("Median lifetime (h):", qweibull(0.5, shape = k, scale = lambda), "\n")# Mean lifetimecat("Mean lifetime (h):", lambda *gamma(1+1/k), "\n")
P(fails within 4 h): 0.4727076
Median lifetime (h): 4.162773
Mean lifetime (h): 4.431135
Weibull random variates are generated via the inverse-CDF method. Since \(F(x) = 1 - \exp(-(x/\lambda)^k)\), setting \(U = F(X)\) and solving for \(X\) gives:
\[
X = \lambda\,(-\ln U)^{1/k} \sim \text{Weibull}(k, \lambda) \quad \text{when } U \sim \text{U}(0,1)
\]
This rate is increasing for \(k > 1\) (wear-out failures), constant for \(k = 1\) (random failures), and decreasing for \(k < 1\) (infant mortality). The two-parameter Weibull therefore models monotone hazards; bathtub-shaped hazards require extended, piecewise, or mixture models.
31.25 Related Distributions 1: Exponential Distribution
The Exponential distribution is the special case \(k = 1\) of the Weibull (see Chapter 27).
31.26 Related Distributions 2: Rayleigh Distribution
The Rayleigh distribution is the special case \(k = 2\) of the Weibull (see Chapter 34).
31.27 Related Distributions 3: Gumbel Distribution
If \(X \sim \text{Weibull}(k, \lambda)\) then \(\ln\!\left((X/\lambda)^k\right) \sim \text{Gumbel}(0, 1)\) (minimum Gumbel), while \(-\ln\!\left((X/\lambda)^k\right)\) follows the maximum Gumbel. See Chapter 38.
31.28 Related Distributions 4: GEV Distribution
The Weibull minimum distribution appears as the GEV Type III extreme-value distribution when \(\xi < 0\): \(\text{GEV}(\mu, \sigma, \xi < 0)\) has a finite upper endpoint and is related to the reversed Weibull (see Chapter 45).
31.29 Related Distributions 5: Fréchet Distribution
The Fréchet distribution is the GEV Type II extreme-value distribution (\(\xi > 0\)), governing the maximum of heavy-tailed parent distributions such as Pareto. The Weibull and Fréchet represent opposite tails of the GEV family: light-tailed (finite endpoint) versus heavy-tailed (polynomial decay) (see Chapter 46).