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:The cumulative distribution function (CDF) is:
Where:
- is the shape parameter (determines behavior of the failure rate)
- is the scale parameter (determines the spread of the distribution)
- is the random variable (must be non-negative)
Properties
- Mean:
- Variance:
- Mode: for
- Support:
- Special cases:
- When , becomes exponential distribution
- When , becomes Rayleigh distribution
- When , 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}")