StatsCalculators.com

Weibull Distribution

Created:November 17, 2025
Last Updated:April 8, 2025

This calculator helps you compute the probabilities of a Weibull distribution given the shape parameter (k) and the scale parameter (λ). You can find the probability density function (PDF) and cumulative distribution function (CDF) for the Weibull distribution, which is commonly used in reliability analysis and survival studies. The distribution chart visualizes the PDF and allows you to explore the behavior of the Weibull distribution under different parameter settings.

Calculator

Parameters

Interactive Distribution Chart

Click Calculate to view the distribution plot

Learn More

Weibull Distribution: Definition, Formula, and Applications

Weibull Distribution

Definition: The Weibull distribution is a continuous probability distribution named after Waloddi Weibull. It's particularly useful in reliability engineering and survival analysis due to its flexibility in modeling various shapes of failure rates.

Formula:The probability density function (PDF) is given by:f(x;k,λ)=kλ(xλ)k1e(x/λ)k,x0f(x;k,\lambda) = \frac{k}{\lambda}(\frac{x}{\lambda})^{k-1}e^{-(x/\lambda)^k}, \quad x \geq 0The cumulative distribution function (CDF) is:F(x;k,λ)=1e(x/λ)k,x0F(x;k,\lambda) = 1 - e^{-(x/\lambda)^k}, \quad x \geq 0

Where:

  • kk is the shape parameter (determines behavior of the failure rate)
  • λ\lambda is the scale parameter (determines the spread of the distribution)
  • xx is the random variable (must be non-negative)

Properties

  • Mean: E(X)=λΓ(1+1k)E(X) = \lambda\Gamma(1 + \frac{1}{k})
  • Variance: Var(X)=λ2[Γ(1+2k)(Γ(1+1k))2]\text{Var}(X) = \lambda^2[\Gamma(1 + \frac{2}{k}) - (\Gamma(1 + \frac{1}{k}))^2]
  • Mode: λ(k1k)1/k\lambda(\frac{k-1}{k})^{1/k} for k>1k > 1
  • Support: [0,)[0, \infty)
  • Special cases:
    • When k=1k = 1, becomes exponential distribution
    • When k=2k = 2, becomes Rayleigh distribution
    • When k=3.4k = 3.4, approximates normal distribution

How to Calculate Negative Binomial Distribution in R

R
library(tidyverse)

# parameters
shape <- 2      # shape parameter (k)
scale <- 3      # scale parameter (lambda)

x_value <- 2.5

# PDF
pdf_exact <- dweibull(x_value, shape = shape, scale = scale) # 0.277417660332931
print(str_glue("PDF at x = {x_value}: {pdf_exact}"))

# P(X <= 2.5)
cdf_value <- pweibull(2.5, shape = shape, scale = scale) # 0.500648211400724
print(str_glue("P(X <= {x_value}): {cdf_value}"))

# mean and variance
mean <- scale * gamma(1 + 1/shape)  # 2.65868077635827
variance <- scale^2 * (gamma(1 + 2/shape) - (gamma(1 + 1/shape))^2) # 1.93141652942296
print(str_glue("Mean: {mean}"))
print(str_glue("Variance: {variance}"))

How to Calculate Negative Binomial Distribution in Python

Python
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
from scipy.special import gamma

# parameters
shape = 2    # shape parameter (k)
scale = 3    # scale parameter (lambda)
weib = stats.weibull_min(c=shape, scale=scale)

# PDF at x = 2.5
x_value = 2.5
pdf_exact = weib.pdf(x_value)
print(f"PDF at x = {x_value}: {pdf_exact:.6f}")

# P(X <= 2.5)
cdf_value = weib.cdf(x_value)
print(f"P(X <= {x_value}): {cdf_value:.6f}")

# mean and variance
mean = scale * gamma(1 + 1/shape)
variance = scale**2 * (gamma(1 + 2/shape) - (gamma(1 + 1/shape))**2)
print(f"Mean: {mean:.6f}")
print(f"Variance: {variance:.6f}")