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.
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.
Where:
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}"))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}")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.
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.
Where:
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}"))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}")