Weibull Distribution

Modeling time-to-failure, event durations, and reliability.

The "Time-to-Event" Distribution

The Weibull distribution is a highly flexible continuous probability distribution. It's widely used in engineering to model reliability and time-to-failure of components. In finance, it can be applied to model the duration of events, such as the time until a corporate bond defaults or the time a stock price stays above a certain level.

Its flexibility comes from its shape parameter, kk. Depending on the value of kk, it can mimic the behavior of other distributions like the exponential (when k=1k=1) or approximate the normal distribution (when kk is around 3-4).

Interactive Weibull Distribution
Adjust the shape (k) and scale (λ) parameters to see how the distribution's form changes.
Mean (μ\mu): 0.89
Variance (σ2\sigma^2): 0.21

Core Concepts

Probability Density Function (PDF)
The PDF is defined by its shape parameter `k` and scale parameter `λ`.
f(x;k,λ)=kλ(xλ)k1e(x/λ)kf(x; k, \lambda) = \frac{k}{\lambda} \left(\frac{x}{\lambda}\right)^{k-1} e^{-(x/\lambda)^k}
  • x0x \ge 0 is the variable (e.g., time).
  • k>0k > 0 is the shape parameter. If k<1k < 1, the failure rate decreases over time. If k=1k = 1, it's constant (Exponential). If k>1k > 1, the failure rate increases over time (wear-out).
  • λ>0\lambda > 0 is the scale parameter, which stretches or contracts the distribution.
Expected Value & Variance

Expected Value (Mean)

E[X]=λΓ(1+1/k)E[X] = \lambda \Gamma(1 + 1/k)

Variance

Var(X)=λ2[Γ(1+2/k)(Γ(1+1/k))2]Var(X) = \lambda^2 \left[ \Gamma(1 + 2/k) - (\Gamma(1 + 1/k))^2 \right]

These are expressed using the Gamma function, Γ(z)\Gamma(z).

Key Derivations

Deriving the Expected Value (Mean)
We derive the mean by calculating the integral of xf(x)x \cdot f(x) over its domain [0, ∞).

Step 1: Set up the Integral for E[X]

The expected value is the integral of xx times the PDF.

E[X]=0xkλ(xλ)k1e(x/λ)kdxE[X] = \int_{0}^{\infty} x \cdot \frac{k}{\lambda} \left(\frac{x}{\lambda}\right)^{k-1} e^{-(x/\lambda)^k} dx

Step 2: Simplify the Expression

Combine the xx terms and rearrange.

E[X]=0kλxkλk1e(x/λ)kdx=0kxkλke(x/λ)kdxE[X] = \int_{0}^{\infty} \frac{k}{\lambda} \cdot \frac{x^k}{\lambda^{k-1}} \cdot e^{-(x/\lambda)^k} dx = \int_{0}^{\infty} k \frac{x^k}{\lambda^k} e^{-(x/\lambda)^k} dx

Step 3: Apply u-Substitution

This integral becomes much simpler with a substitution. Let u=(x/λ)ku = (x/\lambda)^k. Then:

  • x=λu1/kx = \lambda u^{1/k}
  • Differentiating with respect to u gives: dx=λ1ku1/k1dudx = \lambda \frac{1}{k} u^{1/k - 1} du

Substituting these back into the integral:

E[X]=0kueu(λ1ku1/k1)duE[X] = \int_{0}^{\infty} k \cdot u \cdot e^{-u} \cdot \left(\lambda \frac{1}{k} u^{1/k - 1}\right) du

Step 4: Simplify and Recognize the Gamma Function

The `k` terms cancel out. We can combine the `u` terms and pull λ\lambda out of the integral.

E[X]=λ0uu1/k1eudu=λ0u1/keuduE[X] = \lambda \int_{0}^{\infty} u \cdot u^{1/k - 1} e^{-u} du = \lambda \int_{0}^{\infty} u^{1/k} e^{-u} du

The integral 0tz1etdt\int_{0}^{\infty} t^{z-1}e^{-t}dt is the definition of the Gamma function Γ(z)\Gamma(z). In our case, z1=1/kz-1 = 1/k, so z=1+1/kz = 1 + 1/k.

This gives us the final result:

Final Mean Formula
E[X]=λΓ(1+1/k)E[X] = \lambda \Gamma(1 + 1/k)